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

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

Issue 2479643002: Revert of Remove deprected functions from EncodedImageCallback and RtpRtcp (Closed)
Patch Set: 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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 RTPFragmentationHeader frag_header; 360 RTPFragmentationHeader frag_header;
361 RtpFragmentize(&encoded_image_, &encoded_image_buffer_, *frame_buffer, &info, 361 RtpFragmentize(&encoded_image_, &encoded_image_buffer_, *frame_buffer, &info,
362 &frag_header); 362 &frag_header);
363 363
364 // Encoder can skip frames to save bandwidth in which case 364 // Encoder can skip frames to save bandwidth in which case
365 // |encoded_image_._length| == 0. 365 // |encoded_image_._length| == 0.
366 if (encoded_image_._length > 0) { 366 if (encoded_image_._length > 0) {
367 // Deliver encoded image. 367 // Deliver encoded image.
368 CodecSpecificInfo codec_specific; 368 CodecSpecificInfo codec_specific;
369 codec_specific.codecType = kVideoCodecH264; 369 codec_specific.codecType = kVideoCodecH264;
370 encoded_image_callback_->OnEncodedImage(encoded_image_, &codec_specific, 370 encoded_image_callback_->Encoded(encoded_image_, &codec_specific,
371 &frag_header); 371 &frag_header);
372 372
373 // Parse and report QP. 373 // Parse and report QP.
374 h264_bitstream_parser_.ParseBitstream(encoded_image_._buffer, 374 h264_bitstream_parser_.ParseBitstream(encoded_image_._buffer,
375 encoded_image_._length); 375 encoded_image_._length);
376 int qp = -1; 376 int qp = -1;
377 if (h264_bitstream_parser_.GetLastSliceQp(&qp)) 377 if (h264_bitstream_parser_.GetLastSliceQp(&qp))
378 quality_scaler_.ReportQP(qp); 378 quality_scaler_.ReportQP(qp);
379 } else { 379 } else {
380 quality_scaler_.ReportDroppedFrame(); 380 quality_scaler_.ReportDroppedFrame();
381 } 381 }
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 478
479 int32_t H264EncoderImpl::SetPeriodicKeyFrames(bool enable) { 479 int32_t H264EncoderImpl::SetPeriodicKeyFrames(bool enable) {
480 return WEBRTC_VIDEO_CODEC_OK; 480 return WEBRTC_VIDEO_CODEC_OK;
481 } 481 }
482 482
483 void H264EncoderImpl::OnDroppedFrame() { 483 void H264EncoderImpl::OnDroppedFrame() {
484 quality_scaler_.ReportDroppedFrame(); 484 quality_scaler_.ReportDroppedFrame();
485 } 485 }
486 486
487 } // namespace webrtc 487 } // 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