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

Side by Side Diff: webrtc/pc/channelmanager.cc

Issue 2521393004: Don't cache video codec list in VideoEngine2. (Closed)
Patch Set: Remove unnecessary test fixture and minor fixes. Created 4 years 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/media/engine/webrtcvideoengine2_unittest.cc ('k') | no next file » | 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 2004 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2004 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 134
135 void ChannelManager::GetSupportedAudioRtpHeaderExtensions( 135 void ChannelManager::GetSupportedAudioRtpHeaderExtensions(
136 RtpHeaderExtensions* ext) const { 136 RtpHeaderExtensions* ext) const {
137 *ext = media_engine_->GetAudioCapabilities().header_extensions; 137 *ext = media_engine_->GetAudioCapabilities().header_extensions;
138 } 138 }
139 139
140 void ChannelManager::GetSupportedVideoCodecs( 140 void ChannelManager::GetSupportedVideoCodecs(
141 std::vector<VideoCodec>* codecs) const { 141 std::vector<VideoCodec>* codecs) const {
142 codecs->clear(); 142 codecs->clear();
143 143
144 std::vector<VideoCodec>::const_iterator it; 144 std::vector<VideoCodec> video_codecs = media_engine_->video_codecs();
145 for (it = media_engine_->video_codecs().begin(); 145 for (const auto& video_codec : video_codecs) {
146 it != media_engine_->video_codecs().end(); ++it) { 146 if (!enable_rtx_ &&
147 if (!enable_rtx_ && _stricmp(kRtxCodecName, it->name.c_str()) == 0) { 147 _stricmp(kRtxCodecName, video_codec.name.c_str()) == 0) {
148 continue; 148 continue;
149 } 149 }
150 codecs->push_back(*it); 150 codecs->push_back(video_codec);
151 } 151 }
152 } 152 }
153 153
154 void ChannelManager::GetSupportedVideoRtpHeaderExtensions( 154 void ChannelManager::GetSupportedVideoRtpHeaderExtensions(
155 RtpHeaderExtensions* ext) const { 155 RtpHeaderExtensions* ext) const {
156 *ext = media_engine_->GetVideoCapabilities().header_extensions; 156 *ext = media_engine_->GetVideoCapabilities().header_extensions;
157 } 157 }
158 158
159 void ChannelManager::GetSupportedDataCodecs( 159 void ChannelManager::GetSupportedDataCodecs(
160 std::vector<DataCodec>* codecs) const { 160 std::vector<DataCodec>* codecs) const {
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 media_engine_.get(), file, max_size_bytes)); 411 media_engine_.get(), file, max_size_bytes));
412 } 412 }
413 413
414 void ChannelManager::StopAecDump() { 414 void ChannelManager::StopAecDump() {
415 worker_thread_->Invoke<void>( 415 worker_thread_->Invoke<void>(
416 RTC_FROM_HERE, 416 RTC_FROM_HERE,
417 Bind(&MediaEngineInterface::StopAecDump, media_engine_.get())); 417 Bind(&MediaEngineInterface::StopAecDump, media_engine_.get()));
418 } 418 }
419 419
420 } // namespace cricket 420 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/media/engine/webrtcvideoengine2_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698