OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |