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

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

Issue 1394573004: Fix RTPPayloadRegistry to correctly restore RTX, if a valid mapping exists. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Added an option (off by default) to respect mappings Created 5 years, 2 months 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
Index: webrtc/modules/rtp_rtcp/interface/rtp_payload_registry.h
diff --git a/webrtc/modules/rtp_rtcp/interface/rtp_payload_registry.h b/webrtc/modules/rtp_rtcp/interface/rtp_payload_registry.h
index bcafdfb7f600f81a395fe2f88cd4b95f4e1c5e5f..414cc27acd12105f5634bd5f369a29d613f147c3 100644
--- a/webrtc/modules/rtp_rtcp/interface/rtp_payload_registry.h
+++ b/webrtc/modules/rtp_rtcp/interface/rtp_payload_registry.h
@@ -83,7 +83,7 @@ class RTPPayloadRegistry {
bool IsRtx(const RTPHeader& header) const;
- bool RestoreOriginalPacket(uint8_t** restored_packet,
+ bool RestoreOriginalPacket(uint8_t* restored_packet,
const uint8_t* packet,
size_t* packet_length,
uint32_t original_ssrc,
@@ -138,6 +138,16 @@ class RTPPayloadRegistry {
return last_received_media_payload_type_;
};
+ bool use_rtx_payload_mapping_on_restore() const {
+ CriticalSectionScoped cs(crit_sect_.get());
+ return use_rtx_payload_mapping_on_restore_;
+ }
+
+ void set_use_rtx_payload_mapping_on_restore(bool val) {
+ CriticalSectionScoped cs(crit_sect_.get());
+ use_rtx_payload_mapping_on_restore_ = val;
+ }
+
private:
// Prunes the payload type map of the specific payload type, if it exists.
void DeregisterAudioCodecOrRedTypeRegardlessOfPayloadType(
@@ -149,6 +159,7 @@ class RTPPayloadRegistry {
bool IsRtxInternal(const RTPHeader& header) const;
+
stefan-webrtc 2015/10/13 13:07:56 Remove this line
noahric 2015/10/13 17:03:31 Done.
rtc::scoped_ptr<CriticalSectionWrapper> crit_sect_;
RtpUtility::PayloadTypeMap payload_type_map_;
rtc::scoped_ptr<RTPPayloadStrategy> rtp_payload_strategy_;
@@ -163,6 +174,9 @@ class RTPPayloadRegistry {
int rtx_payload_type_;
// Mapping rtx_payload_type_map_[rtx] = associated.
std::map<int, int> rtx_payload_type_map_;
+ // When true, use rtx_payload_type_map_ when restoring RTX packets to get the
+ // correct payload type.
+ bool use_rtx_payload_mapping_on_restore_;
uint32_t ssrc_rtx_;
};

Powered by Google App Engine
This is Rietveld 408576698