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

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

Issue 2282473002: Add FlexfecPacketGenerator. (pt. 9) (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@generalize_ulpfec_packet_generator_into_augmented_packet_generator
Patch Set: Rebase. Created 4 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
« no previous file with comments | « no previous file | webrtc/modules/rtp_rtcp/source/fec_test_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/rtp_rtcp/source/fec_test_helper.h
diff --git a/webrtc/modules/rtp_rtcp/source/fec_test_helper.h b/webrtc/modules/rtp_rtcp/source/fec_test_helper.h
index 36e40652c767cfb0579188a55598f41ad90bf12c..50594ec70e200516fb2c8d5ac935139cf91f43b4 100644
--- a/webrtc/modules/rtp_rtcp/source/fec_test_helper.h
+++ b/webrtc/modules/rtp_rtcp/source/fec_test_helper.h
@@ -88,6 +88,22 @@ class AugmentedPacketGenerator {
uint32_t timestamp_;
};
+// This class generates media and FlexFEC packets for a single frame.
+class FlexfecPacketGenerator : public AugmentedPacketGenerator {
+ public:
+ FlexfecPacketGenerator(uint32_t media_ssrc, uint32_t flexfec_ssrc);
+
+ // Creates a new AugmentedPacket (with RTP headers) from a
+ // FlexFEC packet (without RTP headers).
+ std::unique_ptr<AugmentedPacket> BuildFlexfecPacket(
+ const ForwardErrorCorrection::Packet& packet);
+
+ private:
+ uint32_t flexfec_ssrc_;
+ uint16_t flexfec_seq_num_;
+ uint32_t flexfec_timestamp_;
+};
+
// This class generates media and ULPFEC packets (both encapsulated in RED)
// for a single frame.
class UlpfecPacketGenerator : public AugmentedPacketGenerator {
« no previous file with comments | « no previous file | webrtc/modules/rtp_rtcp/source/fec_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698