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

Unified Diff: webrtc/test/fake_network_pipe.h

Issue 2794243002: Making FakeNetworkPipe demux audio and video packets. (Closed)
Patch Set: new solution Created 3 years, 8 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/test/fake_network_pipe.h
diff --git a/webrtc/test/fake_network_pipe.h b/webrtc/test/fake_network_pipe.h
index adf76c3a7bae731b05b6498aa792c747d0d96797..6405dc0a485fd087d8b75d4ee222cea9e9609e7f 100644
--- a/webrtc/test/fake_network_pipe.h
+++ b/webrtc/test/fake_network_pipe.h
@@ -11,10 +11,11 @@
#ifndef WEBRTC_TEST_FAKE_NETWORK_PIPE_H_
#define WEBRTC_TEST_FAKE_NETWORK_PIPE_H_
-#include <memory>
-#include <set>
#include <string.h>
+#include <map>
+#include <memory>
#include <queue>
+#include <set>
#include "webrtc/base/constructormagic.h"
#include "webrtc/base/criticalsection.h"
@@ -83,10 +84,12 @@ class FakeNetworkPipe {
int avg_burst_loss_length = -1;
};
- FakeNetworkPipe(Clock* clock, const FakeNetworkPipe::Config& config,
- MediaType media_type);
FakeNetworkPipe(Clock* clock,
- const FakeNetworkPipe::Config& config, MediaType media_type,
+ const FakeNetworkPipe::Config& config,
+ const std::map<uint8_t, MediaType>& payload_type_map);
+ FakeNetworkPipe(Clock* clock,
+ const FakeNetworkPipe::Config& config,
+ const std::map<uint8_t, MediaType>& payload_type_map,
uint64_t seed);
~FakeNetworkPipe();
@@ -112,7 +115,6 @@ class FakeNetworkPipe {
private:
Clock* const clock_;
- const MediaType media_type_;
rtc::CriticalSection lock_;
PacketReceiver* packet_receiver_;
std::queue<NetworkPacket*> capacity_link_;
@@ -150,6 +152,8 @@ class FakeNetworkPipe {
int64_t last_log_time_;
+ const std::map<uint8_t, MediaType> payload_type_map_;
+
RTC_DISALLOW_COPY_AND_ASSIGN(FakeNetworkPipe);
};

Powered by Google App Engine
This is Rietveld 408576698