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

Side by Side Diff: webrtc/media/engine/webrtcvideoengine.cc

Issue 3007433002: Let CreateVideoDecoder take a cricket::VideoCodec. (Closed)
Patch Set: return a value from unused function Created 3 years, 3 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/media/engine/webrtcvideodecoderfactory.h ('k') | webrtc/sdk/BUILD.gn » ('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) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 2170 matching lines...) Expand 10 before | Expand all | Expand 10 after
2181 AllocatedDecoder decoder = (*old_decoders)[i]; 2181 AllocatedDecoder decoder = (*old_decoders)[i];
2182 (*old_decoders)[i] = old_decoders->back(); 2182 (*old_decoders)[i] = old_decoders->back();
2183 old_decoders->pop_back(); 2183 old_decoders->pop_back();
2184 return decoder; 2184 return decoder;
2185 } 2185 }
2186 } 2186 }
2187 2187
2188 if (external_decoder_factory_ != NULL) { 2188 if (external_decoder_factory_ != NULL) {
2189 webrtc::VideoDecoder* decoder = 2189 webrtc::VideoDecoder* decoder =
2190 external_decoder_factory_->CreateVideoDecoderWithParams( 2190 external_decoder_factory_->CreateVideoDecoderWithParams(
2191 type, {stream_params_.id}); 2191 codec, {stream_params_.id});
2192 if (decoder != NULL) { 2192 if (decoder != NULL) {
2193 return AllocatedDecoder(decoder, type, true /* is_external */); 2193 return AllocatedDecoder(decoder, type, true /* is_external */);
2194 } 2194 }
2195 } 2195 }
2196 2196
2197 InternalDecoderFactory internal_decoder_factory; 2197 InternalDecoderFactory internal_decoder_factory;
2198 return AllocatedDecoder(internal_decoder_factory.CreateVideoDecoderWithParams( 2198 return AllocatedDecoder(internal_decoder_factory.CreateVideoDecoderWithParams(
2199 type, {stream_params_.id}), 2199 codec, {stream_params_.id}),
2200 type, false /* is_external */); 2200 type, false /* is_external */);
2201 } 2201 }
2202 2202
2203 void WebRtcVideoChannel::WebRtcVideoReceiveStream::ConfigureCodecs( 2203 void WebRtcVideoChannel::WebRtcVideoReceiveStream::ConfigureCodecs(
2204 const std::vector<VideoCodecSettings>& recv_codecs, 2204 const std::vector<VideoCodecSettings>& recv_codecs,
2205 std::vector<AllocatedDecoder>* old_decoders) { 2205 std::vector<AllocatedDecoder>* old_decoders) {
2206 *old_decoders = allocated_decoders_; 2206 *old_decoders = allocated_decoders_;
2207 allocated_decoders_.clear(); 2207 allocated_decoders_.clear();
2208 config_.decoders.clear(); 2208 config_.decoders.clear();
2209 for (size_t i = 0; i < recv_codecs.size(); ++i) { 2209 for (size_t i = 0; i < recv_codecs.size(); ++i) {
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
2649 stream.temporal_layer_thresholds_bps.resize(GetDefaultVp9TemporalLayers() - 2649 stream.temporal_layer_thresholds_bps.resize(GetDefaultVp9TemporalLayers() -
2650 1); 2650 1);
2651 } 2651 }
2652 2652
2653 std::vector<webrtc::VideoStream> streams; 2653 std::vector<webrtc::VideoStream> streams;
2654 streams.push_back(stream); 2654 streams.push_back(stream);
2655 return streams; 2655 return streams;
2656 } 2656 }
2657 2657
2658 } // namespace cricket 2658 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/media/engine/webrtcvideodecoderfactory.h ('k') | webrtc/sdk/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698