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

Side by Side Diff: webrtc/modules/audio_coding/main/acm2/codec_owner.h

Issue 1364193002: CodecOwner::SetEncoders: Return error code when given bad arguments (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Add unittest Created 5 years, 2 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
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 11 matching lines...) Expand all
22 22
23 class AudioDecoder; 23 class AudioDecoder;
24 24
25 namespace acm2 { 25 namespace acm2 {
26 26
27 class CodecOwner { 27 class CodecOwner {
28 public: 28 public:
29 CodecOwner(); 29 CodecOwner();
30 ~CodecOwner(); 30 ~CodecOwner();
31 31
32 void SetEncoders(const CodecInst& speech_inst, 32 // Start using the specified encoder. Returns false on error.
33 // TODO(kwiberg): Don't handle errors here (bug 5033)
34 bool SetEncoders(const CodecInst& speech_inst,
33 int cng_payload_type, 35 int cng_payload_type,
34 ACMVADMode vad_mode, 36 ACMVADMode vad_mode,
35 int red_payload_type); 37 int red_payload_type) WARN_UNUSED_RESULT;
36 38
37 void SetEncoders(AudioEncoder* external_speech_encoder, 39 void SetEncoders(AudioEncoder* external_speech_encoder,
38 int cng_payload_type, 40 int cng_payload_type,
39 ACMVADMode vad_mode, 41 ACMVADMode vad_mode,
40 int red_payload_type); 42 int red_payload_type);
41 43
42 void ChangeCngAndRed(int cng_payload_type, 44 void ChangeCngAndRed(int cng_payload_type,
43 ACMVADMode vad_mode, 45 ACMVADMode vad_mode,
44 int red_payload_type); 46 int red_payload_type);
45 47
(...skipping 23 matching lines...) Expand all
69 // are active. 71 // are active.
70 rtc::scoped_ptr<AudioEncoder> cng_encoder_; 72 rtc::scoped_ptr<AudioEncoder> cng_encoder_;
71 rtc::scoped_ptr<AudioEncoder> red_encoder_; 73 rtc::scoped_ptr<AudioEncoder> red_encoder_;
72 74
73 RTC_DISALLOW_COPY_AND_ASSIGN(CodecOwner); 75 RTC_DISALLOW_COPY_AND_ASSIGN(CodecOwner);
74 }; 76 };
75 77
76 } // namespace acm2 78 } // namespace acm2
77 } // namespace webrtc 79 } // namespace webrtc
78 #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_CODEC_OWNER_H_ 80 #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_CODEC_OWNER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698