Add missing configuration of rtx payload type for rtp/rtcp module.
BUG=4528 R=pbos@webrtc.org, stefan@webrtc.org Review URL: https://webrtc-codereview.appspot.com/51639004 Cr-Commit-Position: refs/heads/master@{#8989}
This commit is contained in:
parent
03dec77ce6
commit
6ae2572fa6
@ -237,6 +237,9 @@ class RtpRtcp : public Module {
|
||||
// doesn't enable RTX, only the payload type is set.
|
||||
virtual void SetRtxSendPayloadType(int payload_type) = 0;
|
||||
|
||||
// Gets the payload type to use when sending RTX packets.
|
||||
virtual int RtxSendPayloadType() const = 0;
|
||||
|
||||
/*
|
||||
* sends kRtcpByeCode when going from true to false
|
||||
*
|
||||
|
@ -99,6 +99,8 @@ class MockRtpRtcp : public RtpRtcp {
|
||||
void(uint32_t));
|
||||
MOCK_METHOD1(SetRtxSendPayloadType,
|
||||
void(int));
|
||||
MOCK_CONST_METHOD0(RtxSendPayloadType,
|
||||
int());
|
||||
MOCK_METHOD1(SetSendingStatus,
|
||||
int32_t(const bool sending));
|
||||
MOCK_CONST_METHOD0(Sending,
|
||||
|
@ -210,6 +210,10 @@ void ModuleRtpRtcpImpl::SetRtxSendPayloadType(int payload_type) {
|
||||
rtp_sender_.SetRtxPayloadType(payload_type);
|
||||
}
|
||||
|
||||
int ModuleRtpRtcpImpl::RtxSendPayloadType() const {
|
||||
return rtp_sender_.RtxPayloadType();
|
||||
}
|
||||
|
||||
int32_t ModuleRtpRtcpImpl::IncomingRtcpPacket(
|
||||
const uint8_t* rtcp_packet,
|
||||
const size_t length) {
|
||||
|
@ -89,6 +89,7 @@ class ModuleRtpRtcpImpl : public RtpRtcp {
|
||||
void SetRtxSsrc(uint32_t ssrc) override;
|
||||
|
||||
void SetRtxSendPayloadType(int payload_type) override;
|
||||
int RtxSendPayloadType() const override;
|
||||
|
||||
// Sends kRtcpByeCode when going from true to false.
|
||||
int32_t SetSendingStatus(bool sending) override;
|
||||
|
@ -426,6 +426,11 @@ void RTPSender::SetRtxPayloadType(int payload_type) {
|
||||
payload_type_rtx_ = payload_type;
|
||||
}
|
||||
|
||||
int RTPSender::RtxPayloadType() const {
|
||||
CriticalSectionScoped cs(send_critsect_.get());
|
||||
return payload_type_rtx_;
|
||||
}
|
||||
|
||||
int32_t RTPSender::CheckPayloadType(int8_t payload_type,
|
||||
RtpVideoCodecTypes* video_type) {
|
||||
CriticalSectionScoped cs(send_critsect_.get());
|
||||
|
@ -215,6 +215,7 @@ class RTPSender : public RTPSenderInterface {
|
||||
void SetRtxSsrc(uint32_t ssrc);
|
||||
|
||||
void SetRtxPayloadType(int payloadType);
|
||||
int RtxPayloadType() const;
|
||||
|
||||
// Functions wrapping RTPSenderInterface.
|
||||
int32_t BuildRTPheader(uint8_t* data_buffer,
|
||||
|
@ -423,6 +423,7 @@ int32_t ViEChannel::SetSendCodec(const VideoCodec& video_codec,
|
||||
}
|
||||
rtp_rtcp->SetSendingStatus(rtp_rtcp_->Sending());
|
||||
rtp_rtcp->SetSendingMediaStatus(rtp_rtcp_->SendingMedia());
|
||||
rtp_rtcp->SetRtxSendPayloadType(rtp_rtcp_->RtxSendPayloadType());
|
||||
rtp_rtcp->SetRtxSendStatus(rtp_rtcp_->RtxSendStatus());
|
||||
simulcast_rtp_rtcp_.push_back(rtp_rtcp);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user