Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(150)

Unified Diff: webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h

Issue 2523843002: Send audio and video codecs to RTPPayloadRegistry (Closed)
Patch Set: Change strcpy to strncpy Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/modules/rtp_rtcp/include/rtp_receiver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h
diff --git a/webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h b/webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h
index fd228e1f168b15c49b1e0e1512e3d91e0621a1bb..8f9d5829f9cc066c0416d991994205af4d38fe24 100644
--- a/webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h
+++ b/webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h
@@ -22,6 +22,9 @@
namespace webrtc {
+struct CodecInst;
+class VideoCodec;
+
// This strategy deals with the audio/video-specific aspects
// of payload handling.
class RTPPayloadStrategy {
@@ -59,19 +62,18 @@ class RTPPayloadRegistry {
explicit RTPPayloadRegistry(RTPPayloadStrategy* rtp_payload_strategy);
~RTPPayloadRegistry();
- int32_t RegisterReceivePayload(const char* payload_name,
- int8_t payload_type,
- uint32_t frequency,
- size_t channels,
- uint32_t rate,
+ // TODO(magjed): Split RTPPayloadRegistry into separate Audio and Video class
+ // and remove RTPPayloadStrategy, RTPPayloadVideoStrategy,
+ // RTPPayloadAudioStrategy, and simplify the code. http://crbug/webrtc/6743.
+ int32_t RegisterReceivePayload(const CodecInst& audio_codec,
bool* created_new_payload_type);
+ int32_t RegisterReceivePayload(const VideoCodec& video_codec);
int32_t DeRegisterReceivePayload(int8_t payload_type);
- int32_t ReceivePayloadType(const char* payload_name,
- uint32_t frequency,
- size_t channels,
- uint32_t rate,
+ int32_t ReceivePayloadType(const CodecInst& audio_codec,
+ int8_t* payload_type) const;
+ int32_t ReceivePayloadType(const VideoCodec& video_codec,
int8_t* payload_type) const;
bool RtxEnabled() const;
@@ -141,6 +143,19 @@ class RTPPayloadRegistry {
RTC_DEPRECATED void set_use_rtx_payload_mapping_on_restore(bool val) {}
private:
+ int32_t RegisterReceivePayload(const char* payload_name,
+ int8_t payload_type,
+ uint32_t frequency,
+ size_t channels,
+ uint32_t rate,
+ bool* created_new_payload_type);
+
+ int32_t ReceivePayloadType(const char* payload_name,
+ uint32_t frequency,
+ size_t channels,
+ uint32_t rate,
+ int8_t* payload_type) const;
+
// Prunes the payload type map of the specific payload type, if it exists.
void DeregisterAudioCodecOrRedTypeRegardlessOfPayloadType(
const char* payload_name,
« no previous file with comments | « no previous file | webrtc/modules/rtp_rtcp/include/rtp_receiver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698