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

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

Issue 2745523002: Add FullStack test for simulcast screenshare mode. (Closed)
Patch Set: Implement Stefan@ comments Created 3 years, 9 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 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 stats_proxy_.OnRenderedFrame(video_frame); 387 stats_proxy_.OnRenderedFrame(video_frame);
388 } 388 }
389 389
390 // TODO(asapersson): Consider moving callback from video_encoder.h or 390 // TODO(asapersson): Consider moving callback from video_encoder.h or
391 // creating a different callback. 391 // creating a different callback.
392 EncodedImageCallback::Result VideoReceiveStream::OnEncodedImage( 392 EncodedImageCallback::Result VideoReceiveStream::OnEncodedImage(
393 const EncodedImage& encoded_image, 393 const EncodedImage& encoded_image,
394 const CodecSpecificInfo* codec_specific_info, 394 const CodecSpecificInfo* codec_specific_info,
395 const RTPFragmentationHeader* fragmentation) { 395 const RTPFragmentationHeader* fragmentation) {
396 stats_proxy_.OnPreDecode(encoded_image, codec_specific_info); 396 stats_proxy_.OnPreDecode(encoded_image, codec_specific_info);
397 size_t simulcast_idx = 0;
398 if (codec_specific_info->codecType == kVideoCodecVP8) {
399 simulcast_idx = codec_specific_info->codecSpecific.VP8.simulcastIdx;
400 }
397 if (config_.pre_decode_callback) { 401 if (config_.pre_decode_callback) {
398 config_.pre_decode_callback->EncodedFrameCallback( 402 config_.pre_decode_callback->EncodedFrameCallback(EncodedFrame(
399 EncodedFrame(encoded_image._buffer, encoded_image._length, 403 encoded_image._buffer, encoded_image._length, encoded_image._frameType,
400 encoded_image._frameType, encoded_image._encodedWidth, 404 simulcast_idx, encoded_image._timeStamp));
401 encoded_image._encodedHeight, encoded_image._timeStamp));
402 } 405 }
403 { 406 {
404 rtc::CritScope lock(&ivf_writer_lock_); 407 rtc::CritScope lock(&ivf_writer_lock_);
405 if (ivf_writer_.get()) { 408 if (ivf_writer_.get()) {
406 RTC_DCHECK(codec_specific_info); 409 RTC_DCHECK(codec_specific_info);
407 bool ok = ivf_writer_->WriteFrame(encoded_image, 410 bool ok = ivf_writer_->WriteFrame(encoded_image,
408 codec_specific_info->codecType); 411 codec_specific_info->codecType);
409 RTC_DCHECK(ok); 412 RTC_DCHECK(ok);
410 } 413 }
411 } 414 }
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 rtp_stream_receiver_.FrameDecoded(frame->picture_id); 491 rtp_stream_receiver_.FrameDecoded(frame->picture_id);
489 } else { 492 } else {
490 LOG(LS_WARNING) << "No decodable frame in " << kMaxWaitForFrameMs 493 LOG(LS_WARNING) << "No decodable frame in " << kMaxWaitForFrameMs
491 << " ms, requesting keyframe."; 494 << " ms, requesting keyframe.";
492 RequestKeyFrame(); 495 RequestKeyFrame();
493 } 496 }
494 return true; 497 return true;
495 } 498 }
496 } // namespace internal 499 } // namespace internal
497 } // namespace webrtc 500 } // 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