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

Side by Side Diff: webrtc/test/direct_transport.h

Issue 2774463003: Don't hardcode MediaType::ANY in FakeNetworkPipe. (Closed)
Patch Set: Update FakeCall::DeliverPacket, for consistency with Call::DeliverRtp. 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 unified diff | Download patch
« no previous file with comments | « webrtc/test/call_test.cc ('k') | webrtc/test/direct_transport.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 #ifndef WEBRTC_TEST_DIRECT_TRANSPORT_H_ 10 #ifndef WEBRTC_TEST_DIRECT_TRANSPORT_H_
11 #define WEBRTC_TEST_DIRECT_TRANSPORT_H_ 11 #define WEBRTC_TEST_DIRECT_TRANSPORT_H_
12 12
13 #include <assert.h> 13 #include <assert.h>
14 14
15 #include <deque> 15 #include <deque>
16 16
17 #include "webrtc/api/call/transport.h" 17 #include "webrtc/api/call/transport.h"
18 #include "webrtc/base/criticalsection.h" 18 #include "webrtc/base/criticalsection.h"
19 #include "webrtc/base/event.h" 19 #include "webrtc/base/event.h"
20 #include "webrtc/base/platform_thread.h" 20 #include "webrtc/base/platform_thread.h"
21 #include "webrtc/call/call.h"
21 #include "webrtc/test/fake_network_pipe.h" 22 #include "webrtc/test/fake_network_pipe.h"
22 23
23 namespace webrtc { 24 namespace webrtc {
24 25
25 class Call;
26 class Clock; 26 class Clock;
27 class PacketReceiver; 27 class PacketReceiver;
28 28
29 namespace test { 29 namespace test {
30 30
31 class DirectTransport : public Transport { 31 class DirectTransport : public Transport {
32 public: 32 public:
33 explicit DirectTransport(Call* send_call); 33 DirectTransport(Call* send_call, MediaType media_type);
34 DirectTransport(const FakeNetworkPipe::Config& config, Call* send_call); 34 DirectTransport(const FakeNetworkPipe::Config& config, Call* send_call,
35 MediaType media_type);
36 // These deprecated variants always use MediaType::VIDEO.
37 RTC_DEPRECATED explicit DirectTransport(Call* send_call)
38 : DirectTransport(send_call, MediaType::VIDEO) {}
39
40 RTC_DEPRECATED DirectTransport(const FakeNetworkPipe::Config& config,
41 Call* send_call)
42 : DirectTransport(config, send_call, MediaType::VIDEO) {}
43
35 ~DirectTransport(); 44 ~DirectTransport();
36 45
37 void SetConfig(const FakeNetworkPipe::Config& config); 46 void SetConfig(const FakeNetworkPipe::Config& config);
38 47
39 virtual void StopSending(); 48 virtual void StopSending();
40 // TODO(holmer): Look into moving this to the constructor. 49 // TODO(holmer): Look into moving this to the constructor.
41 virtual void SetReceiver(PacketReceiver* receiver); 50 virtual void SetReceiver(PacketReceiver* receiver);
42 51
43 bool SendRtp(const uint8_t* data, 52 bool SendRtp(const uint8_t* data,
44 size_t length, 53 size_t length,
(...skipping 13 matching lines...) Expand all
58 Clock* const clock_; 67 Clock* const clock_;
59 68
60 bool shutting_down_; 69 bool shutting_down_;
61 70
62 FakeNetworkPipe fake_network_; 71 FakeNetworkPipe fake_network_;
63 }; 72 };
64 } // namespace test 73 } // namespace test
65 } // namespace webrtc 74 } // namespace webrtc
66 75
67 #endif // WEBRTC_TEST_DIRECT_TRANSPORT_H_ 76 #endif // WEBRTC_TEST_DIRECT_TRANSPORT_H_
OLDNEW
« no previous file with comments | « webrtc/test/call_test.cc ('k') | webrtc/test/direct_transport.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698