summaryrefslogtreecommitdiff
path: root/chromium/third_party/webrtc/test/direct_transport.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-06-18 14:10:49 +0200
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2015-06-18 13:53:24 +0000
commit813fbf95af77a531c57a8c497345ad2c61d475b3 (patch)
tree821b2c8de8365f21b6c9ba17a236fb3006a1d506 /chromium/third_party/webrtc/test/direct_transport.h
parentaf6588f8d723931a298c995fa97259bb7f7deb55 (diff)
downloadqtwebengine-chromium-813fbf95af77a531c57a8c497345ad2c61d475b3.tar.gz
BASELINE: Update chromium to 44.0.2403.47
Change-Id: Ie056fedba95cf5e5c76b30c4b2c80fca4764aa2f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'chromium/third_party/webrtc/test/direct_transport.h')
-rw-r--r--chromium/third_party/webrtc/test/direct_transport.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/chromium/third_party/webrtc/test/direct_transport.h b/chromium/third_party/webrtc/test/direct_transport.h
new file mode 100644
index 00000000000..7295588e80a
--- /dev/null
+++ b/chromium/third_party/webrtc/test/direct_transport.h
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+#ifndef WEBRTC_VIDEO_ENGINE_TEST_COMMON_DIRECT_TRANSPORT_H_
+#define WEBRTC_VIDEO_ENGINE_TEST_COMMON_DIRECT_TRANSPORT_H_
+
+#include <assert.h>
+
+#include <deque>
+
+#include "webrtc/base/criticalsection.h"
+#include "webrtc/base/scoped_ptr.h"
+#include "webrtc/system_wrappers/interface/event_wrapper.h"
+#include "webrtc/system_wrappers/interface/thread_wrapper.h"
+#include "webrtc/test/fake_network_pipe.h"
+#include "webrtc/transport.h"
+
+namespace webrtc {
+
+class Clock;
+class PacketReceiver;
+
+namespace test {
+
+class DirectTransport : public newapi::Transport {
+ public:
+ DirectTransport();
+ explicit DirectTransport(const FakeNetworkPipe::Config& config);
+ ~DirectTransport();
+
+ void SetConfig(const FakeNetworkPipe::Config& config);
+
+ virtual void StopSending();
+ virtual void SetReceiver(PacketReceiver* receiver);
+
+ bool SendRtp(const uint8_t* data, size_t length) override;
+ bool SendRtcp(const uint8_t* data, size_t length) override;
+
+ private:
+ static bool NetworkProcess(void* transport);
+ bool SendPackets();
+
+ rtc::CriticalSection lock_;
+ rtc::scoped_ptr<EventWrapper> packet_event_;
+ rtc::scoped_ptr<ThreadWrapper> thread_;
+ Clock* const clock_;
+
+ bool shutting_down_;
+
+ FakeNetworkPipe fake_network_;
+};
+} // namespace test
+} // namespace webrtc
+
+#endif // WEBRTC_VIDEO_ENGINE_TEST_COMMON_DIRECT_TRANSPORT_H_