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

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

Issue 1315413002: Wire up currently-received video codec to stats. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: feedback Created 5 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/video/receive_statistics_proxy.cc ('k') | webrtc/video_engine/vie_channel.h » ('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) 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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 config_.rtp.fec.red_payload_type); 209 config_.rtp.fec.red_payload_type);
210 } 210 }
211 } 211 }
212 212
213 if (config.rtp.rtcp_xr.receiver_reference_time_report) 213 if (config.rtp.rtcp_xr.receiver_reference_time_report)
214 vie_channel_->SetRtcpXrRrtrStatus(true); 214 vie_channel_->SetRtcpXrRrtrStatus(true);
215 215
216 stats_proxy_.reset( 216 stats_proxy_.reset(
217 new ReceiveStatisticsProxy(config_.rtp.remote_ssrc, clock_)); 217 new ReceiveStatisticsProxy(config_.rtp.remote_ssrc, clock_));
218 218
219 vie_channel_->RegisterReceiveStatisticsProxy(stats_proxy_.get());
219 vie_channel_->RegisterReceiveChannelRtcpStatisticsCallback( 220 vie_channel_->RegisterReceiveChannelRtcpStatisticsCallback(
220 stats_proxy_.get()); 221 stats_proxy_.get());
221 vie_channel_->RegisterReceiveChannelRtpStatisticsCallback(stats_proxy_.get()); 222 vie_channel_->RegisterReceiveChannelRtpStatisticsCallback(stats_proxy_.get());
222 vie_channel_->RegisterRtcpPacketTypeCounterObserver(stats_proxy_.get()); 223 vie_channel_->RegisterRtcpPacketTypeCounterObserver(stats_proxy_.get());
223 vie_channel_->RegisterCodecObserver(stats_proxy_.get());
224
225 vie_channel_->RegisterReceiveStatisticsProxy(stats_proxy_.get());
226 224
227 DCHECK(!config_.decoders.empty()); 225 DCHECK(!config_.decoders.empty());
228 for (size_t i = 0; i < config_.decoders.size(); ++i) { 226 for (size_t i = 0; i < config_.decoders.size(); ++i) {
229 const Decoder& decoder = config_.decoders[i]; 227 const Decoder& decoder = config_.decoders[i];
230 CHECK_EQ(0, vie_channel_->RegisterExternalDecoder( 228 CHECK_EQ(0, vie_channel_->RegisterExternalDecoder(
231 decoder.payload_type, decoder.decoder, decoder.is_renderer, 229 decoder.payload_type, decoder.decoder, decoder.is_renderer,
232 decoder.is_renderer ? decoder.expected_delay_ms 230 decoder.is_renderer ? decoder.expected_delay_ms
233 : config.render_delay_ms)); 231 : config.render_delay_ms));
234 232
235 VideoCodec codec = CreateDecoderVideoCodec(decoder); 233 VideoCodec codec = CreateDecoderVideoCodec(decoder);
(...skipping 12 matching lines...) Expand all
248 } 246 }
249 247
250 VideoReceiveStream::~VideoReceiveStream() { 248 VideoReceiveStream::~VideoReceiveStream() {
251 incoming_video_stream_->Stop(); 249 incoming_video_stream_->Stop();
252 vie_channel_->RegisterPreRenderCallback(nullptr); 250 vie_channel_->RegisterPreRenderCallback(nullptr);
253 vie_channel_->RegisterPreDecodeImageCallback(nullptr); 251 vie_channel_->RegisterPreDecodeImageCallback(nullptr);
254 252
255 for (size_t i = 0; i < config_.decoders.size(); ++i) 253 for (size_t i = 0; i < config_.decoders.size(); ++i)
256 vie_channel_->DeRegisterExternalDecoder(config_.decoders[i].payload_type); 254 vie_channel_->DeRegisterExternalDecoder(config_.decoders[i].payload_type);
257 255
258 vie_channel_->RegisterCodecObserver(nullptr);
259 vie_channel_->RegisterReceiveChannelRtpStatisticsCallback(nullptr);
260 vie_channel_->RegisterReceiveChannelRtcpStatisticsCallback(nullptr);
261 vie_channel_->RegisterRtcpPacketTypeCounterObserver(nullptr);
262 channel_group_->DeleteChannel(channel_id_); 256 channel_group_->DeleteChannel(channel_id_);
263 } 257 }
264 258
265 void VideoReceiveStream::Start() { 259 void VideoReceiveStream::Start() {
266 transport_adapter_.Enable(); 260 transport_adapter_.Enable();
267 incoming_video_stream_->Start(); 261 incoming_video_stream_->Start();
268 vie_channel_->StartReceive(); 262 vie_channel_->StartReceive();
269 } 263 }
270 264
271 void VideoReceiveStream::Stop() { 265 void VideoReceiveStream::Stop() {
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 case newapi::kRtcpCompound: 329 case newapi::kRtcpCompound:
336 vie_channel_->SetRTCPMode(kRtcpCompound); 330 vie_channel_->SetRTCPMode(kRtcpCompound);
337 break; 331 break;
338 case newapi::kRtcpReducedSize: 332 case newapi::kRtcpReducedSize:
339 vie_channel_->SetRTCPMode(kRtcpNonCompound); 333 vie_channel_->SetRTCPMode(kRtcpNonCompound);
340 break; 334 break;
341 } 335 }
342 } 336 }
343 } // namespace internal 337 } // namespace internal
344 } // namespace webrtc 338 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/receive_statistics_proxy.cc ('k') | webrtc/video_engine/vie_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698