OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
996 encoded_images_[encoder_idx]._length, | 996 encoded_images_[encoder_idx]._length, |
997 encoded_images_[encoder_idx]._timeStamp, qp); | 997 encoded_images_[encoder_idx]._timeStamp, qp); |
998 if (send_stream_[stream_idx]) { | 998 if (send_stream_[stream_idx]) { |
999 if (encoded_images_[encoder_idx]._length > 0) { | 999 if (encoded_images_[encoder_idx]._length > 0) { |
1000 TRACE_COUNTER_ID1("webrtc", "EncodedFrameSize", encoder_idx, | 1000 TRACE_COUNTER_ID1("webrtc", "EncodedFrameSize", encoder_idx, |
1001 encoded_images_[encoder_idx]._length); | 1001 encoded_images_[encoder_idx]._length); |
1002 encoded_images_[encoder_idx]._encodedHeight = | 1002 encoded_images_[encoder_idx]._encodedHeight = |
1003 codec_.simulcastStream[stream_idx].height; | 1003 codec_.simulcastStream[stream_idx].height; |
1004 encoded_images_[encoder_idx]._encodedWidth = | 1004 encoded_images_[encoder_idx]._encodedWidth = |
1005 codec_.simulcastStream[stream_idx].width; | 1005 codec_.simulcastStream[stream_idx].width; |
| 1006 encoded_images_[encoder_idx].qp_ = qp; |
1006 encoded_complete_callback_->Encoded(encoded_images_[encoder_idx], | 1007 encoded_complete_callback_->Encoded(encoded_images_[encoder_idx], |
1007 &codec_specific, &frag_info); | 1008 &codec_specific, &frag_info); |
1008 } else if (codec_.mode == kScreensharing) { | 1009 } else if (codec_.mode == kScreensharing) { |
1009 result = WEBRTC_VIDEO_CODEC_TARGET_BITRATE_OVERSHOOT; | 1010 result = WEBRTC_VIDEO_CODEC_TARGET_BITRATE_OVERSHOOT; |
1010 } | 1011 } |
1011 } else { | 1012 } else { |
1012 // Required in case padding is applied to dropped frames. | 1013 // Required in case padding is applied to dropped frames. |
1013 encoded_images_[encoder_idx]._length = 0; | 1014 encoded_images_[encoder_idx]._length = 0; |
1014 encoded_images_[encoder_idx]._frameType = kSkipFrame; | 1015 encoded_images_[encoder_idx]._frameType = kSkipFrame; |
1015 codec_specific.codecType = kVideoCodecVP8; | 1016 codec_specific.codecType = kVideoCodecVP8; |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1388 return -1; | 1389 return -1; |
1389 } | 1390 } |
1390 if (vpx_codec_control(copy->decoder_, VP8_SET_REFERENCE, ref_frame_) | 1391 if (vpx_codec_control(copy->decoder_, VP8_SET_REFERENCE, ref_frame_) |
1391 != VPX_CODEC_OK) { | 1392 != VPX_CODEC_OK) { |
1392 return -1; | 1393 return -1; |
1393 } | 1394 } |
1394 return 0; | 1395 return 0; |
1395 } | 1396 } |
1396 | 1397 |
1397 } // namespace webrtc | 1398 } // namespace webrtc |
OLD | NEW |