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

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

Issue 2668763004: Added VP8 simulcast tests. Fixed analyzer to correctly infer timestamps. (Closed)
Patch Set: reapplyting patch to clean branch Created 3 years, 10 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/video_quality_test.cc ('k') | webrtc/video/video_send_stream.cc » ('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 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 // function itself, another in GetChannel() and a third in 398 // function itself, another in GetChannel() and a third in
399 // GetPlayoutTimestamp. Seems excessive. Anyhow, I'm assuming the function 399 // GetPlayoutTimestamp. Seems excessive. Anyhow, I'm assuming the function
400 // succeeds most of the time, which leads to grabbing a fourth lock. 400 // succeeds most of the time, which leads to grabbing a fourth lock.
401 if (rtp_stream_sync_.GetStreamSyncOffsetInMs(video_frame.timestamp(), 401 if (rtp_stream_sync_.GetStreamSyncOffsetInMs(video_frame.timestamp(),
402 video_frame.render_time_ms(), 402 video_frame.render_time_ms(),
403 &sync_offset_ms, 403 &sync_offset_ms,
404 &estimated_freq_khz)) { 404 &estimated_freq_khz)) {
405 // TODO(tommi): OnSyncOffsetUpdated grabs a lock. 405 // TODO(tommi): OnSyncOffsetUpdated grabs a lock.
406 stats_proxy_.OnSyncOffsetUpdated(sync_offset_ms, estimated_freq_khz); 406 stats_proxy_.OnSyncOffsetUpdated(sync_offset_ms, estimated_freq_khz);
407 } 407 }
408
409 // config_.renderer must never be null if we're getting this callback. 408 // config_.renderer must never be null if we're getting this callback.
410 config_.renderer->OnFrame(video_frame); 409 config_.renderer->OnFrame(video_frame);
411 410
412 // TODO(tommi): OnRenderFrame grabs a lock too. 411 // TODO(tommi): OnRenderFrame grabs a lock too.
413 stats_proxy_.OnRenderedFrame(video_frame); 412 stats_proxy_.OnRenderedFrame(video_frame);
414 } 413 }
415 414
416 // TODO(asapersson): Consider moving callback from video_encoder.h or 415 // TODO(asapersson): Consider moving callback from video_encoder.h or
417 // creating a different callback. 416 // creating a different callback.
418 EncodedImageCallback::Result VideoReceiveStream::OnEncodedImage( 417 EncodedImageCallback::Result VideoReceiveStream::OnEncodedImage(
419 const EncodedImage& encoded_image, 418 const EncodedImage& encoded_image,
420 const CodecSpecificInfo* codec_specific_info, 419 const CodecSpecificInfo* codec_specific_info,
421 const RTPFragmentationHeader* fragmentation) { 420 const RTPFragmentationHeader* fragmentation) {
422 stats_proxy_.OnPreDecode(encoded_image, codec_specific_info); 421 stats_proxy_.OnPreDecode(encoded_image, codec_specific_info);
423 if (config_.pre_decode_callback) { 422 if (config_.pre_decode_callback) {
424 config_.pre_decode_callback->EncodedFrameCallback( 423 config_.pre_decode_callback->EncodedFrameCallback(
425 EncodedFrame(encoded_image._buffer, encoded_image._length, 424 EncodedFrame(encoded_image._buffer, encoded_image._length,
426 encoded_image._frameType)); 425 encoded_image._frameType, encoded_image._encodedWidth,
426 encoded_image._encodedHeight, encoded_image._timeStamp));
427 } 427 }
428 { 428 {
429 rtc::CritScope lock(&ivf_writer_lock_); 429 rtc::CritScope lock(&ivf_writer_lock_);
430 if (ivf_writer_.get()) { 430 if (ivf_writer_.get()) {
431 RTC_DCHECK(codec_specific_info); 431 RTC_DCHECK(codec_specific_info);
432 bool ok = ivf_writer_->WriteFrame(encoded_image, 432 bool ok = ivf_writer_->WriteFrame(encoded_image,
433 codec_specific_info->codecType); 433 codec_specific_info->codecType);
434 RTC_DCHECK(ok); 434 RTC_DCHECK(ok);
435 } 435 }
436 } 436 }
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 if (video_receiver_.Decode(frame.get()) == VCM_OK) 512 if (video_receiver_.Decode(frame.get()) == VCM_OK)
513 rtp_stream_receiver_.FrameDecoded(frame->picture_id); 513 rtp_stream_receiver_.FrameDecoded(frame->picture_id);
514 } else { 514 } else {
515 LOG(LS_WARNING) << "No decodable frame in " << kMaxWaitForFrameMs 515 LOG(LS_WARNING) << "No decodable frame in " << kMaxWaitForFrameMs
516 << " ms, requesting keyframe."; 516 << " ms, requesting keyframe.";
517 RequestKeyFrame(); 517 RequestKeyFrame();
518 } 518 }
519 } 519 }
520 } // namespace internal 520 } // namespace internal
521 } // namespace webrtc 521 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/video_quality_test.cc ('k') | webrtc/video/video_send_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698