OLD | NEW |
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 Loading... |
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 |
OLD | NEW |