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