| OLD | NEW |
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2014 Google Inc. | 3 * Copyright 2014 Google Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
| 9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 bool denoising; | 407 bool denoising; |
| 408 bool codec_default_denoising = false; | 408 bool codec_default_denoising = false; |
| 409 if (is_screencast) { | 409 if (is_screencast) { |
| 410 denoising = false; | 410 denoising = false; |
| 411 } else { | 411 } else { |
| 412 // Use codec default if video_noise_reduction is unset. | 412 // Use codec default if video_noise_reduction is unset. |
| 413 codec_default_denoising = !options.video_noise_reduction; | 413 codec_default_denoising = !options.video_noise_reduction; |
| 414 denoising = options.video_noise_reduction.value_or(false); | 414 denoising = options.video_noise_reduction.value_or(false); |
| 415 } | 415 } |
| 416 | 416 |
| 417 if (CodecNamesEq(codec.name, kH264CodecName)) { |
| 418 encoder_settings_.h264 = webrtc::VideoEncoder::GetDefaultH264Settings(); |
| 419 encoder_settings_.h264.frameDroppingOn = frame_dropping; |
| 420 return &encoder_settings_.h264; |
| 421 } |
| 417 if (CodecNamesEq(codec.name, kVp8CodecName)) { | 422 if (CodecNamesEq(codec.name, kVp8CodecName)) { |
| 418 encoder_settings_.vp8 = webrtc::VideoEncoder::GetDefaultVp8Settings(); | 423 encoder_settings_.vp8 = webrtc::VideoEncoder::GetDefaultVp8Settings(); |
| 419 encoder_settings_.vp8.automaticResizeOn = automatic_resize; | 424 encoder_settings_.vp8.automaticResizeOn = automatic_resize; |
| 420 // VP8 denoising is enabled by default. | 425 // VP8 denoising is enabled by default. |
| 421 encoder_settings_.vp8.denoisingOn = | 426 encoder_settings_.vp8.denoisingOn = |
| 422 codec_default_denoising ? true : denoising; | 427 codec_default_denoising ? true : denoising; |
| 423 encoder_settings_.vp8.frameDroppingOn = frame_dropping; | 428 encoder_settings_.vp8.frameDroppingOn = frame_dropping; |
| 424 return &encoder_settings_.vp8; | 429 return &encoder_settings_.vp8; |
| 425 } | 430 } |
| 426 if (CodecNamesEq(codec.name, kVp9CodecName)) { | 431 if (CodecNamesEq(codec.name, kVp9CodecName)) { |
| (...skipping 2199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2626 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; | 2631 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; |
| 2627 } | 2632 } |
| 2628 } | 2633 } |
| 2629 | 2634 |
| 2630 return video_codecs; | 2635 return video_codecs; |
| 2631 } | 2636 } |
| 2632 | 2637 |
| 2633 } // namespace cricket | 2638 } // namespace cricket |
| 2634 | 2639 |
| 2635 #endif // HAVE_WEBRTC_VIDEO | 2640 #endif // HAVE_WEBRTC_VIDEO |
| OLD | NEW |