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

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

Issue 1484443003: Remove duplicate decoders in BitrateEstimatorTest. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 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/call/bitrate_estimator_tests.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 (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 stats_proxy_.reset( 252 stats_proxy_.reset(
253 new ReceiveStatisticsProxy(config_.rtp.remote_ssrc, clock_)); 253 new ReceiveStatisticsProxy(config_.rtp.remote_ssrc, clock_));
254 254
255 vie_channel_->RegisterReceiveStatisticsProxy(stats_proxy_.get()); 255 vie_channel_->RegisterReceiveStatisticsProxy(stats_proxy_.get());
256 vie_channel_->RegisterReceiveChannelRtcpStatisticsCallback( 256 vie_channel_->RegisterReceiveChannelRtcpStatisticsCallback(
257 stats_proxy_.get()); 257 stats_proxy_.get());
258 vie_channel_->RegisterReceiveChannelRtpStatisticsCallback(stats_proxy_.get()); 258 vie_channel_->RegisterReceiveChannelRtpStatisticsCallback(stats_proxy_.get());
259 vie_channel_->RegisterRtcpPacketTypeCounterObserver(stats_proxy_.get()); 259 vie_channel_->RegisterRtcpPacketTypeCounterObserver(stats_proxy_.get());
260 260
261 RTC_DCHECK(!config_.decoders.empty()); 261 RTC_DCHECK(!config_.decoders.empty());
262 std::set<int> decoder_payload_types;
262 for (size_t i = 0; i < config_.decoders.size(); ++i) { 263 for (size_t i = 0; i < config_.decoders.size(); ++i) {
263 const Decoder& decoder = config_.decoders[i]; 264 const Decoder& decoder = config_.decoders[i];
264 RTC_CHECK(decoder.decoder); 265 RTC_CHECK(decoder.decoder);
266 RTC_CHECK(decoder_payload_types.find(decoder.payload_type) ==
267 decoder_payload_types.end())
268 << "Duplicate payload type (" << decoder.payload_type
269 << ") for different decoders.";
270 decoder_payload_types.insert(decoder.payload_type);
265 RTC_CHECK_EQ(0, 271 RTC_CHECK_EQ(0,
266 vie_channel_->RegisterExternalDecoder( 272 vie_channel_->RegisterExternalDecoder(
267 decoder.payload_type, decoder.decoder, decoder.is_renderer, 273 decoder.payload_type, decoder.decoder, decoder.is_renderer,
268 decoder.is_renderer ? decoder.expected_delay_ms 274 decoder.is_renderer ? decoder.expected_delay_ms
269 : config.render_delay_ms)); 275 : config.render_delay_ms));
270 276
271 VideoCodec codec = CreateDecoderVideoCodec(decoder); 277 VideoCodec codec = CreateDecoderVideoCodec(decoder);
272 278
273 RTC_CHECK_EQ(0, vie_channel_->SetReceiveCodec(codec)); 279 RTC_CHECK_EQ(0, vie_channel_->SetReceiveCodec(codec));
274 } 280 }
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 return 0; 386 return 0;
381 } 387 }
382 388
383 void VideoReceiveStream::SignalNetworkState(NetworkState state) { 389 void VideoReceiveStream::SignalNetworkState(NetworkState state) {
384 vie_channel_->SetRTCPMode(state == kNetworkUp ? config_.rtp.rtcp_mode 390 vie_channel_->SetRTCPMode(state == kNetworkUp ? config_.rtp.rtcp_mode
385 : RtcpMode::kOff); 391 : RtcpMode::kOff);
386 } 392 }
387 393
388 } // namespace internal 394 } // namespace internal
389 } // namespace webrtc 395 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/call/bitrate_estimator_tests.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698