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

Side by Side Diff: webrtc/video/payload_router.h

Issue 1686323003: Use std::vector in the PayloadRouter interface. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | webrtc/video/payload_router.cc » ('j') | webrtc/video/vie_channel.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 10
11 #ifndef WEBRTC_VIDEO_PAYLOAD_ROUTER_H_ 11 #ifndef WEBRTC_VIDEO_PAYLOAD_ROUTER_H_
12 #define WEBRTC_VIDEO_PAYLOAD_ROUTER_H_ 12 #define WEBRTC_VIDEO_PAYLOAD_ROUTER_H_
13 13
14 #include <list>
15 #include <vector> 14 #include <vector>
16 15
17 #include "webrtc/base/constructormagic.h" 16 #include "webrtc/base/constructormagic.h"
18 #include "webrtc/base/criticalsection.h" 17 #include "webrtc/base/criticalsection.h"
19 #include "webrtc/base/scoped_ptr.h" 18 #include "webrtc/base/scoped_ptr.h"
20 #include "webrtc/base/thread_annotations.h" 19 #include "webrtc/base/thread_annotations.h"
21 #include "webrtc/common_types.h" 20 #include "webrtc/common_types.h"
22 #include "webrtc/system_wrappers/include/atomic32.h" 21 #include "webrtc/system_wrappers/include/atomic32.h"
23 22
24 namespace webrtc { 23 namespace webrtc {
25 24
26 class RTPFragmentationHeader; 25 class RTPFragmentationHeader;
27 class RtpRtcp; 26 class RtpRtcp;
28 struct RTPVideoHeader; 27 struct RTPVideoHeader;
29 28
30 // PayloadRouter routes outgoing data to the correct sending RTP module, based 29 // PayloadRouter routes outgoing data to the correct sending RTP module, based
31 // on the simulcast layer in RTPVideoHeader. 30 // on the simulcast layer in RTPVideoHeader.
32 class PayloadRouter { 31 class PayloadRouter {
33 public: 32 public:
34 PayloadRouter(); 33 PayloadRouter();
35 ~PayloadRouter(); 34 ~PayloadRouter();
36 35
37 static size_t DefaultMaxPayloadLength(); 36 static size_t DefaultMaxPayloadLength();
38 37
39 // Rtp modules are assumed to be sorted in simulcast index order. 38 // Rtp modules are assumed to be sorted in simulcast index order.
40 void SetSendingRtpModules(const std::list<RtpRtcp*>& rtp_modules); 39 void SetSendingRtpModules(const std::vector<RtpRtcp*>& rtp_modules);
41 40
42 // PayloadRouter will only route packets if being active, all packets will be 41 // PayloadRouter will only route packets if being active, all packets will be
43 // dropped otherwise. 42 // dropped otherwise.
44 void set_active(bool active); 43 void set_active(bool active);
45 bool active(); 44 bool active();
46 45
47 // Input parameters according to the signature of RtpRtcp::SendOutgoingData. 46 // Input parameters according to the signature of RtpRtcp::SendOutgoingData.
48 // Returns true if the packet was routed / sent, false otherwise. 47 // Returns true if the packet was routed / sent, false otherwise.
49 bool RoutePayload(FrameType frame_type, 48 bool RoutePayload(FrameType frame_type,
50 int8_t payload_type, 49 int8_t payload_type,
(...skipping 25 matching lines...) Expand all
76 bool active_ GUARDED_BY(crit_); 75 bool active_ GUARDED_BY(crit_);
77 76
78 Atomic32 ref_count_; 77 Atomic32 ref_count_;
79 78
80 RTC_DISALLOW_COPY_AND_ASSIGN(PayloadRouter); 79 RTC_DISALLOW_COPY_AND_ASSIGN(PayloadRouter);
81 }; 80 };
82 81
83 } // namespace webrtc 82 } // namespace webrtc
84 83
85 #endif // WEBRTC_VIDEO_PAYLOAD_ROUTER_H_ 84 #endif // WEBRTC_VIDEO_PAYLOAD_ROUTER_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/video/payload_router.cc » ('j') | webrtc/video/vie_channel.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698