| 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 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 EncodedImageCallback::Result result = | 653 int result = callback_->Encoded(frame, &codec_specific_info, header.get()); |
| 654 callback_->OnEncodedImage(frame, &codec_specific_info, header.get()); | 654 if (result != 0) { |
| 655 if (result.error != EncodedImageCallback::Result::OK) { | 655 LOG(LS_ERROR) << "Encode callback failed: " << result; |
| 656 LOG(LS_ERROR) << "Encode callback failed: " << result.error; | |
| 657 return; | 656 return; |
| 658 } | 657 } |
| 659 bitrate_adjuster_.Update(frame._size); | 658 bitrate_adjuster_.Update(frame._size); |
| 660 } | 659 } |
| 661 | 660 |
| 662 } // namespace webrtc | 661 } // namespace webrtc |
| 663 | 662 |
| 664 #endif // defined(WEBRTC_VIDEO_TOOLBOX_SUPPORTED) | 663 #endif // defined(WEBRTC_VIDEO_TOOLBOX_SUPPORTED) |
| OLD | NEW |