Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(132)

Side by Side Diff: webrtc/audio/audio_send_stream.cc

Issue 2870123002: Fixing video loopback test with encoder factory. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/video/video_quality_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 VoiceEngine* voice_engine = audio_state->voice_engine(); 381 VoiceEngine* voice_engine = audio_state->voice_engine();
382 RTC_DCHECK(voice_engine); 382 RTC_DCHECK(voice_engine);
383 return voice_engine; 383 return voice_engine;
384 } 384 }
385 385
386 // Apply current codec settings to a single voe::Channel used for sending. 386 // Apply current codec settings to a single voe::Channel used for sending.
387 bool AudioSendStream::SetupSendCodec(AudioSendStream* stream, 387 bool AudioSendStream::SetupSendCodec(AudioSendStream* stream,
388 const Config& new_config) { 388 const Config& new_config) {
389 RTC_DCHECK(new_config.send_codec_spec); 389 RTC_DCHECK(new_config.send_codec_spec);
390 const auto& spec = *new_config.send_codec_spec; 390 const auto& spec = *new_config.send_codec_spec;
391
392 RTC_DCHECK(new_config.encoder_factory);
ossu 2017/05/09 15:45:41 Might as well move this one just below the check o
391 std::unique_ptr<AudioEncoder> encoder = 393 std::unique_ptr<AudioEncoder> encoder =
392 new_config.encoder_factory->MakeAudioEncoder(spec.payload_type, 394 new_config.encoder_factory->MakeAudioEncoder(spec.payload_type,
393 spec.format); 395 spec.format);
394 396
395 if (!encoder) { 397 if (!encoder) {
396 LOG(LS_ERROR) << "Unable to create encoder for " << spec.format; 398 LOG(LS_ERROR) << "Unable to create encoder for " << spec.format;
397 return false; 399 return false;
398 } 400 }
399 // If a bitrate has been specified for the codec, use it over the 401 // If a bitrate has been specified for the codec, use it over the
400 // codec's default. 402 // codec's default.
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 if (rtpRtcpModule->RegisterSendPayload(codec) != 0) { 597 if (rtpRtcpModule->RegisterSendPayload(codec) != 0) {
596 LOG(LS_ERROR) << "RegisterCngPayloadType() failed to register CN to " 598 LOG(LS_ERROR) << "RegisterCngPayloadType() failed to register CN to "
597 "RTP/RTCP module"; 599 "RTP/RTCP module";
598 } 600 }
599 } 601 }
600 } 602 }
601 603
602 604
603 } // namespace internal 605 } // namespace internal
604 } // namespace webrtc 606 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/video/video_quality_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698