| 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 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 639 is_keyframe ? webrtc::kVideoFrameKey : webrtc::kVideoFrameDelta; | 639 is_keyframe ? webrtc::kVideoFrameKey : webrtc::kVideoFrameDelta; |
| 640 frame.capture_time_ms_ = render_time_ms; | 640 frame.capture_time_ms_ = render_time_ms; |
| 641 frame._timeStamp = timestamp; | 641 frame._timeStamp = timestamp; |
| 642 frame.rotation_ = rotation; | 642 frame.rotation_ = rotation; |
| 643 | 643 |
| 644 h264_bitstream_parser_.ParseBitstream(buffer->data(), buffer->size()); | 644 h264_bitstream_parser_.ParseBitstream(buffer->data(), buffer->size()); |
| 645 int qp; | 645 int qp; |
| 646 if (h264_bitstream_parser_.GetLastSliceQp(&qp)) { | 646 if (h264_bitstream_parser_.GetLastSliceQp(&qp)) { |
| 647 rtc::CritScope lock(&quality_scaler_crit_); | 647 rtc::CritScope lock(&quality_scaler_crit_); |
| 648 quality_scaler_.ReportQP(qp); | 648 quality_scaler_.ReportQP(qp); |
| 649 frame.qp_ = qp; |
| 649 } | 650 } |
| 650 | 651 |
| 651 EncodedImageCallback::Result result = | 652 EncodedImageCallback::Result result = |
| 652 callback_->OnEncodedImage(frame, &codec_specific_info, header.get()); | 653 callback_->OnEncodedImage(frame, &codec_specific_info, header.get()); |
| 653 if (result.error != EncodedImageCallback::Result::OK) { | 654 if (result.error != EncodedImageCallback::Result::OK) { |
| 654 LOG(LS_ERROR) << "Encode callback failed: " << result.error; | 655 LOG(LS_ERROR) << "Encode callback failed: " << result.error; |
| 655 return; | 656 return; |
| 656 } | 657 } |
| 657 bitrate_adjuster_.Update(frame._size); | 658 bitrate_adjuster_.Update(frame._size); |
| 658 } | 659 } |
| 659 | 660 |
| 660 } // namespace webrtc | 661 } // namespace webrtc |
| OLD | NEW |