Expose setPayloadType on the rtp_sender. Thus allowing other users of this module

to set the payload type to be used without having to call SendOutgoingData.

BUG=3694
R=asapersson@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6988 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
andresp@webrtc.org 2014-08-27 09:39:43 +00:00
parent 00f11f5e24
commit c3c29113d1
2 changed files with 8 additions and 1 deletions

View File

@ -283,6 +283,11 @@ int32_t RTPSender::DeRegisterSendPayload(
return 0;
}
void RTPSender::SetSendPayloadType(int8_t payload_type) {
CriticalSectionScoped cs(send_critsect_);
payload_type_ = payload_type;
}
int8_t RTPSender::SendPayloadType() const {
CriticalSectionScoped cs(send_critsect_);
return payload_type_;
@ -385,7 +390,7 @@ int32_t RTPSender::CheckPayloadType(const int8_t payload_type,
LOG(LS_WARNING) << "Payload type " << payload_type << " not registered.";
return -1;
}
payload_type_ = payload_type;
SetSendPayloadType(payload_type);
RtpUtility::Payload* payload = it->second;
assert(payload);
if (!payload->audio && !audio_configured_) {

View File

@ -100,6 +100,8 @@ class RTPSender : public RTPSenderInterface, public Bitrate::Observer {
int32_t DeRegisterSendPayload(const int8_t payload_type);
void SetSendPayloadType(int8_t payload_type);
int8_t SendPayloadType() const;
int SendPayloadFrequency() const;