1
/* $Id: audio_codecs.h 3666 2011-07-19 08:40:20Z nanang $ */
3
* Copyright (C) 2011-2011 Teluu Inc. (http://www.teluu.com)
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
#ifndef __PJMEDIA_CODEC_ALL_CODECS_H__
20
#define __PJMEDIA_CODEC_ALL_CODECS_H__
23
* @file pjmedia-codec/all_codecs.h
24
* @brief Helper function to register all codecs
26
#include <pjmedia/endpoint.h>
27
#include <pjmedia-codec/passthrough.h>
33
* @defgroup PJMEDIA_CODEC_REGISTER_ALL Codec registration helper
34
* @ingroup PJMEDIA_CODEC_CODECS
35
* @brief Helper function to register all codecs
38
* Helper function to register all codecs that are implemented in
39
* PJMEDIA-CODEC library.
43
* Codec configuration. Call #pjmedia_audio_codec_config_default() to initialize
44
* this structure with the default values.
46
typedef struct pjmedia_audio_codec_config
48
/** Speex codec settings. See #pjmedia_codec_speex_init() for more info */
50
unsigned option; /**< Bitmask of options. */
51
int quality; /**< Codec quality. */
52
int complexity; /**< Codec complexity. */
57
unsigned mode; /**< iLBC mode. */
62
pjmedia_codec_passthrough_setting setting; /**< Passthrough */
65
} pjmedia_audio_codec_config;
69
* Initialize pjmedia_audio_codec_config structure with default values.
71
* @param cfg The codec config to be initialized.
74
pjmedia_audio_codec_config_default(pjmedia_audio_codec_config *cfg);
77
* Register all known audio codecs implemented in PJMEDA-CODEC library to the
78
* specified media endpoint.
80
* @param endpt The media endpoint.
81
* @param c Optional codec configuration, or NULL to use default
84
* @return PJ_SUCCESS on success or the appropriate error code.
87
pjmedia_codec_register_audio_codecs(pjmedia_endpt *endpt,
88
const pjmedia_audio_codec_config *c);
92
* @} PJMEDIA_CODEC_REGISTER_ALL
98
#endif /* __PJMEDIA_CODEC_ALL_CODECS_H__ */