Index: webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc |
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc b/webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc |
index 4188f97b539d1bfa0347b485e0d722e2d9c6074a..32481b200f2b8777a3d604a640b5d1003214d06f 100644 |
--- a/webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc |
+++ b/webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc |
@@ -33,6 +33,22 @@ RTPPayloadRegistry::~RTPPayloadRegistry() { |
} |
} |
+int32_t RTPPayloadRegistry::RegisterReceivePayload(const CodecInst& audio_codec, |
+ bool* created_new_payload) { |
+ return RegisterReceivePayload( |
+ audio_codec.plname, audio_codec.pltype, audio_codec.plfreq, |
+ audio_codec.channels, std::max(0, audio_codec.rate), |
+ created_new_payload); |
+} |
+ |
+int32_t RTPPayloadRegistry::RegisterReceivePayload( |
+ const VideoCodec& video_codec, |
+ bool* created_new_payload) { |
+ return RegisterReceivePayload(video_codec.plName, video_codec.plType, |
+ kVideoPayloadTypeFrequency, 0 /* channels */, |
+ 0 /* rate */, created_new_payload); |
+} |
+ |
int32_t RTPPayloadRegistry::RegisterReceivePayload( |
const char* const payload_name, |
const int8_t payload_type, |
@@ -165,6 +181,20 @@ void RTPPayloadRegistry::DeregisterAudioCodecOrRedTypeRegardlessOfPayloadType( |
} |
} |
+int32_t RTPPayloadRegistry::ReceivePayloadType(const CodecInst& audio_codec, |
+ int8_t* payload_type) const { |
+ return ReceivePayloadType(audio_codec.plname, audio_codec.plfreq, |
+ audio_codec.channels, std::max(0, audio_codec.rate), |
+ payload_type); |
+} |
+ |
+int32_t RTPPayloadRegistry::ReceivePayloadType(const VideoCodec& video_codec, |
+ int8_t* payload_type) const { |
+ return ReceivePayloadType(video_codec.plName, kVideoPayloadTypeFrequency, |
+ 0 /* channels */, 0 /* rate */, |
+ payload_type); |
+} |
+ |
int32_t RTPPayloadRegistry::ReceivePayloadType(const char* const payload_name, |
const uint32_t frequency, |
const size_t channels, |