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

Side by Side Diff: webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc

Issue 2474433008: Revert of Remove deprected functions from EncodedImageCallback and RtpRtcp (Closed)
Patch Set: Rebase Created 4 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 RTPFragmentationHeader frag_header; 370 RTPFragmentationHeader frag_header;
371 RtpFragmentize(&encoded_image_, &encoded_image_buffer_, *frame_buffer, &info, 371 RtpFragmentize(&encoded_image_, &encoded_image_buffer_, *frame_buffer, &info,
372 &frag_header); 372 &frag_header);
373 373
374 // Encoder can skip frames to save bandwidth in which case 374 // Encoder can skip frames to save bandwidth in which case
375 // |encoded_image_._length| == 0. 375 // |encoded_image_._length| == 0.
376 if (encoded_image_._length > 0) { 376 if (encoded_image_._length > 0) {
377 // Deliver encoded image. 377 // Deliver encoded image.
378 CodecSpecificInfo codec_specific; 378 CodecSpecificInfo codec_specific;
379 codec_specific.codecType = kVideoCodecH264; 379 codec_specific.codecType = kVideoCodecH264;
380 encoded_image_callback_->OnEncodedImage(encoded_image_, &codec_specific, 380 encoded_image_callback_->Encoded(encoded_image_, &codec_specific,
381 &frag_header); 381 &frag_header);
382 382
383 // Parse and report QP. 383 // Parse and report QP.
384 h264_bitstream_parser_.ParseBitstream(encoded_image_._buffer, 384 h264_bitstream_parser_.ParseBitstream(encoded_image_._buffer,
385 encoded_image_._length); 385 encoded_image_._length);
386 int qp = -1; 386 int qp = -1;
387 if (h264_bitstream_parser_.GetLastSliceQp(&qp)) 387 if (h264_bitstream_parser_.GetLastSliceQp(&qp))
388 quality_scaler_.ReportQP(qp); 388 quality_scaler_.ReportQP(qp);
389 } else { 389 } else {
390 quality_scaler_.ReportDroppedFrame(); 390 quality_scaler_.ReportDroppedFrame();
391 } 391 }
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 486
487 int32_t H264EncoderImpl::SetPeriodicKeyFrames(bool enable) { 487 int32_t H264EncoderImpl::SetPeriodicKeyFrames(bool enable) {
488 return WEBRTC_VIDEO_CODEC_OK; 488 return WEBRTC_VIDEO_CODEC_OK;
489 } 489 }
490 490
491 void H264EncoderImpl::OnDroppedFrame() { 491 void H264EncoderImpl::OnDroppedFrame() {
492 quality_scaler_.ReportDroppedFrame(); 492 quality_scaler_.ReportDroppedFrame();
493 } 493 }
494 494
495 } // namespace webrtc 495 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/include/rtp_rtcp.h ('k') | webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_encoder.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698