diff options
author | Benny Prijono <bennylp@teluu.com> | 2006-04-27 22:36:40 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2006-04-27 22:36:40 +0000 |
commit | 4bab78a009cbfc57426066ebb5070e7609d4be04 (patch) | |
tree | 016b6205dfafc5084da23be9467f2c092cea01a8 /pjmedia/include/pjmedia-codec | |
parent | 76cf603ff005c45c996cbaf742913f418eb09910 (diff) |
Initial support for stereo codecs, and added L16 codecs. Also better handling for case remote media is restarted
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@411 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/include/pjmedia-codec')
-rw-r--r-- | pjmedia/include/pjmedia-codec/config.h | 8 | ||||
-rw-r--r-- | pjmedia/include/pjmedia-codec/l16.h | 53 | ||||
-rw-r--r-- | pjmedia/include/pjmedia-codec/types.h | 31 |
3 files changed, 92 insertions, 0 deletions
diff --git a/pjmedia/include/pjmedia-codec/config.h b/pjmedia/include/pjmedia-codec/config.h index a9cdbfaf..2006528d 100644 --- a/pjmedia/include/pjmedia-codec/config.h +++ b/pjmedia/include/pjmedia-codec/config.h @@ -23,6 +23,14 @@ /** + * Unless specified otherwise, L16 codec is included by default. + */ +#ifndef PJMEDIA_HAS_L16_CODEC +# define PJMEDIA_HAS_L16_CODEC 1 +#endif + + +/** * Unless specified otherwise, GSM codec is included by default. */ #ifndef PJMEDIA_HAS_GSM_CODEC diff --git a/pjmedia/include/pjmedia-codec/l16.h b/pjmedia/include/pjmedia-codec/l16.h new file mode 100644 index 00000000..be2bf26a --- /dev/null +++ b/pjmedia/include/pjmedia-codec/l16.h @@ -0,0 +1,53 @@ +/* $Id$ */ +/* + * Copyright (C)2003-2006 Benny Prijono <benny@prijono.org> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef __PJMEDIA_CODEC_L16_H__ +#define __PJMEDIA_CODEC_L16_H__ + +#include <pjmedia-codec/types.h> + + +PJ_BEGIN_DECL + + +/** + * Initialize and register L16 codec factory to pjmedia endpoint. + * + * @param endpt The pjmedia endpoint. + * @param options Must be zero for now. + * + * @return PJ_SUCCESS on success. + */ +PJ_DECL(pj_status_t) pjmedia_codec_l16_init( pjmedia_endpt *endpt, + unsigned options); + + + +/** + * Unregister L16 codec factory from pjmedia endpoint. + * + * @return PJ_SUCCESS on success. + */ +PJ_DECL(pj_status_t) pjmedia_codec_l16_deinit(void); + + +PJ_END_DECL + + +#endif /* __PJMEDIA_CODEC_L16_H__ */ + diff --git a/pjmedia/include/pjmedia-codec/types.h b/pjmedia/include/pjmedia-codec/types.h index af847543..c115a830 100644 --- a/pjmedia/include/pjmedia-codec/types.h +++ b/pjmedia/include/pjmedia-codec/types.h @@ -22,4 +22,35 @@ #include <pjmedia-codec/config.h> +/** + * These are the dynamic payload types that are used by codecs in + * this library. Also see the header file <pjmedia/codec.h> for list + * of static payload types. + */ +enum +{ + /* Telephone events must have pt=101, or otherwise some code needs + * to be updated (this would not affect outgoing pt). + */ + PJMEDIA_RTP_PT_TELEPHONE_EVENTS = 101, /**< telephone-events */ + + PJMEDIA_RTP_PT_SPEEX_NB, /**< Speex narrowband/8KHz */ + PJMEDIA_RTP_PT_SPEEX_WB, /**< Speex wideband/16KHz */ + PJMEDIA_RTP_PT_SPEEX_UWB, /**< Speex 32KHz */ + PJMEDIA_RTP_PT_L16_8KHZ_MONO, /**< L16 @ 8KHz, mono */ + PJMEDIA_RTP_PT_L16_8KHZ_STEREO, /**< L16 @ 8KHz, stereo */ + PJMEDIA_RTP_PT_L16_11KHZ_MONO, /**< L16 @ 11KHz, mono */ + PJMEDIA_RTP_PT_L16_11KHZ_STEREO, /**< L16 @ 11KHz, stereo */ + PJMEDIA_RTP_PT_L16_16KHZ_MONO, /**< L16 @ 16KHz, mono */ + PJMEDIA_RTP_PT_L16_16KHZ_STEREO, /**< L16 @ 16KHz, stereo */ + PJMEDIA_RTP_PT_L16_22KHZ_MONO, /**< L16 @ 22KHz, mono */ + PJMEDIA_RTP_PT_L16_22KHZ_STEREO, /**< L16 @ 22KHz, stereo */ + PJMEDIA_RTP_PT_L16_32KHZ_MONO, /**< L16 @ 32KHz, mono */ + PJMEDIA_RTP_PT_L16_32KHZ_STEREO, /**< L16 @ 32KHz, stereo */ + PJMEDIA_RTP_PT_L16_48KHZ_MONO, /**< L16 @ 48KHz, mono */ + PJMEDIA_RTP_PT_L16_48KHZ_STEREO, /**< L16 @ 48KHz, stereo */ +}; + + + #endif /* __PJMEDIA_CODEC_TYPES_H__ */ |