Cleaned up the data path for payload data, made callbacks to rtp_receiver nonoptional.

The audio receiver is now completely independent of rtp_receiver: video will hopefully be too in the next patch.

BUG=
TEST=vie & voe_auto_test full runs

Review URL: https://webrtc-codereview.appspot.com/1014006

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3372 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
phoglund@webrtc.org
2013-01-14 10:01:55 +00:00
parent 49273ffa79
commit a22a9bd9ca
12 changed files with 184 additions and 152 deletions

View File

@ -15,15 +15,14 @@
#include <math.h> // pow()
#include "critical_section_wrapper.h"
#include "rtp_receiver.h"
#include "trace.h"
namespace webrtc {
RTPReceiverAudio::RTPReceiverAudio(const WebRtc_Word32 id,
RTPReceiver* parent,
RtpData* data_callback,
RtpAudioFeedback* incomingMessagesCallback)
: _id(id),
_parent(parent),
: RTPReceiverStrategy(data_callback),
_id(id),
_criticalSectionRtpReceiverAudio(
CriticalSectionWrapper::CreateCriticalSection()),
_lastReceivedFrequency(8000),
@ -512,13 +511,13 @@ RTPReceiverAudio::ParseAudioCodecSpecific(WebRtcRTPHeader* rtpHeader,
rtpHeader->header.payloadType = payloadData[0];
// only one frame in the RED strip the one byte to help NetEq
return _parent->CallbackOfReceivedPayloadData(payloadData+1,
payloadLength-1,
rtpHeader);
return data_callback_->OnReceivedPayloadData(payloadData+1,
payloadLength-1,
rtpHeader);
}
rtpHeader->type.Audio.channel = audioSpecific.channels;
return _parent->CallbackOfReceivedPayloadData(
return data_callback_->OnReceivedPayloadData(
payloadData, payloadLength, rtpHeader);
}
} // namespace webrtc