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

Side by Side Diff: webrtc/sdk/objc/Framework/Classes/h264_video_toolbox_encoder.mm

Issue 2620653005: Update bitrate adjustment with true buffer used size. (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | no next file » | 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) 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 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 724
725 h264_bitstream_parser_.ParseBitstream(buffer->data(), buffer->size()); 725 h264_bitstream_parser_.ParseBitstream(buffer->data(), buffer->size());
726 h264_bitstream_parser_.GetLastSliceQp(&frame.qp_); 726 h264_bitstream_parser_.GetLastSliceQp(&frame.qp_);
727 727
728 EncodedImageCallback::Result res = 728 EncodedImageCallback::Result res =
729 callback_->OnEncodedImage(frame, &codec_specific_info, header.get()); 729 callback_->OnEncodedImage(frame, &codec_specific_info, header.get());
730 if (res.error != EncodedImageCallback::Result::OK) { 730 if (res.error != EncodedImageCallback::Result::OK) {
731 LOG(LS_ERROR) << "Encode callback failed: " << res.error; 731 LOG(LS_ERROR) << "Encode callback failed: " << res.error;
732 return; 732 return;
733 } 733 }
734 bitrate_adjuster_.Update(frame._size); 734 bitrate_adjuster_.Update(frame._length);
735 } 735 }
736 736
737 VideoEncoder::ScalingSettings H264VideoToolboxEncoder::GetScalingSettings() 737 VideoEncoder::ScalingSettings H264VideoToolboxEncoder::GetScalingSettings()
738 const { 738 const {
739 return VideoEncoder::ScalingSettings(true, internal::kLowH264QpThreshold, 739 return VideoEncoder::ScalingSettings(true, internal::kLowH264QpThreshold,
740 internal::kHighH264QpThreshold); 740 internal::kHighH264QpThreshold);
741 } 741 }
742 } // namespace webrtc 742 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698