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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 temporal_layers_[stream_idx]->ConfigureBitrates( | 299 temporal_layers_[stream_idx]->ConfigureBitrates( |
300 target_bitrate, max_bitrate, framerate, &configurations_[i]); | 300 target_bitrate, max_bitrate, framerate, &configurations_[i]); |
301 if (vpx_codec_enc_config_set(&encoders_[i], &configurations_[i])) { | 301 if (vpx_codec_enc_config_set(&encoders_[i], &configurations_[i])) { |
302 return WEBRTC_VIDEO_CODEC_ERROR; | 302 return WEBRTC_VIDEO_CODEC_ERROR; |
303 } | 303 } |
304 } | 304 } |
305 quality_scaler_.ReportFramerate(new_framerate); | 305 quality_scaler_.ReportFramerate(new_framerate); |
306 return WEBRTC_VIDEO_CODEC_OK; | 306 return WEBRTC_VIDEO_CODEC_OK; |
307 } | 307 } |
308 | 308 |
| 309 void VP8EncoderImpl::OnDroppedFrame() { |
| 310 if (quality_scaler_enabled_) |
| 311 quality_scaler_.ReportDroppedFrame(); |
| 312 } |
| 313 |
309 const char* VP8EncoderImpl::ImplementationName() const { | 314 const char* VP8EncoderImpl::ImplementationName() const { |
310 return "libvpx"; | 315 return "libvpx"; |
311 } | 316 } |
312 | 317 |
313 void VP8EncoderImpl::SetStreamState(bool send_stream, | 318 void VP8EncoderImpl::SetStreamState(bool send_stream, |
314 int stream_idx) { | 319 int stream_idx) { |
315 if (send_stream && !send_stream_[stream_idx]) { | 320 if (send_stream && !send_stream_[stream_idx]) { |
316 // Need a key frame if we have not sent this stream before. | 321 // Need a key frame if we have not sent this stream before. |
317 key_frame_request_[stream_idx] = true; | 322 key_frame_request_[stream_idx] = true; |
318 } | 323 } |
(...skipping 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1411 return -1; | 1416 return -1; |
1412 } | 1417 } |
1413 if (vpx_codec_control(copy->decoder_, VP8_SET_REFERENCE, ref_frame_) != | 1418 if (vpx_codec_control(copy->decoder_, VP8_SET_REFERENCE, ref_frame_) != |
1414 VPX_CODEC_OK) { | 1419 VPX_CODEC_OK) { |
1415 return -1; | 1420 return -1; |
1416 } | 1421 } |
1417 return 0; | 1422 return 0; |
1418 } | 1423 } |
1419 | 1424 |
1420 } // namespace webrtc | 1425 } // namespace webrtc |
OLD | NEW |