Index: webrtc/test/direct_transport.h |
diff --git a/webrtc/test/direct_transport.h b/webrtc/test/direct_transport.h |
index 0698992d5a871f48b266ae718cf11116af0fd3e2..e03267f842d37c1b13e912804f7bf81c4db54324 100644 |
--- a/webrtc/test/direct_transport.h |
+++ b/webrtc/test/direct_transport.h |
@@ -16,10 +16,9 @@ |
#include "webrtc/api/call/transport.h" |
#include "webrtc/call/call.h" |
-#include "webrtc/rtc_base/criticalsection.h" |
-#include "webrtc/rtc_base/event.h" |
-#include "webrtc/rtc_base/platform_thread.h" |
+#include "webrtc/rtc_base/thread_checker.h" |
#include "webrtc/test/fake_network_pipe.h" |
+#include "webrtc/test/single_threaded_task_queue.h" |
namespace webrtc { |
@@ -30,18 +29,25 @@ namespace test { |
class DirectTransport : public Transport { |
public: |
- DirectTransport(Call* send_call, |
+ DirectTransport(SingleThreadedTaskQueueForTesting* task_queue, |
+ Call* send_call, |
const std::map<uint8_t, MediaType>& payload_type_map); |
- DirectTransport(const FakeNetworkPipe::Config& config, |
+ |
+ DirectTransport(SingleThreadedTaskQueueForTesting* task_queue, |
+ const FakeNetworkPipe::Config& config, |
Call* send_call, |
const std::map<uint8_t, MediaType>& payload_type_map); |
- DirectTransport(const FakeNetworkPipe::Config& config, |
+ |
+ DirectTransport(SingleThreadedTaskQueueForTesting* task_queue, |
+ const FakeNetworkPipe::Config& config, |
Call* send_call, |
std::unique_ptr<Demuxer> demuxer); |
// This deprecated variant always uses MediaType::VIDEO. |
RTC_DEPRECATED explicit DirectTransport(Call* send_call) |
: DirectTransport( |
+ // TODO(eladalon): !!! Deprecate older APIs gently. (Before landing.) |
+ nullptr, |
FakeNetworkPipe::Config(), |
send_call, |
std::unique_ptr<Demuxer>(new ForceDemuxer(MediaType::VIDEO))) {} |
@@ -50,7 +56,6 @@ class DirectTransport : public Transport { |
void SetConfig(const FakeNetworkPipe::Config& config); |
- virtual void StopSending(); |
nisse-webrtc
2017/08/21 09:07:07
Ok, so you're deleting this method? Worth mentioni
eladalon
2017/08/21 10:56:53
Done.
|
// TODO(holmer): Look into moving this to the constructor. |
virtual void SetReceiver(PacketReceiver* receiver); |
@@ -77,18 +82,17 @@ class DirectTransport : public Transport { |
RTC_DISALLOW_COPY_AND_ASSIGN(ForceDemuxer); |
}; |
- static bool NetworkProcess(void* transport); |
- bool SendPackets(); |
+ void SendPackets(); |
- rtc::CriticalSection lock_; |
Call* const send_call_; |
- rtc::Event packet_event_; |
- rtc::PlatformThread thread_; |
Clock* const clock_; |
- bool shutting_down_; |
+ SingleThreadedTaskQueueForTesting* const task_queue_; |
+ SingleThreadedTaskQueueForTesting::TaskId next_scheduled_task_; |
FakeNetworkPipe fake_network_; |
+ |
+ rtc::ThreadChecker thread_checker_; |
}; |
} // namespace test |
} // namespace webrtc |