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

Unified Diff: webrtc/video/video_quality_test.h

Issue 2794243002: Making FakeNetworkPipe demux audio and video packets. (Closed)
Patch Set: further fixing Created 3 years, 9 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/video/video_quality_test.h
diff --git a/webrtc/video/video_quality_test.h b/webrtc/video/video_quality_test.h
index 33a1a8a4f0d2b5ccb8e90ce04f4fec7e23d71ce8..1f121a245420962c3e39c938062cd848b154e1a4 100644
--- a/webrtc/video/video_quality_test.h
+++ b/webrtc/video/video_quality_test.h
@@ -21,6 +21,27 @@
namespace webrtc {
+// Helper class to ensure we deliver correct media_type to the receiving call.
nisse-webrtc 2017/04/04 09:57:28 I wasn't aware of this class. I think we can dele
+class MediaTypePacketReceiver : public PacketReceiver {
+ public:
+ MediaTypePacketReceiver(PacketReceiver* packet_receiver, MediaType media_type)
+ : packet_receiver_(packet_receiver), media_type_(media_type) {}
+
+ DeliveryStatus DeliverPacket(MediaType media_type,
+ const uint8_t* packet,
+ size_t length,
+ const PacketTime& packet_time) override {
+ return packet_receiver_->DeliverPacket(media_type_, packet, length,
+ packet_time);
+ }
+
+ private:
+ PacketReceiver* packet_receiver_;
+ const MediaType media_type_;
+
+ RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(MediaTypePacketReceiver);
+};
+
class VideoQualityTest : public test::CallTest {
public:
// Parameters are grouped into smaller structs to make it easier to set

Powered by Google App Engine
This is Rietveld 408576698