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

Unified Diff: webrtc/modules/rtp_rtcp/source/forward_error_correction.h

Issue 2919313005: Revert of Only compare sequence numbers from the same SSRC in ForwardErrorCorrection. (Closed)
Patch Set: Created 3 years, 6 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/source/forward_error_correction.h
diff --git a/webrtc/modules/rtp_rtcp/source/forward_error_correction.h b/webrtc/modules/rtp_rtcp/source/forward_error_correction.h
index e5a38b6c006cfd88033e1edd858a69d9ddf4d703..f45473cb1f417cbb36dcdabb0f2c99542af9ccca 100644
--- a/webrtc/modules/rtp_rtcp/source/forward_error_correction.h
+++ b/webrtc/modules/rtp_rtcp/source/forward_error_correction.h
@@ -62,25 +62,29 @@
class SortablePacket {
public:
// Functor which returns true if the sequence number of |first|
- // is < the sequence number of |second|. Should only ever be called for
- // packets belonging to the same SSRC.
+ // is < the sequence number of |second|.
struct LessThan {
template <typename S, typename T>
bool operator() (const S& first, const T& second);
};
- uint32_t ssrc;
uint16_t seq_num;
};
// The received list parameter of DecodeFec() references structs of this type.
//
+ // The ssrc member is needed to ensure that we can restore the SSRC field of
+ // recovered packets. In most situations this could be retrieved from other
+ // media packets, but in the case of an FEC packet protecting a single
+ // missing media packet, we have no other means of obtaining it.
// TODO(holmer): Refactor into a proper class.
class ReceivedPacket : public SortablePacket {
public:
ReceivedPacket();
~ReceivedPacket();
+ uint32_t ssrc; // SSRC of the current frame. Must be set for FEC
+ // packets, but not required for media packets.
bool is_fec; // Set to true if this is an FEC packet and false
// otherwise.
rtc::scoped_refptr<Packet> pkt; // Pointer to the packet storage.
@@ -105,7 +109,7 @@
// Used to link media packets to their protecting FEC packets.
//
// TODO(holmer): Refactor into a proper class.
- class ProtectedPacket : public SortablePacket {
+ class ProtectedPacket : public ForwardErrorCorrection::SortablePacket {
public:
ProtectedPacket();
~ProtectedPacket();
@@ -118,7 +122,7 @@
// Used for internal storage of received FEC packets in a list.
//
// TODO(holmer): Refactor into a proper class.
- class ReceivedFecPacket : public SortablePacket {
+ class ReceivedFecPacket : public ForwardErrorCorrection::SortablePacket {
public:
ReceivedFecPacket();
~ReceivedFecPacket();
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/fec_test_helper.cc ('k') | webrtc/modules/rtp_rtcp/source/forward_error_correction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698