diff options
author | Benny Prijono <bennylp@teluu.com> | 2007-08-16 10:11:44 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2007-08-16 10:11:44 +0000 |
commit | 159bce8846c6ad6a801085814ce456b13d90b395 (patch) | |
tree | 610f6d100a384dfee5957d2d9454fa893d094400 /pjmedia | |
parent | e98db7abda0bea7e779ab589753aaa3b9b3f148b (diff) |
Ticket #354: continuing work to port the Symbian libraries to .DSO format
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1417 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia')
-rw-r--r-- | pjmedia/include/pjmedia/errno.h | 17 | ||||
-rw-r--r-- | pjmedia/include/pjmedia/rtcp.h | 4 | ||||
-rw-r--r-- | pjmedia/src/pjmedia/alaw_ulaw.c | 18 | ||||
-rw-r--r-- | pjmedia/src/pjmedia/codec.c | 26 | ||||
-rw-r--r-- | pjmedia/src/pjmedia/conference.c | 4 | ||||
-rw-r--r-- | pjmedia/src/pjmedia/echo_common.c | 44 | ||||
-rw-r--r-- | pjmedia/src/pjmedia/echo_internal.h | 71 | ||||
-rw-r--r-- | pjmedia/src/pjmedia/echo_speex.c | 24 | ||||
-rw-r--r-- | pjmedia/src/pjmedia/echo_suppress.c | 25 | ||||
-rw-r--r-- | pjmedia/src/pjmedia/endpoint.c | 19 | ||||
-rw-r--r-- | pjmedia/src/pjmedia/g711.c | 4 | ||||
-rw-r--r-- | pjmedia/src/pjmedia/mem_capture.c | 5 | ||||
-rw-r--r-- | pjmedia/src/pjmedia/mem_player.c | 3 | ||||
-rw-r--r-- | pjmedia/src/pjmedia/sdp.c | 45 | ||||
-rw-r--r-- | pjmedia/src/pjmedia/sdp_neg.c | 47 | ||||
-rw-r--r-- | pjmedia/src/pjmedia/session.c | 6 | ||||
-rw-r--r-- | pjmedia/src/pjmedia/splitcomb.c | 3 | ||||
-rw-r--r-- | pjmedia/src/pjmedia/transport_udp.c | 3 | ||||
-rw-r--r-- | pjmedia/src/pjmedia/wav_player.c | 3 | ||||
-rw-r--r-- | pjmedia/src/pjmedia/wav_playlist.c | 3 | ||||
-rw-r--r-- | pjmedia/src/pjmedia/wav_writer.c | 3 |
21 files changed, 159 insertions, 218 deletions
diff --git a/pjmedia/include/pjmedia/errno.h b/pjmedia/include/pjmedia/errno.h index 332d1e40..3b1f7cd3 100644 --- a/pjmedia/include/pjmedia/errno.h +++ b/pjmedia/include/pjmedia/errno.h @@ -521,6 +521,23 @@ PJ_BEGIN_DECL #define PJMEDIA_ESNDINSAMPLEFMT (PJMEDIA_ERRNO_START+203) /* 220203 */ +/** + * Get error message for the specified error code. Note that this + * function is only able to decode PJMEDIA specific error code. + * Application should use pj_strerror(), which should be able to + * decode all error codes belonging to all subsystems (e.g. pjlib, + * pjmedia, pjsip, etc). + * + * @param status The error code. + * @param buffer The buffer where to put the error message. + * @param bufsize Size of the buffer. + * + * @return The error message as NULL terminated string, + * wrapped with pj_str_t. + */ +PJ_DECL(pj_str_t) pjmedia_strerror( pj_status_t status, char *buffer, + pj_size_t bufsize); + PJ_END_DECL diff --git a/pjmedia/include/pjmedia/rtcp.h b/pjmedia/include/pjmedia/rtcp.h index 5d34e5f6..b680d0ea 100644 --- a/pjmedia/include/pjmedia/rtcp.h +++ b/pjmedia/include/pjmedia/rtcp.h @@ -309,8 +309,8 @@ PJ_DECL(void) pjmedia_rtcp_init( pjmedia_rtcp_session *session, * * @return PJ_SUCCESS on success. */ -PJ_DEF(pj_status_t) pjmedia_rtcp_get_ntp_time(const pjmedia_rtcp_session *sess, - pjmedia_rtcp_ntp_rec *ntp); +PJ_DECL(pj_status_t) pjmedia_rtcp_get_ntp_time(const pjmedia_rtcp_session *sess, + pjmedia_rtcp_ntp_rec *ntp); /** diff --git a/pjmedia/src/pjmedia/alaw_ulaw.c b/pjmedia/src/pjmedia/alaw_ulaw.c index 5fd97479..7bb5c77f 100644 --- a/pjmedia/src/pjmedia/alaw_ulaw.c +++ b/pjmedia/src/pjmedia/alaw_ulaw.c @@ -116,8 +116,7 @@ search( * For further information see John C. Bellamy's Digital Telephony, 1982, * John Wiley & Sons, pps 98-111 and 472-476. */ -PJ_DEF(pj_uint8_t) -pjmedia_linear2alaw( +PJ_DEF(pj_uint8_t) pjmedia_linear2alaw( int pcm_val) /* 2's complement (16-bit range) */ { int mask; @@ -152,8 +151,7 @@ pjmedia_linear2alaw( * alaw2linear() - Convert an A-law value to 16-bit linear PCM * */ -PJ_DEF(int) -pjmedia_alaw2linear( +PJ_DEF(int) pjmedia_alaw2linear( unsigned a_val) { int t; @@ -208,8 +206,7 @@ pjmedia_alaw2linear( * For further information see John C. Bellamy's Digital Telephony, 1982, * John Wiley & Sons, pps 98-111 and 472-476. */ -PJ_DECL(unsigned char) -pjmedia_linear2ulaw( +PJ_DEF(unsigned char) pjmedia_linear2ulaw( int pcm_val) /* 2's complement (16-bit range) */ { int mask; @@ -250,8 +247,7 @@ pjmedia_linear2ulaw( * Note that this function expects to be passed the complement of the * original code word. This is in keeping with ISDN conventions. */ -PJ_DEF(int) -pjmedia_ulaw2linear( +PJ_DEF(int) pjmedia_ulaw2linear( unsigned char u_val) { int t; @@ -276,8 +272,7 @@ pjmedia_ulaw2linear( } /* A-law to u-law conversion */ -PJ_DEF(unsigned char) -pjmedia_alaw2ulaw( +PJ_DEF(unsigned char) pjmedia_alaw2ulaw( unsigned char aval) { aval &= 0xff; @@ -286,8 +281,7 @@ pjmedia_alaw2ulaw( } /* u-law to A-law conversion */ -PJ_DEF(unsigned char) -pjmedia_ulaw2alaw( +PJ_DEF(unsigned char) pjmedia_ulaw2alaw( unsigned char uval) { uval &= 0xff; diff --git a/pjmedia/src/pjmedia/codec.c b/pjmedia/src/pjmedia/codec.c index 12ff4c02..4e5ea2a4 100644 --- a/pjmedia/src/pjmedia/codec.c +++ b/pjmedia/src/pjmedia/codec.c @@ -50,8 +50,7 @@ PJ_DEF(pj_status_t) pjmedia_codec_mgr_init (pjmedia_codec_mgr *mgr) /* * Register a codec factory. */ -PJ_DEF(pj_status_t) -pjmedia_codec_mgr_register_factory( pjmedia_codec_mgr *mgr, +PJ_DEF(pj_status_t) pjmedia_codec_mgr_register_factory( pjmedia_codec_mgr *mgr, pjmedia_codec_factory *factory) { pjmedia_codec_info info[PJMEDIA_CODEC_MGR_MAX_CODECS]; @@ -100,9 +99,9 @@ pjmedia_codec_mgr_register_factory( pjmedia_codec_mgr *mgr, /* * Unregister a codec factory. */ -PJ_DEF(pj_status_t) -pjmedia_codec_mgr_unregister_factory(pjmedia_codec_mgr *mgr, - pjmedia_codec_factory *factory) +PJ_DEF(pj_status_t) pjmedia_codec_mgr_unregister_factory( + pjmedia_codec_mgr *mgr, + pjmedia_codec_factory *factory) { unsigned i; PJ_ASSERT_RETURN(mgr && factory, PJ_EINVAL); @@ -139,8 +138,7 @@ pjmedia_codec_mgr_unregister_factory(pjmedia_codec_mgr *mgr, /* * Enum all codecs. */ -PJ_DEF(pj_status_t) -pjmedia_codec_mgr_enum_codecs(pjmedia_codec_mgr *mgr, +PJ_DEF(pj_status_t) pjmedia_codec_mgr_enum_codecs(pjmedia_codec_mgr *mgr, unsigned *count, pjmedia_codec_info codecs[], unsigned *prio) @@ -170,8 +168,7 @@ pjmedia_codec_mgr_enum_codecs(pjmedia_codec_mgr *mgr, /* * Get codec info for static payload type. */ -PJ_DEF(pj_status_t) -pjmedia_codec_mgr_get_codec_info( pjmedia_codec_mgr *mgr, +PJ_DEF(pj_status_t) pjmedia_codec_mgr_get_codec_info( pjmedia_codec_mgr *mgr, unsigned pt, const pjmedia_codec_info **p_info) { @@ -222,8 +219,7 @@ PJ_DEF(char*) pjmedia_codec_info_to_id( const pjmedia_codec_info *info, * "L16" is specified, then it will find "L16/8000/1", "L16/16000/1", * and so on, up to the maximum count specified in the argument. */ -PJ_DEF(pj_status_t) -pjmedia_codec_mgr_find_codecs_by_id( pjmedia_codec_mgr *mgr, +PJ_DEF(pj_status_t) pjmedia_codec_mgr_find_codecs_by_id( pjmedia_codec_mgr *mgr, const pj_str_t *codec_id, unsigned *count, const pjmedia_codec_info *p_info[], @@ -306,10 +302,10 @@ static void sort_codecs(pjmedia_codec_mgr *mgr) * are found with the same codec_id prefix, then the function sets the * priorities of all those codecs. */ -PJ_DEF(pj_status_t) -pjmedia_codec_mgr_set_codec_priority(pjmedia_codec_mgr *mgr, - const pj_str_t *codec_id, - pj_uint8_t prio) +PJ_DEF(pj_status_t) pjmedia_codec_mgr_set_codec_priority( + pjmedia_codec_mgr *mgr, + const pj_str_t *codec_id, + pj_uint8_t prio) { unsigned i, found = 0; diff --git a/pjmedia/src/pjmedia/conference.c b/pjmedia/src/pjmedia/conference.c index 74bdafcd..7dd1fa31 100644 --- a/pjmedia/src/pjmedia/conference.c +++ b/pjmedia/src/pjmedia/conference.c @@ -818,7 +818,7 @@ PJ_DEF(pj_status_t) pjmedia_conf_add_passive_port( pjmedia_conf *conf, /* * Change TX and RX settings for the port. */ -PJ_DECL(pj_status_t) pjmedia_conf_configure_port( pjmedia_conf *conf, +PJ_DEF(pj_status_t) pjmedia_conf_configure_port( pjmedia_conf *conf, unsigned slot, pjmedia_port_op tx, pjmedia_port_op rx) @@ -979,7 +979,7 @@ PJ_DEF(unsigned) pjmedia_conf_get_port_count(pjmedia_conf *conf) /* * Get total number of ports connections currently set up in the bridge. */ -PJ_DECL(unsigned) pjmedia_conf_get_connect_count(pjmedia_conf *conf) +PJ_DEF(unsigned) pjmedia_conf_get_connect_count(pjmedia_conf *conf) { return conf->connect_cnt; } diff --git a/pjmedia/src/pjmedia/echo_common.c b/pjmedia/src/pjmedia/echo_common.c index 079333b4..568a606e 100644 --- a/pjmedia/src/pjmedia/echo_common.c +++ b/pjmedia/src/pjmedia/echo_common.c @@ -21,7 +21,7 @@ #include <pjmedia/echo.h> #include <pj/assert.h> #include <pj/pool.h> - +#include "echo_internal.h" typedef struct ec_operations ec_operations; @@ -55,29 +55,6 @@ struct ec_operations }; - -/* - * Simple echo suppressor - */ -PJ_DECL(pj_status_t) echo_supp_create(pj_pool_t *pool, - unsigned clock_rate, - unsigned samples_per_frame, - unsigned tail_ms, - unsigned latency_ms, - unsigned options, - void **p_state ); -PJ_DECL(pj_status_t) echo_supp_destroy(void *state); -PJ_DECL(pj_status_t) echo_supp_playback(void *state, - pj_int16_t *play_frm ); -PJ_DECL(pj_status_t) echo_supp_capture(void *state, - pj_int16_t *rec_frm, - unsigned options ); -PJ_DECL(pj_status_t) echo_supp_cancel_echo(void *state, - pj_int16_t *rec_frm, - const pj_int16_t *play_frm, - unsigned options, - void *reserved ); - static struct ec_operations echo_supp_op = { &echo_supp_create, @@ -93,25 +70,6 @@ static struct ec_operations echo_supp_op = * Speex AEC prototypes */ #if defined(PJMEDIA_HAS_SPEEX_AEC) && PJMEDIA_HAS_SPEEX_AEC!=0 -PJ_DECL(pj_status_t) speex_aec_create(pj_pool_t *pool, - unsigned clock_rate, - unsigned samples_per_frame, - unsigned tail_ms, - unsigned latency_ms, - unsigned options, - void **p_state ); -PJ_DECL(pj_status_t) speex_aec_destroy(void *state ); -PJ_DECL(pj_status_t) speex_aec_playback(void *state, - pj_int16_t *play_frm ); -PJ_DECL(pj_status_t) speex_aec_capture(void *state, - pj_int16_t *rec_frm, - unsigned options ); -PJ_DECL(pj_status_t) speex_aec_cancel_echo(void *state, - pj_int16_t *rec_frm, - const pj_int16_t *play_frm, - unsigned options, - void *reserved ); - static struct ec_operations aec_op = { &speex_aec_create, diff --git a/pjmedia/src/pjmedia/echo_internal.h b/pjmedia/src/pjmedia/echo_internal.h new file mode 100644 index 00000000..e134f864 --- /dev/null +++ b/pjmedia/src/pjmedia/echo_internal.h @@ -0,0 +1,71 @@ +/* $Id$ */ +/* + * Copyright (C) 2003-2007 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_ECHO_INTERNAL_H__ +#define __PJMEDIA_ECHO_INTERNAL_H__ + +#include <pjmedia/types.h> + +PJ_BEGIN_DECL + +/* + * Simple echo suppressor + */ +PJ_DECL(pj_status_t) echo_supp_create(pj_pool_t *pool, + unsigned clock_rate, + unsigned samples_per_frame, + unsigned tail_ms, + unsigned latency_ms, + unsigned options, + void **p_state ); +PJ_DECL(pj_status_t) echo_supp_destroy(void *state); +PJ_DECL(pj_status_t) echo_supp_playback(void *state, + pj_int16_t *play_frm ); +PJ_DECL(pj_status_t) echo_supp_capture(void *state, + pj_int16_t *rec_frm, + unsigned options ); +PJ_DECL(pj_status_t) echo_supp_cancel_echo(void *state, + pj_int16_t *rec_frm, + const pj_int16_t *play_frm, + unsigned options, + void *reserved ); + +PJ_DECL(pj_status_t) speex_aec_create(pj_pool_t *pool, + unsigned clock_rate, + unsigned samples_per_frame, + unsigned tail_ms, + unsigned latency_ms, + unsigned options, + void **p_state ); +PJ_DECL(pj_status_t) speex_aec_destroy(void *state ); +PJ_DECL(pj_status_t) speex_aec_playback(void *state, + pj_int16_t *play_frm ); +PJ_DECL(pj_status_t) speex_aec_capture(void *state, + pj_int16_t *rec_frm, + unsigned options ); +PJ_DECL(pj_status_t) speex_aec_cancel_echo(void *state, + pj_int16_t *rec_frm, + const pj_int16_t *play_frm, + unsigned options, + void *reserved ); + + +PJ_END_DECL + +#endif + diff --git a/pjmedia/src/pjmedia/echo_speex.c b/pjmedia/src/pjmedia/echo_speex.c index daf19d42..3e0d4812 100644 --- a/pjmedia/src/pjmedia/echo_speex.c +++ b/pjmedia/src/pjmedia/echo_speex.c @@ -28,6 +28,7 @@ #include <speex/speex_echo.h> #include <speex/speex_preprocess.h> +#include "echo_internal.h" #define THIS_FILE "echo_speex.c" #define BUF_COUNT 16 @@ -226,29 +227,6 @@ PJ_DEF(pj_status_t) pjmedia_frame_queue_get( pjmedia_frame_queue *fq, return PJ_SUCCESS; } -/* - * Prototypes - */ -PJ_DECL(pj_status_t) speex_aec_create(pj_pool_t *pool, - unsigned clock_rate, - unsigned samples_per_frame, - unsigned tail_ms, - unsigned latency_ms, - unsigned options, - void **p_state ); -PJ_DECL(pj_status_t) speex_aec_destroy(void *state ); -PJ_DECL(pj_status_t) speex_aec_playback(void *state, - pj_int16_t *play_frm ); -PJ_DECL(pj_status_t) speex_aec_capture(void *state, - pj_int16_t *rec_frm, - unsigned options ); -PJ_DECL(pj_status_t) speex_aec_cancel_echo(void *state, - pj_int16_t *rec_frm, - const pj_int16_t *play_frm, - unsigned options, - void *reserved ); - - enum { TS_FLAG_PLAY = 1, diff --git a/pjmedia/src/pjmedia/echo_suppress.c b/pjmedia/src/pjmedia/echo_suppress.c index 93a3cba2..3f5c0ef4 100644 --- a/pjmedia/src/pjmedia/echo_suppress.c +++ b/pjmedia/src/pjmedia/echo_suppress.c @@ -25,6 +25,7 @@ #include <pj/os.h> #include <pj/pool.h> +#include "echo_internal.h" #define THIS_FILE "echo_suppress.c" @@ -44,30 +45,6 @@ typedef struct echo_supp /* - * Prototypes. - */ -PJ_DECL(pj_status_t) echo_supp_create(pj_pool_t *pool, - unsigned clock_rate, - unsigned samples_per_frame, - unsigned tail_ms, - unsigned latency_ms, - unsigned options, - void **p_state ); -PJ_DECL(pj_status_t) echo_supp_destroy(void *state); -PJ_DECL(pj_status_t) echo_supp_playback(void *state, - pj_int16_t *play_frm ); -PJ_DECL(pj_status_t) echo_supp_capture(void *state, - pj_int16_t *rec_frm, - unsigned options ); -PJ_DECL(pj_status_t) echo_supp_cancel_echo(void *state, - pj_int16_t *rec_frm, - const pj_int16_t *play_frm, - unsigned options, - void *reserved ); - - - -/* * Create. */ PJ_DEF(pj_status_t) echo_supp_create( pj_pool_t *pool, diff --git a/pjmedia/src/pjmedia/endpoint.c b/pjmedia/src/pjmedia/endpoint.c index 5848c4a3..d9296f1c 100644 --- a/pjmedia/src/pjmedia/endpoint.c +++ b/pjmedia/src/pjmedia/endpoint.c @@ -50,25 +50,6 @@ pj_bool_t pjmedia_add_rtpmap_for_static_pt = PJMEDIA_ADD_RTPMAP_FOR_STATIC_PT; -/** - * Defined in pjmedia/errno.c - * - * Get error message for the specified error code. Note that this - * function is only able to decode PJMEDIA specific error code. - * Application should use pj_strerror(), which should be able to - * decode all error codes belonging to all subsystems (e.g. pjlib, - * pjmedia, pjsip, etc). - * - * @param status The error code. - * @param buffer The buffer where to put the error message. - * @param bufsize Size of the buffer. - * - * @return The error message as NULL terminated string, - * wrapped with pj_str_t. - */ -PJ_DECL(pj_str_t) pjmedia_strerror( pj_status_t status, char *buffer, - pj_size_t bufsize); - /* Worker thread proc. */ static int PJ_THREAD_FUNC worker_proc(void*); diff --git a/pjmedia/src/pjmedia/g711.c b/pjmedia/src/pjmedia/g711.c index b2c08199..3997da5c 100644 --- a/pjmedia/src/pjmedia/g711.c +++ b/pjmedia/src/pjmedia/g711.c @@ -42,10 +42,6 @@ #define FRAME_SIZE (8000 * PTIME / 1000) /* 80 bytes */ #define SAMPLES_PER_FRAME (8000 * PTIME / 1000) /* 80 samples */ -/* These are the only public functions exported to applications */ -PJ_DECL(pj_status_t) g711_init_factory (pjmedia_codec_factory *factory, - pj_pool_t *pool); - /* Prototypes for G711 factory */ static pj_status_t g711_test_alloc( pjmedia_codec_factory *factory, const pjmedia_codec_info *id ); diff --git a/pjmedia/src/pjmedia/mem_capture.c b/pjmedia/src/pjmedia/mem_capture.c index 074f377f..1a73e0d0 100644 --- a/pjmedia/src/pjmedia/mem_capture.c +++ b/pjmedia/src/pjmedia/mem_capture.c @@ -51,7 +51,7 @@ static pj_status_t rec_get_frame(pjmedia_port *this_port, static pj_status_t rec_on_destroy(pjmedia_port *this_port); -PJ_DECL(pj_status_t) pjmedia_mem_capture_create(pj_pool_t *pool, +PJ_DEF(pj_status_t) pjmedia_mem_capture_create( pj_pool_t *pool, void *buffer, pj_size_t size, unsigned clock_rate, @@ -104,8 +104,7 @@ PJ_DECL(pj_status_t) pjmedia_mem_capture_create(pj_pool_t *pool, * Register a callback to be called when the file reading has reached the * end of buffer. */ -PJ_DEF(pj_status_t) -pjmedia_mem_capture_set_eof_cb( pjmedia_port *port, +PJ_DEF(pj_status_t) pjmedia_mem_capture_set_eof_cb( pjmedia_port *port, void *user_data, pj_status_t (*cb)(pjmedia_port *port, void *usr_data)) diff --git a/pjmedia/src/pjmedia/mem_player.c b/pjmedia/src/pjmedia/mem_player.c index 95add9a5..678391c0 100644 --- a/pjmedia/src/pjmedia/mem_player.c +++ b/pjmedia/src/pjmedia/mem_player.c @@ -105,8 +105,7 @@ PJ_DEF(pj_status_t) pjmedia_mem_player_create( pj_pool_t *pool, * Register a callback to be called when the file reading has reached the * end of buffer. */ -PJ_DEF(pj_status_t) -pjmedia_mem_player_set_eof_cb( pjmedia_port *port, +PJ_DEF(pj_status_t) pjmedia_mem_player_set_eof_cb( pjmedia_port *port, void *user_data, pj_status_t (*cb)(pjmedia_port *port, void *usr_data)) diff --git a/pjmedia/src/pjmedia/sdp.c b/pjmedia/src/pjmedia/sdp.c index 25d86835..be6f8025 100644 --- a/pjmedia/src/pjmedia/sdp.c +++ b/pjmedia/src/pjmedia/sdp.c @@ -131,11 +131,10 @@ PJ_DEF(pjmedia_sdp_attr*) pjmedia_sdp_attr_clone(pj_pool_t *pool, return attr; } -PJ_DEF(pjmedia_sdp_attr*) -pjmedia_sdp_attr_find (unsigned count, - pjmedia_sdp_attr *const attr_array[], - const pj_str_t *name, - const pj_str_t *c_fmt) +PJ_DEF(pjmedia_sdp_attr*) pjmedia_sdp_attr_find (unsigned count, + pjmedia_sdp_attr *const attr_array[], + const pj_str_t *name, + const pj_str_t *c_fmt) { unsigned i; unsigned c_pt = 0xFFFF; @@ -158,11 +157,10 @@ pjmedia_sdp_attr_find (unsigned count, return NULL; } -PJ_DEF(pjmedia_sdp_attr*) -pjmedia_sdp_attr_find2(unsigned count, - pjmedia_sdp_attr *const attr_array[], - const char *c_name, - const pj_str_t *c_fmt) +PJ_DEF(pjmedia_sdp_attr*) pjmedia_sdp_attr_find2(unsigned count, + pjmedia_sdp_attr *const attr_array[], + const char *c_name, + const pj_str_t *c_fmt) { pj_str_t name; @@ -615,9 +613,9 @@ PJ_DEF(pjmedia_sdp_media*) pjmedia_sdp_media_clone( return m; } -PJ_DEF(pjmedia_sdp_attr*) -pjmedia_sdp_media_find_attr(const pjmedia_sdp_media *m, - const pj_str_t *name, const pj_str_t *fmt) +PJ_DEF(pjmedia_sdp_attr*) pjmedia_sdp_media_find_attr( + const pjmedia_sdp_media *m, + const pj_str_t *name, const pj_str_t *fmt) { PJ_ASSERT_RETURN(m && name, NULL); return pjmedia_sdp_attr_find(m->attr_count, m->attr, name, fmt); @@ -625,9 +623,9 @@ pjmedia_sdp_media_find_attr(const pjmedia_sdp_media *m, -PJ_DEF(pjmedia_sdp_attr*) -pjmedia_sdp_media_find_attr2(const pjmedia_sdp_media *m, - const char *name, const pj_str_t *fmt) +PJ_DEF(pjmedia_sdp_attr*) pjmedia_sdp_media_find_attr2( + const pjmedia_sdp_media *m, + const char *name, const pj_str_t *fmt) { PJ_ASSERT_RETURN(m && name, NULL); return pjmedia_sdp_attr_find2(m->attr_count, m->attr, name, fmt); @@ -640,16 +638,14 @@ PJ_DEF(pj_status_t) pjmedia_sdp_media_add_attr( pjmedia_sdp_media *m, return pjmedia_sdp_attr_add(&m->attr_count, m->attr, attr); } -PJ_DEF(unsigned) -pjmedia_sdp_media_remove_all_attr(pjmedia_sdp_media *m, - const char *name) +PJ_DEF(unsigned) pjmedia_sdp_media_remove_all_attr(pjmedia_sdp_media *m, + const char *name) { return pjmedia_sdp_attr_remove_all(&m->attr_count, m->attr, name); } -PJ_DEF(pj_status_t) -pjmedia_sdp_media_remove_attr(pjmedia_sdp_media *m, - pjmedia_sdp_attr *attr) +PJ_DEF(pj_status_t) pjmedia_sdp_media_remove_attr(pjmedia_sdp_media *m, + pjmedia_sdp_attr *attr) { return pjmedia_sdp_attr_remove(&m->attr_count, m->attr, attr); } @@ -1128,9 +1124,8 @@ PJ_DEF(int) pjmedia_sdp_print( const pjmedia_sdp_session *desc, /* * Clone session */ -PJ_DEF(pjmedia_sdp_session*) -pjmedia_sdp_session_clone( pj_pool_t *pool, - const pjmedia_sdp_session *rhs) +PJ_DEF(pjmedia_sdp_session*) pjmedia_sdp_session_clone( pj_pool_t *pool, + const pjmedia_sdp_session *rhs) { pjmedia_sdp_session *sess; unsigned i; diff --git a/pjmedia/src/pjmedia/sdp_neg.c b/pjmedia/src/pjmedia/sdp_neg.c index f24dc41e..12c0f49c 100644 --- a/pjmedia/src/pjmedia/sdp_neg.c +++ b/pjmedia/src/pjmedia/sdp_neg.c @@ -66,8 +66,7 @@ PJ_DEF(const char*) pjmedia_sdp_neg_state_str(pjmedia_sdp_neg_state state) /* * Create with local offer. */ -PJ_DEF(pj_status_t) -pjmedia_sdp_neg_create_w_local_offer( pj_pool_t *pool, +PJ_DEF(pj_status_t) pjmedia_sdp_neg_create_w_local_offer( pj_pool_t *pool, const pjmedia_sdp_session *local, pjmedia_sdp_neg **p_neg) { @@ -98,8 +97,7 @@ pjmedia_sdp_neg_create_w_local_offer( pj_pool_t *pool, /* * Create with remote offer and initial local offer/answer. */ -PJ_DEF(pj_status_t) -pjmedia_sdp_neg_create_w_remote_offer(pj_pool_t *pool, +PJ_DEF(pj_status_t) pjmedia_sdp_neg_create_w_remote_offer(pj_pool_t *pool, const pjmedia_sdp_session *initial, const pjmedia_sdp_session *remote, pjmedia_sdp_neg **p_neg) @@ -147,9 +145,9 @@ pjmedia_sdp_neg_create_w_remote_offer(pj_pool_t *pool, /* * Set codec order preference. */ -PJ_DEF(pj_status_t) -pjmedia_sdp_neg_set_prefer_remote_codec_order(pjmedia_sdp_neg *neg, - pj_bool_t prefer_remote) +PJ_DEF(pj_status_t) pjmedia_sdp_neg_set_prefer_remote_codec_order( + pjmedia_sdp_neg *neg, + pj_bool_t prefer_remote) { PJ_ASSERT_RETURN(neg, PJ_EINVAL); neg->prefer_remote_codec_order = prefer_remote; @@ -160,8 +158,7 @@ pjmedia_sdp_neg_set_prefer_remote_codec_order(pjmedia_sdp_neg *neg, /* * Get SDP negotiator state. */ -PJ_DEF(pjmedia_sdp_neg_state) -pjmedia_sdp_neg_get_state( pjmedia_sdp_neg *neg ) +PJ_DEF(pjmedia_sdp_neg_state) pjmedia_sdp_neg_get_state( pjmedia_sdp_neg *neg ) { /* Check arguments are valid. */ PJ_ASSERT_RETURN(neg != NULL, PJMEDIA_SDP_NEG_STATE_NULL); @@ -169,9 +166,8 @@ pjmedia_sdp_neg_get_state( pjmedia_sdp_neg *neg ) } -PJ_DEF(pj_status_t) -pjmedia_sdp_neg_get_active_local( pjmedia_sdp_neg *neg, - const pjmedia_sdp_session **local) +PJ_DEF(pj_status_t) pjmedia_sdp_neg_get_active_local( pjmedia_sdp_neg *neg, + const pjmedia_sdp_session **local) { PJ_ASSERT_RETURN(neg && local, PJ_EINVAL); PJ_ASSERT_RETURN(neg->active_local_sdp, PJMEDIA_SDPNEG_ENOACTIVE); @@ -181,8 +177,7 @@ pjmedia_sdp_neg_get_active_local( pjmedia_sdp_neg *neg, } -PJ_DEF(pj_status_t) -pjmedia_sdp_neg_get_active_remote( pjmedia_sdp_neg *neg, +PJ_DEF(pj_status_t) pjmedia_sdp_neg_get_active_remote( pjmedia_sdp_neg *neg, const pjmedia_sdp_session **remote) { PJ_ASSERT_RETURN(neg && remote, PJ_EINVAL); @@ -193,8 +188,7 @@ pjmedia_sdp_neg_get_active_remote( pjmedia_sdp_neg *neg, } -PJ_DEF(pj_bool_t) -pjmedia_sdp_neg_was_answer_remote(pjmedia_sdp_neg *neg) +PJ_DEF(pj_bool_t) pjmedia_sdp_neg_was_answer_remote(pjmedia_sdp_neg *neg) { PJ_ASSERT_RETURN(neg, PJ_FALSE); @@ -202,8 +196,7 @@ pjmedia_sdp_neg_was_answer_remote(pjmedia_sdp_neg *neg) } -PJ_DEF(pj_status_t) -pjmedia_sdp_neg_get_neg_remote( pjmedia_sdp_neg *neg, +PJ_DEF(pj_status_t) pjmedia_sdp_neg_get_neg_remote( pjmedia_sdp_neg *neg, const pjmedia_sdp_session **remote) { PJ_ASSERT_RETURN(neg && remote, PJ_EINVAL); @@ -213,8 +206,7 @@ pjmedia_sdp_neg_get_neg_remote( pjmedia_sdp_neg *neg, return PJ_SUCCESS; } -PJ_DEF(pj_status_t) -pjmedia_sdp_neg_get_neg_local( pjmedia_sdp_neg *neg, +PJ_DEF(pj_status_t) pjmedia_sdp_neg_get_neg_local( pjmedia_sdp_neg *neg, const pjmedia_sdp_session **local) { PJ_ASSERT_RETURN(neg && local, PJ_EINVAL); @@ -228,8 +220,7 @@ pjmedia_sdp_neg_get_neg_local( pjmedia_sdp_neg *neg, /* * Modify local SDP and wait for remote answer. */ -PJ_DEF(pj_status_t) -pjmedia_sdp_neg_modify_local_offer( pj_pool_t *pool, +PJ_DEF(pj_status_t) pjmedia_sdp_neg_modify_local_offer( pj_pool_t *pool, pjmedia_sdp_neg *neg, const pjmedia_sdp_session *local) { @@ -249,8 +240,7 @@ pjmedia_sdp_neg_modify_local_offer( pj_pool_t *pool, } -PJ_DEF(pj_status_t) -pjmedia_sdp_neg_send_local_offer( pj_pool_t *pool, +PJ_DEF(pj_status_t) pjmedia_sdp_neg_send_local_offer( pj_pool_t *pool, pjmedia_sdp_neg *neg, const pjmedia_sdp_session **offer) { @@ -285,8 +275,7 @@ pjmedia_sdp_neg_send_local_offer( pj_pool_t *pool, } -PJ_DEF(pj_status_t) -pjmedia_sdp_neg_set_remote_answer( pj_pool_t *pool, +PJ_DEF(pj_status_t) pjmedia_sdp_neg_set_remote_answer( pj_pool_t *pool, pjmedia_sdp_neg *neg, const pjmedia_sdp_session *remote) { @@ -308,8 +297,7 @@ pjmedia_sdp_neg_set_remote_answer( pj_pool_t *pool, return PJ_SUCCESS; } -PJ_DEF(pj_status_t) -pjmedia_sdp_neg_set_remote_offer( pj_pool_t *pool, +PJ_DEF(pj_status_t) pjmedia_sdp_neg_set_remote_offer( pj_pool_t *pool, pjmedia_sdp_neg *neg, const pjmedia_sdp_session *remote) { @@ -330,8 +318,7 @@ pjmedia_sdp_neg_set_remote_offer( pj_pool_t *pool, return PJ_SUCCESS; } -PJ_DEF(pj_status_t) -pjmedia_sdp_neg_set_local_answer( pj_pool_t *pool, +PJ_DEF(pj_status_t) pjmedia_sdp_neg_set_local_answer( pj_pool_t *pool, pjmedia_sdp_neg *neg, const pjmedia_sdp_session *local) { diff --git a/pjmedia/src/pjmedia/session.c b/pjmedia/src/pjmedia/session.c index 72e55a99..ae721548 100644 --- a/pjmedia/src/pjmedia/session.c +++ b/pjmedia/src/pjmedia/session.c @@ -478,8 +478,7 @@ PJ_DEF(pj_status_t) pjmedia_stream_info_from_sdp( /* * Initialize session info from SDP session descriptors. */ -PJ_DEF(pj_status_t) -pjmedia_session_info_from_sdp( pj_pool_t *pool, +PJ_DEF(pj_status_t) pjmedia_session_info_from_sdp( pj_pool_t *pool, pjmedia_endpt *endpt, unsigned max_streams, pjmedia_session_info *si, @@ -760,8 +759,7 @@ PJ_DEF(pj_status_t) pjmedia_session_get_dtmf( pjmedia_session *session, /* * Install DTMF callback. */ -PJ_DEF(pj_status_t) -pjmedia_session_set_dtmf_callback(pjmedia_session *session, +PJ_DEF(pj_status_t) pjmedia_session_set_dtmf_callback(pjmedia_session *session, unsigned index, void (*cb)(pjmedia_stream*, void *user_data, diff --git a/pjmedia/src/pjmedia/splitcomb.c b/pjmedia/src/pjmedia/splitcomb.c index a3d8e05f..cf729d01 100644 --- a/pjmedia/src/pjmedia/splitcomb.c +++ b/pjmedia/src/pjmedia/splitcomb.c @@ -216,8 +216,7 @@ PJ_DEF(pj_status_t) pjmedia_splitcomb_set_channel( pjmedia_port *splitcomb, /* * Create reverse phase port for the specified channel. */ -PJ_DEF(pj_status_t) -pjmedia_splitcomb_create_rev_channel( pj_pool_t *pool, +PJ_DEF(pj_status_t) pjmedia_splitcomb_create_rev_channel( pj_pool_t *pool, pjmedia_port *splitcomb, unsigned ch_num, unsigned options, diff --git a/pjmedia/src/pjmedia/transport_udp.c b/pjmedia/src/pjmedia/transport_udp.c index e5192598..6b1e265d 100644 --- a/pjmedia/src/pjmedia/transport_udp.c +++ b/pjmedia/src/pjmedia/transport_udp.c @@ -324,8 +324,7 @@ on_error: /* * Get media socket info. */ -PJ_DEF(pj_status_t) -pjmedia_transport_udp_get_info( pjmedia_transport *tp, +PJ_DEF(pj_status_t) pjmedia_transport_udp_get_info( pjmedia_transport *tp, pjmedia_transport_udp_info *inf) { return transport_get_info(tp, &inf->skinfo); diff --git a/pjmedia/src/pjmedia/wav_player.c b/pjmedia/src/pjmedia/wav_player.c index c7e81d09..225f1e58 100644 --- a/pjmedia/src/pjmedia/wav_player.c +++ b/pjmedia/src/pjmedia/wav_player.c @@ -455,8 +455,7 @@ PJ_DEF(pj_ssize_t) pjmedia_wav_player_port_get_pos( pjmedia_port *port ) * Register a callback to be called when the file reading has reached the * end of file. */ -PJ_DEF(pj_status_t) -pjmedia_wav_player_set_eof_cb( pjmedia_port *port, +PJ_DEF(pj_status_t) pjmedia_wav_player_set_eof_cb( pjmedia_port *port, void *user_data, pj_status_t (*cb)(pjmedia_port *port, void *usr_data)) diff --git a/pjmedia/src/pjmedia/wav_playlist.c b/pjmedia/src/pjmedia/wav_playlist.c index d5882c8a..a192cef1 100644 --- a/pjmedia/src/pjmedia/wav_playlist.c +++ b/pjmedia/src/pjmedia/wav_playlist.c @@ -538,8 +538,7 @@ on_error: * Register a callback to be called when the file reading has reached the * end of the last file. */ -PJ_DEF(pj_status_t) -pjmedia_wav_playlist_set_eof_cb(pjmedia_port *port, +PJ_DEF(pj_status_t) pjmedia_wav_playlist_set_eof_cb(pjmedia_port *port, void *user_data, pj_status_t (*cb)(pjmedia_port *port, void *usr_data)) diff --git a/pjmedia/src/pjmedia/wav_writer.c b/pjmedia/src/pjmedia/wav_writer.c index 89eb3471..eee72cf2 100644 --- a/pjmedia/src/pjmedia/wav_writer.c +++ b/pjmedia/src/pjmedia/wav_writer.c @@ -194,8 +194,7 @@ PJ_DEF(pj_ssize_t) pjmedia_wav_writer_port_get_pos( pjmedia_port *port ) /* * Register callback. */ -PJ_DEF(pj_status_t) -pjmedia_wav_writer_port_set_cb( pjmedia_port *port, +PJ_DEF(pj_status_t) pjmedia_wav_writer_port_set_cb( pjmedia_port *port, pj_size_t pos, void *user_data, pj_status_t (*cb)(pjmedia_port *port, |