Remove AudioCodingModule::IncomingPayload

This method is no longer in use.

Bug: webrtc:3520
Change-Id: Ie1419fa95e6ef482e9adc1ed7af57af2c3510a65
Reviewed-on: https://webrtc-review.googlesource.com/4667
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20047}
This commit is contained in:
Henrik Lundin
2017-09-29 13:34:53 +02:00
committed by Commit Bot
parent a86ac6d198
commit d4a790fbea
2 changed files with 0 additions and 73 deletions

View File

@ -149,13 +149,6 @@ class AudioCodingModuleImpl final : public AudioCodingModule {
const size_t payload_length,
const WebRtcRTPHeader& rtp_info) override;
// Incoming payloads, without rtp-info, the rtp-info will be created in ACM.
// One usage for this API is when pre-encoded files are pushed in ACM.
int IncomingPayload(const uint8_t* incoming_payload,
const size_t payload_length,
uint8_t payload_type,
uint32_t timestamp) override;
// Minimum playout delay.
int SetMinimumPlayoutDelay(int time_ms) override;
@ -291,14 +284,6 @@ class AudioCodingModuleImpl final : public AudioCodingModule {
// This is to keep track of CN instances where we can send DTMFs.
uint8_t previous_pltype_ RTC_GUARDED_BY(acm_crit_sect_);
// Used when payloads are pushed into ACM without any RTP info
// One example is when pre-encoded bit-stream is pushed from
// a file.
// IMPORTANT: this variable is only used in IncomingPayload(), therefore,
// no lock acquired when interacting with this variable. If it is going to
// be used in other methods, locks need to be taken.
std::unique_ptr<WebRtcRTPHeader> aux_rtp_header_;
bool receiver_initialized_ RTC_GUARDED_BY(acm_crit_sect_);
AudioFrame preprocess_frame_ RTC_GUARDED_BY(acm_crit_sect_);
@ -1147,35 +1132,6 @@ int AudioCodingModuleImpl::RegisterVADCallback(ACMVADCallback* vad_callback) {
return 0;
}
// TODO(kwiberg): Remove this method, and have callers call IncomingPacket
// instead. The translation logic and state belong with them, not with
// AudioCodingModuleImpl.
int AudioCodingModuleImpl::IncomingPayload(const uint8_t* incoming_payload,
size_t payload_length,
uint8_t payload_type,
uint32_t timestamp) {
// We are not acquiring any lock when interacting with |aux_rtp_header_| no
// other method uses this member variable.
if (!aux_rtp_header_) {
// This is the first time that we are using |dummy_rtp_header_|
// so we have to create it.
aux_rtp_header_.reset(new WebRtcRTPHeader);
aux_rtp_header_->header.payloadType = payload_type;
// Don't matter in this case.
aux_rtp_header_->header.ssrc = 0;
aux_rtp_header_->header.markerBit = false;
// Start with random numbers.
aux_rtp_header_->header.sequenceNumber = 0x1234; // Arbitrary.
aux_rtp_header_->type.Audio.channel = 1;
}
aux_rtp_header_->header.timestamp = timestamp;
IncomingPacket(incoming_payload, payload_length, *aux_rtp_header_);
// Get ready for the next payload.
aux_rtp_header_->header.sequenceNumber++;
return 0;
}
int AudioCodingModuleImpl::SetOpusApplication(OpusApplicationMode application) {
rtc::CritScope lock(&acm_crit_sect_);
if (!HaveValidEncoder("SetOpusApplication")) {

View File

@ -587,35 +587,6 @@ class AudioCodingModule {
const size_t payload_len_bytes,
const WebRtcRTPHeader& rtp_info) = 0;
///////////////////////////////////////////////////////////////////////////
// int32_t IncomingPayload()
// Call this API to push incoming payloads when there is no rtp-info.
// The rtp-info will be created in ACM. One usage for this API is when
// pre-encoded files are pushed in ACM
//
// Inputs:
// -incoming_payload : received payload.
// -payload_len_byte : the length, in bytes, of the received payload.
// -payload_type : the payload-type. This specifies which codec has
// to be used to decode the payload.
// -timestamp : send timestamp of the payload. ACM starts with
// a random value and increment it by the
// packet-size, which is given when the codec in
// question is registered by RegisterReceiveCodec().
// Therefore, it is essential to have the timestamp
// if the frame-size differ from the registered
// value or if the incoming payload contains DTX
// packets.
//
// Return value:
// -1 if failed to push in the payload
// 0 if payload is successfully pushed in.
//
virtual int32_t IncomingPayload(const uint8_t* incoming_payload,
const size_t payload_len_byte,
const uint8_t payload_type,
const uint32_t timestamp = 0) = 0;
///////////////////////////////////////////////////////////////////////////
// int SetMinimumPlayoutDelay()
// Set a minimum for the playout delay, used for lip-sync. NetEq maintains