Break out RTCPSender dependency on ModuleRtpRtcpImpl.
BUG= R=stefan@webrtc.org Review URL: https://webrtc-codereview.appspot.com/2191004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4706 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -232,7 +232,9 @@ int32_t RTPSender::DeRegisterSendPayload(
|
||||
|
||||
int8_t RTPSender::SendPayloadType() const { return payload_type_; }
|
||||
|
||||
int RTPSender::SendPayloadFrequency() const { return audio_->AudioFrequency(); }
|
||||
int RTPSender::SendPayloadFrequency() const {
|
||||
return audio_ != NULL ? audio_->AudioFrequency() : kVideoPayloadTypeFrequency;
|
||||
}
|
||||
|
||||
int32_t RTPSender::SetMaxPayloadLength(
|
||||
const uint16_t max_payload_length,
|
||||
@ -1168,28 +1170,9 @@ bool RTPSender::UpdateAbsoluteSendTime(
|
||||
return true;
|
||||
}
|
||||
|
||||
void RTPSender::SetSendingStatus(const bool enabled) {
|
||||
void RTPSender::SetSendingStatus(bool enabled) {
|
||||
if (enabled) {
|
||||
uint32_t frequency_hz;
|
||||
if (audio_configured_) {
|
||||
uint32_t frequency = audio_->AudioFrequency();
|
||||
|
||||
// sanity
|
||||
switch (frequency) {
|
||||
case 8000:
|
||||
case 12000:
|
||||
case 16000:
|
||||
case 24000:
|
||||
case 32000:
|
||||
break;
|
||||
default:
|
||||
assert(false);
|
||||
return;
|
||||
}
|
||||
frequency_hz = frequency;
|
||||
} else {
|
||||
frequency_hz = kVideoPayloadTypeFrequency;
|
||||
}
|
||||
uint32_t frequency_hz = SendPayloadFrequency();
|
||||
uint32_t RTPtime = ModuleRTPUtility::GetCurrentRTP(clock_, frequency_hz);
|
||||
|
||||
// Will be ignored if it's already configured via API.
|
||||
|
||||
Reference in New Issue
Block a user