Setting Opus target application.
This CL is to allow to set Opus target application at the creation of an encoder. According to Opus spec, there are three applications: OPUS_APPLICATION_VOIP OPUS_APPLICATION_AUDIO OPUS_APPLICATION_RESTRICTED_LOWDELAY BUG= R=henrik.lundin@webrtc.org, tina.legrand@webrtc.org Review URL: https://webrtc-codereview.appspot.com/37479004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@8103 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -874,6 +874,20 @@ class AudioCodingModule: public Module {
|
||||
int init_rate_bps,
|
||||
bool enforce_frame_size = false) = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// int SetOpusApplication()
|
||||
// Sets the intended application for the Opus encoder. Opus uses this to
|
||||
// optimize the encoding for applications like VOIP and music.
|
||||
//
|
||||
// Input:
|
||||
// - application : intended application.
|
||||
//
|
||||
// Return value:
|
||||
// -1 if failed or on codecs other than Opus.
|
||||
// 0 if succeeded.
|
||||
//
|
||||
virtual int SetOpusApplication(OpusApplicationMode /*application*/) = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// int SetOpusMaxPlaybackRate()
|
||||
// If current send codec is Opus, informs it about maximum playback rate the
|
||||
|
||||
@ -200,6 +200,18 @@ enum ACMBackgroundNoiseMode {
|
||||
Off
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Enumeration of Opus mode for intended application.
|
||||
//
|
||||
// kVoip : optimized for voice signals.
|
||||
// kAudio : optimized for non-voice signals like music.
|
||||
//
|
||||
enum OpusApplicationMode {
|
||||
kVoip = 0,
|
||||
kAudio = 1,
|
||||
};
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
#endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_INTERFACE_AUDIO_CODING_MODULE_TYPEDEFS_H_
|
||||
|
||||
Reference in New Issue
Block a user