| 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 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 const RTPFragmentationHeader* fragmentation) { | 398 const RTPFragmentationHeader* fragmentation) { |
| 399 stats_proxy_.OnPreDecode(encoded_image, codec_specific_info); | 399 stats_proxy_.OnPreDecode(encoded_image, codec_specific_info); |
| 400 if (config_.pre_decode_callback) { | 400 if (config_.pre_decode_callback) { |
| 401 // TODO(asapersson): Remove EncodedFrameCallbackAdapter. | 401 // TODO(asapersson): Remove EncodedFrameCallbackAdapter. |
| 402 encoded_frame_proxy_.Encoded( | 402 encoded_frame_proxy_.Encoded( |
| 403 encoded_image, codec_specific_info, fragmentation); | 403 encoded_image, codec_specific_info, fragmentation); |
| 404 } | 404 } |
| 405 if (kEnableFrameRecording) { | 405 if (kEnableFrameRecording) { |
| 406 if (!ivf_writer_.get()) { | 406 if (!ivf_writer_.get()) { |
| 407 RTC_DCHECK(codec_specific_info); | 407 RTC_DCHECK(codec_specific_info); |
| 408 RtpVideoCodecTypes rtp_codec_type; | |
| 409 switch (codec_specific_info->codecType) { | |
| 410 case kVideoCodecVP8: | |
| 411 rtp_codec_type = kRtpVideoVp8; | |
| 412 break; | |
| 413 case kVideoCodecVP9: | |
| 414 rtp_codec_type = kRtpVideoVp9; | |
| 415 break; | |
| 416 case kVideoCodecH264: | |
| 417 rtp_codec_type = kRtpVideoH264; | |
| 418 break; | |
| 419 default: | |
| 420 rtp_codec_type = kRtpVideoNone; | |
| 421 RTC_NOTREACHED() << "Unsupported codec " | |
| 422 << codec_specific_info->codecType; | |
| 423 } | |
| 424 std::ostringstream oss; | 408 std::ostringstream oss; |
| 425 oss << "receive_bitstream_ssrc_" << config_.rtp.remote_ssrc << ".ivf"; | 409 oss << "receive_bitstream_ssrc_" << config_.rtp.remote_ssrc << ".ivf"; |
| 426 ivf_writer_ = IvfFileWriter::Open(oss.str(), rtp_codec_type); | 410 ivf_writer_ = |
| 411 IvfFileWriter::Open(oss.str(), codec_specific_info->codecType); |
| 427 } | 412 } |
| 428 if (ivf_writer_.get()) { | 413 if (ivf_writer_.get()) { |
| 429 bool ok = ivf_writer_->WriteFrame(encoded_image); | 414 bool ok = ivf_writer_->WriteFrame(encoded_image); |
| 430 RTC_DCHECK(ok); | 415 RTC_DCHECK(ok); |
| 431 } | 416 } |
| 432 } | 417 } |
| 433 | 418 |
| 434 return 0; | 419 return 0; |
| 435 } | 420 } |
| 436 | 421 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 453 const std::vector<uint16_t>& sequence_numbers) { | 438 const std::vector<uint16_t>& sequence_numbers) { |
| 454 rtp_rtcp_->SendNack(sequence_numbers); | 439 rtp_rtcp_->SendNack(sequence_numbers); |
| 455 } | 440 } |
| 456 | 441 |
| 457 void VideoReceiveStream::RequestKeyFrame() { | 442 void VideoReceiveStream::RequestKeyFrame() { |
| 458 rtp_rtcp_->RequestKeyFrame(); | 443 rtp_rtcp_->RequestKeyFrame(); |
| 459 } | 444 } |
| 460 | 445 |
| 461 } // namespace internal | 446 } // namespace internal |
| 462 } // namespace webrtc | 447 } // namespace webrtc |
| OLD | NEW |