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

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

Issue 1903193002: Revert of Deprecate VCMPacketizationCallback::SendData and use EncodedImageCallback instead. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 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/send_statistics_proxy_unittest.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 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 }
408 std::ostringstream oss; 424 std::ostringstream oss;
409 oss << "receive_bitstream_ssrc_" << config_.rtp.remote_ssrc << ".ivf"; 425 oss << "receive_bitstream_ssrc_" << config_.rtp.remote_ssrc << ".ivf";
410 ivf_writer_ = 426 ivf_writer_ = IvfFileWriter::Open(oss.str(), rtp_codec_type);
411 IvfFileWriter::Open(oss.str(), codec_specific_info->codecType);
412 } 427 }
413 if (ivf_writer_.get()) { 428 if (ivf_writer_.get()) {
414 bool ok = ivf_writer_->WriteFrame(encoded_image); 429 bool ok = ivf_writer_->WriteFrame(encoded_image);
415 RTC_DCHECK(ok); 430 RTC_DCHECK(ok);
416 } 431 }
417 } 432 }
418 433
419 return 0; 434 return 0;
420 } 435 }
421 436
(...skipping 16 matching lines...) Expand all
438 const std::vector<uint16_t>& sequence_numbers) { 453 const std::vector<uint16_t>& sequence_numbers) {
439 rtp_rtcp_->SendNack(sequence_numbers); 454 rtp_rtcp_->SendNack(sequence_numbers);
440 } 455 }
441 456
442 void VideoReceiveStream::RequestKeyFrame() { 457 void VideoReceiveStream::RequestKeyFrame() {
443 rtp_rtcp_->RequestKeyFrame(); 458 rtp_rtcp_->RequestKeyFrame();
444 } 459 }
445 460
446 } // namespace internal 461 } // namespace internal
447 } // namespace webrtc 462 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/send_statistics_proxy_unittest.cc ('k') | webrtc/video/video_send_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698