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

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

Issue 1600973002: Initialize VideoEncoder objects asynchronously. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rename new_codec_settings Created 4 years, 11 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/video/payload_router.h ('k') | webrtc/video/payload_router_unittest.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) 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
(...skipping 11 matching lines...) Expand all
22 active_(false) {} 22 active_(false) {}
23 23
24 PayloadRouter::~PayloadRouter() {} 24 PayloadRouter::~PayloadRouter() {}
25 25
26 size_t PayloadRouter::DefaultMaxPayloadLength() { 26 size_t PayloadRouter::DefaultMaxPayloadLength() {
27 const size_t kIpUdpSrtpLength = 44; 27 const size_t kIpUdpSrtpLength = 44;
28 return IP_PACKET_SIZE - kIpUdpSrtpLength; 28 return IP_PACKET_SIZE - kIpUdpSrtpLength;
29 } 29 }
30 30
31 void PayloadRouter::SetSendingRtpModules( 31 void PayloadRouter::SetSendingRtpModules(
32 const std::list<RtpRtcp*>& rtp_modules) { 32 const std::vector<RtpRtcp*>& rtp_modules) {
33 CriticalSectionScoped cs(crit_.get()); 33 CriticalSectionScoped cs(crit_.get());
34 rtp_modules_.clear(); 34 rtp_modules_ = rtp_modules;
35 rtp_modules_.reserve(rtp_modules.size());
36 for (auto* rtp_module : rtp_modules) {
37 rtp_modules_.push_back(rtp_module);
38 }
39 } 35 }
40 36
41 void PayloadRouter::set_active(bool active) { 37 void PayloadRouter::set_active(bool active) {
42 CriticalSectionScoped cs(crit_.get()); 38 CriticalSectionScoped cs(crit_.get());
43 active_ = active; 39 active_ = active;
44 } 40 }
45 41
46 bool PayloadRouter::active() { 42 bool PayloadRouter::active() {
47 CriticalSectionScoped cs(crit_.get()); 43 CriticalSectionScoped cs(crit_.get());
48 return active_ && !rtp_modules_.empty(); 44 return active_ && !rtp_modules_.empty();
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 CriticalSectionScoped cs(crit_.get()); 88 CriticalSectionScoped cs(crit_.get());
93 for (auto* rtp_module : rtp_modules_) { 89 for (auto* rtp_module : rtp_modules_) {
94 size_t module_payload_length = rtp_module->MaxDataPayloadLength(); 90 size_t module_payload_length = rtp_module->MaxDataPayloadLength();
95 if (module_payload_length < min_payload_length) 91 if (module_payload_length < min_payload_length)
96 min_payload_length = module_payload_length; 92 min_payload_length = module_payload_length;
97 } 93 }
98 return min_payload_length; 94 return min_payload_length;
99 } 95 }
100 96
101 } // namespace webrtc 97 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/payload_router.h ('k') | webrtc/video/payload_router_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698