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

Side by Side Diff: webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_encoder.mm

Issue 2405173006: Remove deprected functions from EncodedImageCallback and RtpRtcp (Closed)
Patch Set: fix android 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 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 frame._timeStamp = timestamp; 643 frame._timeStamp = timestamp;
644 frame.rotation_ = rotation; 644 frame.rotation_ = rotation;
645 645
646 h264_bitstream_parser_.ParseBitstream(buffer->data(), buffer->size()); 646 h264_bitstream_parser_.ParseBitstream(buffer->data(), buffer->size());
647 int qp; 647 int qp;
648 if (h264_bitstream_parser_.GetLastSliceQp(&qp)) { 648 if (h264_bitstream_parser_.GetLastSliceQp(&qp)) {
649 rtc::CritScope lock(&quality_scaler_crit_); 649 rtc::CritScope lock(&quality_scaler_crit_);
650 quality_scaler_.ReportQP(qp); 650 quality_scaler_.ReportQP(qp);
651 } 651 }
652 652
653 int result = callback_->Encoded(frame, &codec_specific_info, header.get()); 653 EncodedImageCallback::Result result =
654 if (result != 0) { 654 callback_->OnEncodedImage(frame, &codec_specific_info, header.get());
655 LOG(LS_ERROR) << "Encode callback failed: " << result; 655 if (result.error != EncodedImageCallback::Result::OK) {
656 LOG(LS_ERROR) << "Encode callback failed: " << result.error;
656 return; 657 return;
657 } 658 }
658 bitrate_adjuster_.Update(frame._size); 659 bitrate_adjuster_.Update(frame._size);
659 } 660 }
660 661
661 } // namespace webrtc 662 } // namespace webrtc
662 663
663 #endif // defined(WEBRTC_VIDEO_TOOLBOX_SUPPORTED) 664 #endif // defined(WEBRTC_VIDEO_TOOLBOX_SUPPORTED)
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc ('k') | webrtc/modules/video_coding/codecs/i420/i420.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698