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

Side by Side Diff: webrtc/modules/audio_coding/main/include/audio_coding_module.h

Issue 1406123011: Let AudioCodingModule::SendCodec return Maybe<CodecInst> (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: review fix Created 5 years, 1 month 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) 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
11 #ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_INCLUDE_AUDIO_CODING_MODULE_H_ 11 #ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_INCLUDE_AUDIO_CODING_MODULE_H_
12 #define WEBRTC_MODULES_AUDIO_CODING_MAIN_INCLUDE_AUDIO_CODING_MODULE_H_ 12 #define WEBRTC_MODULES_AUDIO_CODING_MAIN_INCLUDE_AUDIO_CODING_MODULE_H_
13 13
14 #include <vector> 14 #include <vector>
15 15
16 #include "webrtc/base/maybe.h"
16 #include "webrtc/common_types.h" 17 #include "webrtc/common_types.h"
17 #include "webrtc/modules/audio_coding/main/acm2/acm_codec_database.h" 18 #include "webrtc/modules/audio_coding/main/acm2/acm_codec_database.h"
18 #include "webrtc/modules/audio_coding/main/include/audio_coding_module_typedefs. h" 19 #include "webrtc/modules/audio_coding/main/include/audio_coding_module_typedefs. h"
19 #include "webrtc/modules/audio_coding/neteq/include/neteq.h" 20 #include "webrtc/modules/audio_coding/neteq/include/neteq.h"
20 #include "webrtc/modules/interface/module.h" 21 #include "webrtc/modules/interface/module.h"
21 #include "webrtc/system_wrappers/include/clock.h" 22 #include "webrtc/system_wrappers/include/clock.h"
22 #include "webrtc/typedefs.h" 23 #include "webrtc/typedefs.h"
23 24
24 namespace webrtc { 25 namespace webrtc {
25 26
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 200
200 // Registers |external_speech_encoder| as encoder. The new encoder will 201 // Registers |external_speech_encoder| as encoder. The new encoder will
201 // replace any previously registered speech encoder (internal or external). 202 // replace any previously registered speech encoder (internal or external).
202 virtual void RegisterExternalSendCodec( 203 virtual void RegisterExternalSendCodec(
203 AudioEncoder* external_speech_encoder) = 0; 204 AudioEncoder* external_speech_encoder) = 0;
204 205
205 /////////////////////////////////////////////////////////////////////////// 206 ///////////////////////////////////////////////////////////////////////////
206 // int32_t SendCodec() 207 // int32_t SendCodec()
207 // Get parameters for the codec currently registered as send codec. 208 // Get parameters for the codec currently registered as send codec.
208 // 209 //
209 // Output: 210 // Return value:
210 // -current_send_codec : parameters of the send codec. 211 // The send codec, or nothing if we don't have one
211 // 212 //
212 // Return value: 213 virtual rtc::Maybe<CodecInst> SendCodec() const = 0;
213 // -1 if failed to get send codec,
214 // 0 if succeeded.
215 //
216 virtual int32_t SendCodec(CodecInst* current_send_codec) const = 0;
217 214
218 /////////////////////////////////////////////////////////////////////////// 215 ///////////////////////////////////////////////////////////////////////////
219 // int32_t SendFrequency() 216 // int32_t SendFrequency()
220 // Get the sampling frequency of the current encoder in Hertz. 217 // Get the sampling frequency of the current encoder in Hertz.
221 // 218 //
222 // Return value: 219 // Return value:
223 // positive; sampling frequency [Hz] of the current encoder. 220 // positive; sampling frequency [Hz] of the current encoder.
224 // -1 if an error has happened. 221 // -1 if an error has happened.
225 // 222 //
226 virtual int32_t SendFrequency() const = 0; 223 virtual int32_t SendFrequency() const = 0;
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 virtual std::vector<uint16_t> GetNackList( 729 virtual std::vector<uint16_t> GetNackList(
733 int64_t round_trip_time_ms) const = 0; 730 int64_t round_trip_time_ms) const = 0;
734 731
735 virtual void GetDecodingCallStatistics( 732 virtual void GetDecodingCallStatistics(
736 AudioDecodingCallStats* call_stats) const = 0; 733 AudioDecodingCallStats* call_stats) const = 0;
737 }; 734 };
738 735
739 } // namespace webrtc 736 } // namespace webrtc
740 737
741 #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_INCLUDE_AUDIO_CODING_MODULE_H_ 738 #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_INCLUDE_AUDIO_CODING_MODULE_H_
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/main/acm2/codec_manager.cc ('k') | webrtc/modules/audio_coding/main/test/APITest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698