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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 configurations_[0].g_timebase.num = 1; | 390 configurations_[0].g_timebase.num = 1; |
391 configurations_[0].g_timebase.den = 90000; | 391 configurations_[0].g_timebase.den = 90000; |
392 configurations_[0].g_lag_in_frames = 0; // 0- no frame lagging | 392 configurations_[0].g_lag_in_frames = 0; // 0- no frame lagging |
393 | 393 |
394 // Set the error resilience mode according to user settings. | 394 // Set the error resilience mode according to user settings. |
395 switch (inst->VP8().resilience) { | 395 switch (inst->VP8().resilience) { |
396 case kResilienceOff: | 396 case kResilienceOff: |
397 configurations_[0].g_error_resilient = 0; | 397 configurations_[0].g_error_resilient = 0; |
398 break; | 398 break; |
399 case kResilientStream: | 399 case kResilientStream: |
400 configurations_[0].g_error_resilient = 1; // TODO(holmer): Replace with | 400 configurations_[0].g_error_resilient = VPX_ERROR_RESILIENT_DEFAULT; |
401 // VPX_ERROR_RESILIENT_DEFAULT when we | |
402 // drop support for libvpx 9.6.0. | |
403 break; | 401 break; |
404 case kResilientFrames: | 402 case kResilientFrames: |
405 return WEBRTC_VIDEO_CODEC_ERR_PARAMETER; // Not supported | 403 return WEBRTC_VIDEO_CODEC_ERR_PARAMETER; // Not supported |
406 } | 404 } |
407 | 405 |
408 // rate control settings | 406 // rate control settings |
409 configurations_[0].rc_dropframe_thresh = inst->VP8().frameDroppingOn ? 30 : 0; | 407 configurations_[0].rc_dropframe_thresh = inst->VP8().frameDroppingOn ? 30 : 0; |
410 configurations_[0].rc_end_usage = VPX_CBR; | 408 configurations_[0].rc_end_usage = VPX_CBR; |
411 configurations_[0].g_pass = VPX_RC_ONE_PASS; | 409 configurations_[0].g_pass = VPX_RC_ONE_PASS; |
412 // TODO(hellner): investigate why the following two lines produce | 410 // TODO(hellner): investigate why the following two lines produce |
(...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1277 return -1; | 1275 return -1; |
1278 } | 1276 } |
1279 if (vpx_codec_control(copy->decoder_, VP8_SET_REFERENCE, ref_frame_) != | 1277 if (vpx_codec_control(copy->decoder_, VP8_SET_REFERENCE, ref_frame_) != |
1280 VPX_CODEC_OK) { | 1278 VPX_CODEC_OK) { |
1281 return -1; | 1279 return -1; |
1282 } | 1280 } |
1283 return 0; | 1281 return 0; |
1284 } | 1282 } |
1285 | 1283 |
1286 } // namespace webrtc | 1284 } // namespace webrtc |
OLD | NEW |