~ubuntu-branches/ubuntu/trusty/sflphone/trusty

« back to all changes in this revision

Viewing changes to daemon/libs/pjproject-2.1.0/pjmedia/include/pjmedia-codec/opencore_amr.h

  • Committer: Package Import Robot
  • Author(s): Mark Purcell
  • Date: 2014-01-28 18:23:36 UTC
  • mfrom: (4.3.4 sid)
  • Revision ID: package-import@ubuntu.com-20140128182336-jrsv0k9u6cawc068
Tags: 1.3.0-1
* New upstream release 
  - Fixes "New Upstream Release" (Closes: #735846)
  - Fixes "Ringtone does not stop" (Closes: #727164)
  - Fixes "[sflphone-kde] crash on startup" (Closes: #718178)
  - Fixes "sflphone GUI crashes when call is hung up" (Closes: #736583)
* Build-Depends: ensure GnuTLS 2.6
  - libucommon-dev (>= 6.0.7-1.1), libccrtp-dev (>= 2.0.6-3)
  - Fixes "FTBFS Build-Depends libgnutls{26,28}-dev" (Closes: #722040)
* Fix "boost 1.49 is going away" unversioned Build-Depends: (Closes: #736746)
* Add Build-Depends: libsndfile-dev, nepomuk-core-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Id: opencore_amr.h 4335 2013-01-29 08:09:15Z ming $ */
 
2
/*
 
3
 * Copyright (C) 2011-2013 Teluu Inc. (http://www.teluu.com)
 
4
 * Copyright (C) 2011 Dan Arrhenius <dan@keystream.se>
 
5
 *
 
6
 * This program is free software; you can redistribute it and/or modify
 
7
 * it under the terms of the GNU General Public License as published by
 
8
 * the Free Software Foundation; either version 2 of the License, or
 
9
 * (at your option) any later version.
 
10
 *
 
11
 * This program is distributed in the hope that it will be useful,
 
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 * GNU General Public License for more details.
 
15
 *
 
16
 * You should have received a copy of the GNU General Public License
 
17
 * along with this program; if not, write to the Free Software
 
18
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
19
 */
 
20
#ifndef __PJMEDIA_CODEC_OPENCORE_AMR_H__
 
21
#define __PJMEDIA_CODEC_OPENCORE_AMR_H__
 
22
 
 
23
#include <pjmedia-codec/types.h>
 
24
 
 
25
/**
 
26
 * @defgroup PJMED_OC_AMR OpenCORE AMR Codec
 
27
 * @ingroup PJMEDIA_CODEC_CODECS
 
28
 * @brief AMRCodec wrapper for OpenCORE AMR codec
 
29
 * @{
 
30
 */
 
31
 
 
32
PJ_BEGIN_DECL
 
33
 
 
34
/**
 
35
 * Bitmask options to be passed during AMR codec factory initialization.
 
36
 */
 
37
enum pjmedia_amr_options
 
38
{
 
39
    PJMEDIA_AMR_NO_NB       = 1,    /**< Disable narrowband mode.       */
 
40
    PJMEDIA_AMR_NO_WB       = 2,    /**< Disable wideband mode.         */
 
41
};
 
42
 
 
43
/**
 
44
 * Settings. Use #pjmedia_codec_opencore_amrnb/wb_set_config() to
 
45
 * activate.
 
46
 */
 
47
typedef struct pjmedia_codec_amr_config
 
48
{
 
49
    /**
 
50
     * Control whether to use octent align.
 
51
     */
 
52
    pj_bool_t octet_align;
 
53
 
 
54
    /**
 
55
     * Set the bitrate.
 
56
     */
 
57
    unsigned bitrate;
 
58
 
 
59
} pjmedia_codec_amr_config;
 
60
 
 
61
typedef pjmedia_codec_amr_config pjmedia_codec_amrnb_config;
 
62
typedef pjmedia_codec_amr_config pjmedia_codec_amrwb_config;
 
63
 
 
64
/**
 
65
 * Initialize and register AMR codec factory to pjmedia endpoint.
 
66
 *
 
67
 * @param endpt     The pjmedia endpoint.
 
68
 * @param options   Bitmask of pjmedia_amr_options (default=0).
 
69
 *
 
70
 * @return          PJ_SUCCESS on success.
 
71
 */
 
72
PJ_DECL(pj_status_t) pjmedia_codec_opencore_amr_init(pjmedia_endpt* endpt,
 
73
                                                     unsigned options);
 
74
 
 
75
/**
 
76
 * Initialize and register AMR codec factory using default settings to
 
77
 * pjmedia endpoint.
 
78
 *
 
79
 * @param endpt The pjmedia endpoint.
 
80
 *
 
81
 * @return      PJ_SUCCESS on success.
 
82
 */
 
83
PJ_DECL(pj_status_t)
 
84
pjmedia_codec_opencore_amr_init_default(pjmedia_endpt* endpt);
 
85
 
 
86
/**
 
87
 * Unregister AMR codec factory from pjmedia endpoint and deinitialize
 
88
 * the OpenCORE codec library.
 
89
 *
 
90
 * @return      PJ_SUCCESS on success.
 
91
 */
 
92
PJ_DECL(pj_status_t) pjmedia_codec_opencore_amr_deinit(void);
 
93
 
 
94
/**
 
95
 * Initialize and register AMR-NB codec factory to pjmedia endpoint. Calling
 
96
 * this function will automatically initialize AMR codec factory without
 
97
 * the wideband mode (i.e. it is equivalent to calling
 
98
 * #pjmedia_codec_opencore_amr_init() with PJMEDIA_AMR_NO_WB). Application
 
99
 * should call #pjmedia_codec_opencore_amr_init() instead if wishing to use
 
100
 * both modes.
 
101
 *
 
102
 * @param endpt The pjmedia endpoint.
 
103
 *
 
104
 * @return      PJ_SUCCESS on success.
 
105
 */
 
106
PJ_DECL(pj_status_t) pjmedia_codec_opencore_amrnb_init(pjmedia_endpt* endpt);
 
107
 
 
108
/**
 
109
 * Unregister AMR-NB codec factory from pjmedia endpoint and deinitialize
 
110
 * the OpenCORE codec library.
 
111
 *
 
112
 * @return      PJ_SUCCESS on success.
 
113
 */
 
114
PJ_DECL(pj_status_t) pjmedia_codec_opencore_amrnb_deinit(void);
 
115
 
 
116
 
 
117
/**
 
118
 * Set AMR-NB parameters.
 
119
 *
 
120
 * @param cfg   The settings;
 
121
 *
 
122
 * @return      PJ_SUCCESS on success.
 
123
 */
 
124
PJ_DECL(pj_status_t) pjmedia_codec_opencore_amrnb_set_config(
 
125
                                const pjmedia_codec_amrnb_config* cfg);
 
126
 
 
127
 
 
128
/**
 
129
 * Set AMR-WB parameters.
 
130
 *
 
131
 * @param cfg   The settings;
 
132
 *
 
133
 * @return      PJ_SUCCESS on success.
 
134
 */
 
135
PJ_DECL(pj_status_t) pjmedia_codec_opencore_amrwb_set_config(
 
136
                                        const pjmedia_codec_amrwb_config* cfg);
 
137
 
 
138
PJ_END_DECL
 
139
 
 
140
 
 
141
/**
 
142
 * @}
 
143
 */
 
144
 
 
145
#endif  /* __PJMEDIA_CODEC_OPENCORE_AMRNB_H__ */
 
146