amr_helper.h   amr_helper.h 
/* $Id: amr_helper.h 3589 2011-06-20 04:06:19Z nanang $ */ /* $Id: amr_helper.h 3841 2011-10-24 09:28:13Z ming $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 audiodev.h   audiodev.h 
/* $Id: audiodev.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: audiodev.h 3664 2011-07-19 03:42:28Z nanang $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 29 skipping to change at line 29
*/ */
#ifndef __PJMEDIA_AUDIODEV_AUDIODEV_H__ #ifndef __PJMEDIA_AUDIODEV_AUDIODEV_H__
#define __PJMEDIA_AUDIODEV_AUDIODEV_H__ #define __PJMEDIA_AUDIODEV_AUDIODEV_H__
/** /**
* @file audiodev.h * @file audiodev.h
* @brief Audio device API. * @brief Audio device API.
*/ */
#include <pjmedia-audiodev/config.h> #include <pjmedia-audiodev/config.h>
#include <pjmedia-audiodev/errno.h> #include <pjmedia-audiodev/errno.h>
#include <pjmedia/format.h>
#include <pjmedia/frame.h>
#include <pjmedia/types.h> #include <pjmedia/types.h>
#include <pj/pool.h> #include <pj/pool.h>
PJ_BEGIN_DECL PJ_BEGIN_DECL
/** /**
* @defgroup s2_audio_device_reference Audio Device API Reference * @defgroup s2_audio_device_reference Audio Device API Reference
* @ingroup audio_device_api * @ingroup audio_device_api
* @brief API Reference * @brief API Reference
* @{ * @{
 End of changes. 2 change blocks. 
1 lines changed or deleted 3 lines changed or added


 cc_gcc.h   cc_gcc.h 
/* $Id: cc_gcc.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: cc_gcc.h 3664 2011-07-19 03:42:28Z nanang $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 71 skipping to change at line 71
#define PJ_INT64(val) val##LL #define PJ_INT64(val) val##LL
#define PJ_UINT64(val) val##LLU #define PJ_UINT64(val) val##LLU
#define PJ_INT64_FMT "L" #define PJ_INT64_FMT "L"
#ifdef __GLIBC__ #ifdef __GLIBC__
# define PJ_HAS_BZERO 1 # define PJ_HAS_BZERO 1
#endif #endif
#define PJ_UNREACHED(x) #define PJ_UNREACHED(x)
#define PJ_ALIGN_DATA(declaration, alignment) declaration __attribute__((al
igned (alignment)))
#endif /* __PJ_COMPAT_CC_GCC_H__ */ #endif /* __PJ_COMPAT_CC_GCC_H__ */
 End of changes. 2 change blocks. 
1 lines changed or deleted 4 lines changed or added


 cc_msvc.h   cc_msvc.h 
/* $Id: cc_msvc.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: cc_msvc.h 3664 2011-07-19 03:42:28Z nanang $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 83 skipping to change at line 83
typedef __int64 pj_int64_t; typedef __int64 pj_int64_t;
typedef unsigned __int64 pj_uint64_t; typedef unsigned __int64 pj_uint64_t;
#define PJ_INT64(val) val##i64 #define PJ_INT64(val) val##i64
#define PJ_UINT64(val) val##ui64 #define PJ_UINT64(val) val##ui64
#define PJ_INT64_FMT "I64" #define PJ_INT64_FMT "I64"
#define PJ_UNREACHED(x) #define PJ_UNREACHED(x)
#define PJ_ALIGN_DATA(declaration, alignment) __declspec(align(alignment))
declaration
#endif /* __PJ_COMPAT_CC_MSVC_H__ */ #endif /* __PJ_COMPAT_CC_MSVC_H__ */
 End of changes. 2 change blocks. 
1 lines changed or deleted 4 lines changed or added


 circbuf.h   circbuf.h 
/* $Id: circbuf.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: circbuf.h 3664 2011-07-19 03:42:28Z nanang $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 32 skipping to change at line 32
#define __PJMEDIA_CIRC_BUF_H__ #define __PJMEDIA_CIRC_BUF_H__
/** /**
* @file circbuf.h * @file circbuf.h
* @brief Circular Buffer. * @brief Circular Buffer.
*/ */
#include <pj/assert.h> #include <pj/assert.h>
#include <pj/errno.h> #include <pj/errno.h>
#include <pj/pool.h> #include <pj/pool.h>
#include <pjmedia/frame.h>
/** /**
* @defgroup PJMED_CIRCBUF Circular Buffer * @defgroup PJMED_CIRCBUF Circular Buffer
* @ingroup PJMEDIA_FRAME_OP * @ingroup PJMEDIA_FRAME_OP
* @brief Circular buffer manages read and write contiguous audio samples i n a * @brief Circular buffer manages read and write contiguous audio samples i n a
* non-contiguous buffer as if the buffer were contiguous. This should give * non-contiguous buffer as if the buffer were contiguous. This should give
* better performance than keeping contiguous samples in a contiguous buffe r, * better performance than keeping contiguous samples in a contiguous buffe r,
* since read/write operations will only update the pointers, instead of * since read/write operations will only update the pointers, instead of
* shifting audio samples. * shifting audio samples.
* *
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 clock.h   clock.h 
/* $Id: clock.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: clock.h 3664 2011-07-19 03:42:28Z nanang $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 81 skipping to change at line 81
* (the default behavior) or <b>synchronously</b>. When it is run * (the default behavior) or <b>synchronously</b>. When it is run
* asynchronously, it will call the application's callback every time * asynchronously, it will call the application's callback every time
* the clock <b>tick</b> expires. When it is run synchronously, * the clock <b>tick</b> expires. When it is run synchronously,
* application must continuously polls the clock generator to synchronize * application must continuously polls the clock generator to synchronize
* the timing. * the timing.
*/ */
PJ_BEGIN_DECL PJ_BEGIN_DECL
/** /**
* Media clock source.
*/
typedef struct pjmedia_clock_src
{
pjmedia_type media_type; /**< Media type. */
unsigned clock_rate; /**< Clock rate. */
unsigned ptime_usec; /**< Frame interval (in usec). */
/**
* The timestamp field holds an increasing value in samples and its
* value is expected to be increased by clock_rate samples per second.
*/
pj_timestamp timestamp;
/**
* Timestamp's last update. The last_update field contains a value in
* ticks, and it is expected to be increased by pj_get_timestamp_freq()
* ticks per second.
*/
pj_timestamp last_update;
} pjmedia_clock_src;
/**
* This is an auxiliary function to initialize the media clock source.
*
* @param clocksrc The clock source to be initialized.
* @param media_type The media type.
* @param clock_rate The clock rate.
* @param ptime_usec Media frame interval (in usec).
*
* @return PJ_SUCCESS on success.
*/
PJ_DECL(pj_status_t) pjmedia_clock_src_init( pjmedia_clock_src *clocksrc,
pjmedia_type media_type,
unsigned clock_rate,
unsigned ptime_usec );
/**
* This function updates the clock source's timestamp. Application should
* use this function instead of updating the timestamp directly since this
* function will also update the last_update field of the clock source.
*
* @param clocksrc The clock source to be updated.
* @param timestamp The new timestamp, can be NULL if the current
* timestamp does not change (in this case it
* will only update the last_update field).
*
* @return PJ_SUCCESS on success.
*/
PJ_DECL(pj_status_t) pjmedia_clock_src_update( pjmedia_clock_src *clocksrc,
const pj_timestamp *timestam
p );
/**
* This function gets the clock source's current timestamp. Application
* should use this function instead of accessing the timestamp directly
* since this function will calculate the predicted timestamp for current
* time, based on the values of timestamp, last_update, and clock_rate.
*
* @param clocksrc The clock source.
* @param timestamp Argument to receive the current timestamp
*
* @return PJ_SUCCESS on success.
*/
PJ_DECL(pj_status_t)
pjmedia_clock_src_get_current_timestamp( const pjmedia_clock_src *clocksrc,
pj_timestamp *timestamp);
/**
* This function gets the clock source's time in msec.
*
* @param clocksrc The clock source.
*
* @return The clock source's time (in msec).
*/
PJ_DECL(pj_uint32_t)
pjmedia_clock_src_get_time_msec( const pjmedia_clock_src *clocksrc );
/**
* Opaque declaration for media clock. * Opaque declaration for media clock.
*/ */
typedef struct pjmedia_clock pjmedia_clock; typedef struct pjmedia_clock pjmedia_clock;
/** /**
* Options when creating the clock. * Options when creating the clock.
*/ */
enum pjmedia_clock_options enum pjmedia_clock_options
{ {
/** /**
skipping to change at line 103 skipping to change at line 179
* #pjmedia_clock_wait() in order to synchronize timing. * #pjmedia_clock_wait() in order to synchronize timing.
*/ */
PJMEDIA_CLOCK_NO_ASYNC = 1, PJMEDIA_CLOCK_NO_ASYNC = 1,
/** /**
* Prevent the clock from setting it's thread to highest priority. * Prevent the clock from setting it's thread to highest priority.
*/ */
PJMEDIA_CLOCK_NO_HIGHEST_PRIO = 2 PJMEDIA_CLOCK_NO_HIGHEST_PRIO = 2
}; };
typedef struct pjmedia_clock_param
{
/**
* The frame interval, in microseconds.
*/
unsigned usec_interval;
/**
* The media clock rate, to determine timestamp
* increment for each call.
*/
unsigned clock_rate;
} pjmedia_clock_param;
/** /**
* Type of media clock callback. * Type of media clock callback.
* *
* @param ts Current timestamp, in samples. * @param ts Current timestamp, in samples.
* @param user_data Application data that is passed when * @param user_data Application data that is passed when
* the clock was created. * the clock was created.
*/ */
typedef void pjmedia_clock_callback(const pj_timestamp *ts, typedef void pjmedia_clock_callback(const pj_timestamp *ts,
void *user_data); void *user_data);
/** /**
* Create media clock. * Create media clock. This creates a media clock object that will run
* periodically at an interval that is calculated from the audio parameters
.
* Once created, application must call #pjmedia_clock_start() to actually
* start the clock.
*
* @see pjmedia_clock_create2()
* *
* @param pool Pool to allocate memory. * @param pool Pool to allocate memory.
* @param clock_rate Number of samples per second. * @param clock_rate Number of samples per second.
* @param channel_count Number of channel. * @param channel_count Number of channel.
* @param samples_per_frame Number of samples per frame. This argument * @param samples_per_frame Number of samples per frame. This argument
* along with clock_rate and channel_count, specifi es * along with clock_rate and channel_count, specifi es
* the interval of each clock run (or clock ticks). * the interval of each clock run (or clock ticks).
* @param options Bitmask of pjmedia_clock_options. * @param options Bitmask of pjmedia_clock_options.
* @param cb Callback to be called for each clock tick. * @param cb Callback to be called for each clock tick.
* @param user_data User data, which will be passed to the callback. * @param user_data User data, which will be passed to the callback.
skipping to change at line 140 skipping to change at line 234
PJ_DECL(pj_status_t) pjmedia_clock_create( pj_pool_t *pool, PJ_DECL(pj_status_t) pjmedia_clock_create( pj_pool_t *pool,
unsigned clock_rate, unsigned clock_rate,
unsigned channel_count, unsigned channel_count,
unsigned samples_per_frame, unsigned samples_per_frame,
unsigned options, unsigned options,
pjmedia_clock_callback *cb, pjmedia_clock_callback *cb,
void *user_data, void *user_data,
pjmedia_clock **p_clock); pjmedia_clock **p_clock);
/** /**
* Create media clock. This creates a media clock object that will run
* periodically at the specified interval. Once created, application must
* call #pjmedia_clock_start() to actually start the clock.
*
* @param pool Pool to allocate memory.
* @param param The clock parameter.
* @param options Bitmask of pjmedia_clock_options.
* @param cb Callback to be called for each clock tick.
* @param user_data User data, which will be passed to the callback.
* @param p_clock Pointer to receive the clock instance.
*
* @return PJ_SUCCESS on success, or the appropriate error
* code.
*/
PJ_DECL(pj_status_t) pjmedia_clock_create2(pj_pool_t *pool,
const pjmedia_clock_param *param
,
unsigned options,
pjmedia_clock_callback *cb,
void *user_data,
pjmedia_clock **p_clock);
/**
* Start the clock. For clock created with asynchronous flag set to TRUE, * Start the clock. For clock created with asynchronous flag set to TRUE,
* this may start a worker thread for the clock (depending on the * this may start a worker thread for the clock (depending on the
* backend clock implementation being used). * backend clock implementation being used).
* *
* @param clock The media clock. * @param clock The media clock.
* *
* @return PJ_SUCCES on success. * @return PJ_SUCCES on success.
*/ */
PJ_DECL(pj_status_t) pjmedia_clock_start(pjmedia_clock *clock); PJ_DECL(pj_status_t) pjmedia_clock_start(pjmedia_clock *clock);
/** /**
* Stop the clock. * Stop the clock.
* *
* @param clock The media clock. * @param clock The media clock.
* *
* @return PJ_SUCCES on success. * @return PJ_SUCCES on success.
*/ */
PJ_DECL(pj_status_t) pjmedia_clock_stop(pjmedia_clock *clock); PJ_DECL(pj_status_t) pjmedia_clock_stop(pjmedia_clock *clock);
/** /**
* Modify the clock's parameter.
*
* @param clock The media clock.
* @param param The clock's new parameter.
* @return PJ_SUCCES on success.
*/
PJ_DECL(pj_status_t) pjmedia_clock_modify(pjmedia_clock *clock,
const pjmedia_clock_param *param)
;
/**
* Poll the media clock, and execute the callback when the clock tick has * Poll the media clock, and execute the callback when the clock tick has
* elapsed. This operation is only valid if the clock is created with async * elapsed. This operation is only valid if the clock is created with async
* flag set to FALSE. * flag set to FALSE.
* *
* @param clock The media clock. * @param clock The media clock.
* @param wait If non-zero, then the function will block until * @param wait If non-zero, then the function will block until
* a clock tick elapsed and callback has been calle d. * a clock tick elapsed and callback has been calle d.
* @param ts Optional argument to receive the current * @param ts Optional argument to receive the current
* timestamp. * timestamp.
* *
 End of changes. 6 change blocks. 
2 lines changed or deleted 132 lines changed or added


 codec.h   codec.h 
/* $Id: codec.h 4329 2013-01-23 02:57:30Z nanang $ */ /* $Id: codec.h 3664 2011-07-19 03:42:28Z nanang $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 29 skipping to change at line 29
*/ */
#ifndef __PJMEDIA_CODEC_H__ #ifndef __PJMEDIA_CODEC_H__
#define __PJMEDIA_CODEC_H__ #define __PJMEDIA_CODEC_H__
/** /**
* @file codec.h * @file codec.h
* @brief Codec framework. * @brief Codec framework.
*/ */
#include <pjmedia/port.h> #include <pjmedia/port.h>
#include <pj/errno.h>
#include <pj/list.h> #include <pj/list.h>
#include <pj/pool.h> #include <pj/pool.h>
PJ_BEGIN_DECL PJ_BEGIN_DECL
/** /**
* @defgroup PJMEDIA_CODEC Codec Framework * @defgroup PJMEDIA_CODEC Codec Framework
* @brief Media codec framework and management * @brief Media codec framework and management
* @{ * @{
* *
skipping to change at line 239 skipping to change at line 240
*/ */
typedef struct pjmedia_codec_info typedef struct pjmedia_codec_info
{ {
pjmedia_type type; /**< Media type. */ pjmedia_type type; /**< Media type. */
unsigned pt; /**< Payload type (can be dynamic). */ unsigned pt; /**< Payload type (can be dynamic). */
pj_str_t encoding_name; /**< Encoding name. */ pj_str_t encoding_name; /**< Encoding name. */
unsigned clock_rate; /**< Sampling rate. */ unsigned clock_rate; /**< Sampling rate. */
unsigned channel_cnt; /**< Channel count. */ unsigned channel_cnt; /**< Channel count. */
} pjmedia_codec_info; } pjmedia_codec_info;
#define PJMEDIA_CODEC_MAX_FMTP_CNT 8
/** /**
* Structure of codec specific parameters which contains name=value pairs. * Structure of codec specific parameters which contains name=value pairs.
* The codec specific parameters are to be used with SDP according to * The codec specific parameters are to be used with SDP according to
* the standards (e.g: RFC 3555) in SDP 'a=fmtp' attribute. * the standards (e.g: RFC 3555) in SDP 'a=fmtp' attribute.
*/ */
typedef struct pjmedia_codec_fmtp typedef struct pjmedia_codec_fmtp
{ {
pj_uint8_t cnt; /**< Number of parameters. */ pj_uint8_t cnt; /**< Number of parameters. */
struct param { struct param {
pj_str_t name; /**< Parameter name. */ pj_str_t name; /**< Parameter name. */
skipping to change at line 307 skipping to change at line 306
unsigned vad:1; /**< Voice Activity Detector. */ unsigned vad:1; /**< Voice Activity Detector. */
unsigned cng:1; /**< Comfort Noise Generator. */ unsigned cng:1; /**< Comfort Noise Generator. */
unsigned penh:1; /**< Perceptual Enhancement */ unsigned penh:1; /**< Perceptual Enhancement */
unsigned plc:1; /**< Packet loss concealment */ unsigned plc:1; /**< Packet loss concealment */
unsigned reserved:1; /**< Reserved, must be zero. */ unsigned reserved:1; /**< Reserved, must be zero. */
pjmedia_codec_fmtp enc_fmtp;/**< Encoder's fmtp params. */ pjmedia_codec_fmtp enc_fmtp;/**< Encoder's fmtp params. */
pjmedia_codec_fmtp dec_fmtp;/**< Decoder's fmtp params. */ pjmedia_codec_fmtp dec_fmtp;/**< Decoder's fmtp params. */
} setting; } setting;
} pjmedia_codec_param; } pjmedia_codec_param;
/**
* Duplicate codec parameter.
*
* @param pool The pool.
* @param src The codec parameter to be duplicated.
*
* @return Duplicated codec parameter.
*/
PJ_DECL(pjmedia_codec_param*) pjmedia_codec_param_clone(
pj_pool_t *pool,
const pjmedia_codec_param *src);
/* /*
* Forward declaration for pjmedia_codec. * Forward declaration for pjmedia_codec.
*/ */
typedef struct pjmedia_codec pjmedia_codec; typedef struct pjmedia_codec pjmedia_codec;
/** /**
* This structure describes codec operations. Each codec MUST implement * This structure describes codec operations. Each codec MUST implement
* all of these functions. * all of these functions.
*/ */
typedef struct pjmedia_codec_op typedef struct pjmedia_codec_op
{ {
/** /**
* Initialize codec using the specified attribute. * Initialize codec using the specified attribute.
* *
* Application should call #pjmedia_codec_init() instead of
* calling this function directly.
*
* @param codec The codec instance. * @param codec The codec instance.
* @param pool Pool to use when the codec needs to allocate * @param pool Pool to use when the codec needs to allocate
* some memory. * some memory.
* *
* @return PJ_SUCCESS on success. * @return PJ_SUCCESS on success.
*/ */
pj_status_t (*init)(pjmedia_codec *codec, pj_status_t (*init)(pjmedia_codec *codec,
pj_pool_t *pool ); pj_pool_t *pool );
/** /**
* Open the codec and initialize with the specified parameter. * Open the codec and initialize with the specified parameter.
* Upon successful initialization, the codec may modify the parameter * Upon successful initialization, the codec may modify the parameter
* and fills in the unspecified values (such as enc_ptime, when * and fills in the unspecified values (such as enc_ptime, when
* encoder ptime is different than decoder ptime). * encoder ptime is different than decoder ptime).
* *
* Application should call #pjmedia_codec_open() instead of
* calling this function directly.
*
* @param codec The codec instance. * @param codec The codec instance.
* @param param Codec initialization parameter. * @param param Codec initialization parameter.
* *
* @return PJ_SUCCESS on success. * @return PJ_SUCCESS on success.
*/ */
pj_status_t (*open)(pjmedia_codec *codec, pj_status_t (*open)(pjmedia_codec *codec,
pjmedia_codec_param *param ); pjmedia_codec_param *param );
/** /**
* Close and shutdown codec, releasing all resources allocated by * Close and shutdown codec, releasing all resources allocated by
* this codec, if any. * this codec, if any.
* *
* Application should call #pjmedia_codec_close() instead of
* calling this function directly.
*
* @param codec The codec instance. * @param codec The codec instance.
* *
* @return PJ_SUCCESS on success. * @return PJ_SUCCESS on success.
*/ */
pj_status_t (*close)(pjmedia_codec *codec); pj_status_t (*close)(pjmedia_codec *codec);
/** /**
* Modify the codec parameter after the codec is open. * Modify the codec parameter after the codec is open.
* Note that not all codec parameters can be modified during run-time. * Note that not all codec parameters can be modified during run-time.
* When the parameter cannot be changed, this function will return * When the parameter cannot be changed, this function will return
* non-PJ_SUCCESS, and the original parameters will not be changed. * non-PJ_SUCCESS, and the original parameters will not be changed.
* *
* Application can expect changing trivial codec settings such as * Application can expect changing trivial codec settings such as
* changing VAD setting to succeed. * changing VAD setting to succeed.
* *
* Application should call #pjmedia_codec_modify() instead of
* calling this function directly.
*
* @param codec The codec instance. * @param codec The codec instance.
* @param param The new codec parameter. * @param param The new codec parameter.
* *
* @return PJ_SUCCESS on success. * @return PJ_SUCCESS on success.
*/ */
pj_status_t (*modify)(pjmedia_codec *codec, pj_status_t (*modify)(pjmedia_codec *codec,
const pjmedia_codec_param *param ); const pjmedia_codec_param *param );
/** /**
* Instruct the codec to inspect the specified payload/packet and * Instruct the codec to inspect the specified payload/packet and
* split the packet into individual base frames. Each output frames wil l * split the packet into individual base frames. Each output frames wil l
* have ptime that is equal to basic frame ptime (i.e. the value of * have ptime that is equal to basic frame ptime (i.e. the value of
* info.frm_ptime in #pjmedia_codec_param). * info.frm_ptime in #pjmedia_codec_param).
* *
* Application should call #pjmedia_codec_parse() instead of
* calling this function directly.
*
* @param codec The codec instance * @param codec The codec instance
* @param pkt The input packet. * @param pkt The input packet.
* @param pkt_size Size of the packet. * @param pkt_size Size of the packet.
* @param timestamp The timestamp of the first sample in the pac ket. * @param timestamp The timestamp of the first sample in the pac ket.
* @param frame_cnt On input, specifies the maximum number of fr ames * @param frame_cnt On input, specifies the maximum number of fr ames
* in the array. On output, the codec must fill * in the array. On output, the codec must fill
* with number of frames detected in the packet. * with number of frames detected in the packet.
* @param frames On output, specifies the frames that have been * @param frames On output, specifies the frames that have been
* detected in the packet. * detected in the packet.
* *
skipping to change at line 413 skipping to change at line 415
pj_size_t pkt_size, pj_size_t pkt_size,
const pj_timestamp *timestamp, const pj_timestamp *timestamp,
unsigned *frame_cnt, unsigned *frame_cnt,
pjmedia_frame frames[]); pjmedia_frame frames[]);
/** /**
* Instruct the codec to encode the specified input frame. The input * Instruct the codec to encode the specified input frame. The input
* PCM samples MUST have ptime that is multiplication of base frame * PCM samples MUST have ptime that is multiplication of base frame
* ptime (i.e. the value of info.frm_ptime in #pjmedia_codec_param). * ptime (i.e. the value of info.frm_ptime in #pjmedia_codec_param).
* *
* Application should call #pjmedia_codec_encode() instead of
* calling this function directly.
*
* @param codec The codec instance. * @param codec The codec instance.
* @param input The input frame. * @param input The input frame.
* @param out_size The length of buffer in the output frame. * @param out_size The length of buffer in the output frame.
* @param output The output frame. * @param output The output frame.
* *
* @return PJ_SUCCESS on success; * @return PJ_SUCCESS on success;
*/ */
pj_status_t (*encode)(pjmedia_codec *codec, pj_status_t (*encode)(pjmedia_codec *codec,
const struct pjmedia_frame *input, const struct pjmedia_frame *input,
unsigned out_size, unsigned out_size,
struct pjmedia_frame *output); struct pjmedia_frame *output);
/** /**
* Instruct the codec to decode the specified input frame. The input * Instruct the codec to decode the specified input frame. The input
* frame MUST have ptime that is exactly equal to base frame * frame MUST have ptime that is exactly equal to base frame
* ptime (i.e. the value of info.frm_ptime in #pjmedia_codec_param). * ptime (i.e. the value of info.frm_ptime in #pjmedia_codec_param).
* Application can achieve this by parsing the packet into base * Application can achieve this by parsing the packet into base
* frames before decoding each frame. * frames before decoding each frame.
* *
* Application should call #pjmedia_codec_decode() instead of
* calling this function directly.
*
* @param codec The codec instance. * @param codec The codec instance.
* @param input The input frame. * @param input The input frame.
* @param out_size The length of buffer in the output frame. * @param out_size The length of buffer in the output frame.
* @param output The output frame. * @param output The output frame.
* *
* @return PJ_SUCCESS on success; * @return PJ_SUCCESS on success;
*/ */
pj_status_t (*decode)(pjmedia_codec *codec, pj_status_t (*decode)(pjmedia_codec *codec,
const struct pjmedia_frame *input, const struct pjmedia_frame *input,
unsigned out_size, unsigned out_size,
struct pjmedia_frame *output); struct pjmedia_frame *output);
/** /**
* Instruct the codec to recover a missing frame. * Instruct the codec to recover a missing frame.
* *
* Application should call #pjmedia_codec_recover() instead of
* calling this function directly.
*
* @param codec The codec instance. * @param codec The codec instance.
* @param out_size The length of buffer in the output frame. * @param out_size The length of buffer in the output frame.
* @param output The output frame where generated signal * @param output The output frame where generated signal
* will be placed. * will be placed.
* *
* @return PJ_SUCCESS on success; * @return PJ_SUCCESS on success;
*/ */
pj_status_t (*recover)(pjmedia_codec *codec, pj_status_t (*recover)(pjmedia_codec *codec,
unsigned out_size, unsigned out_size,
struct pjmedia_frame *output); struct pjmedia_frame *output);
skipping to change at line 557 skipping to change at line 568
* instance of codec back to the codec factory. * instance of codec back to the codec factory.
* *
* @param factory The codec factory. * @param factory The codec factory.
* @param codec The codec instance to be returned. * @param codec The codec instance to be returned.
* *
* @return PJ_SUCCESS on success. * @return PJ_SUCCESS on success.
*/ */
pj_status_t (*dealloc_codec)(pjmedia_codec_factory *factory, pj_status_t (*dealloc_codec)(pjmedia_codec_factory *factory,
pjmedia_codec *codec ); pjmedia_codec *codec );
/**
* This callback will be called to deinitialize and destroy this factor
y.
*/
pj_status_t (*destroy)(void);
} pjmedia_codec_factory_op; } pjmedia_codec_factory_op;
/** /**
* Codec factory describes a module that is able to create codec with speci fic * Codec factory describes a module that is able to create codec with speci fic
* capabilities. These capabilities can be queried by codec manager to crea te * capabilities. These capabilities can be queried by codec manager to crea te
* instances of codec. * instances of codec.
*/ */
struct pjmedia_codec_factory struct pjmedia_codec_factory
{ {
/** Entries to put this structure in the codec manager list. */ /** Entries to put this structure in the codec manager list. */
skipping to change at line 717 skipping to change at line 733
* *
* @return PJ_SUCCESS on success. * @return PJ_SUCCESS on success.
*/ */
PJ_DECL(pj_status_t) PJ_DECL(pj_status_t)
pjmedia_codec_mgr_register_factory( pjmedia_codec_mgr *mgr, pjmedia_codec_mgr_register_factory( pjmedia_codec_mgr *mgr,
pjmedia_codec_factory *factory); pjmedia_codec_factory *factory);
/** /**
* Unregister codec factory from the codec manager. This will also * Unregister codec factory from the codec manager. This will also
* remove all the codecs registered by the codec factory from the * remove all the codecs registered by the codec factory from the
* codec manager's list of supported codecs. * codec manager's list of supported codecs. This function should
* only be called by the codec implementers and not by application.
* *
* @param mgr The codec manager instance. Application can get the * @param mgr The codec manager instance, use
* instance by calling #pjmedia_endpt_get_codec_mgr(). * #pjmedia_endpt_get_codec_mgr().
* @param factory The codec factory to be unregistered. * @param factory The codec factory to be unregistered.
* *
* @return PJ_SUCCESS on success. * @return PJ_SUCCESS on success.
*/ */
PJ_DECL(pj_status_t) PJ_DECL(pj_status_t)
pjmedia_codec_mgr_unregister_factory( pjmedia_codec_mgr *mgr, pjmedia_codec_mgr_unregister_factory( pjmedia_codec_mgr *mgr,
pjmedia_codec_factory *factory); pjmedia_codec_factory *factory);
/** /**
* Enumerate all supported codecs that have been registered to the * Enumerate all supported codecs that have been registered to the
skipping to change at line 894 skipping to change at line 911
* @param mgr The codec manager instance. Application can get the * @param mgr The codec manager instance. Application can get the
* instance by calling #pjmedia_endpt_get_codec_mgr(). * instance by calling #pjmedia_endpt_get_codec_mgr().
* @param codec The codec instance. * @param codec The codec instance.
* *
* @return PJ_SUCESS on success. * @return PJ_SUCESS on success.
*/ */
PJ_DECL(pj_status_t) pjmedia_codec_mgr_dealloc_codec(pjmedia_codec_mgr *mgr , PJ_DECL(pj_status_t) pjmedia_codec_mgr_dealloc_codec(pjmedia_codec_mgr *mgr ,
pjmedia_codec *codec); pjmedia_codec *codec);
/** /**
* Initialize codec using the specified attribute.
*
* @param codec The codec instance.
* @param pool Pool to use when the codec needs to allocate some memory
.
*
* @return PJ_SUCCESS on success.
*/
PJ_INLINE(pj_status_t) pjmedia_codec_init( pjmedia_codec *codec,
pj_pool_t *pool )
{
return (*codec->op->init)(codec, pool);
}
/**
* Open the codec and initialize with the specified parameter.
* Upon successful initialization, the codec may modify the parameter
* and fills in the unspecified values (such as enc_ptime, when
* encoder ptime is different than decoder ptime).
*
* @param codec The codec instance.
* @param param Codec initialization parameter.
*
* @return PJ_SUCCESS on success.
*/
PJ_INLINE(pj_status_t) pjmedia_codec_open( pjmedia_codec *codec,
pjmedia_codec_param *param )
{
return (*codec->op->open)(codec, param);
}
/**
* Close and shutdown codec, releasing all resources allocated by
* this codec, if any.
*
* @param codec The codec instance.
*
* @return PJ_SUCCESS on success.
*/
PJ_INLINE(pj_status_t) pjmedia_codec_close( pjmedia_codec *codec )
{
return (*codec->op->close)(codec);
}
/**
* Modify the codec parameter after the codec is open.
* Note that not all codec parameters can be modified during run-time.
* When the parameter cannot be changed, this function will return
* non-PJ_SUCCESS, and the original parameters will not be changed.
*
* Application can expect changing trivial codec settings such as
* changing VAD setting to succeed.
*
* @param codec The codec instance.
* @param param The new codec parameter.
*
* @return PJ_SUCCESS on success.
*/
PJ_INLINE(pj_status_t) pjmedia_codec_modify(pjmedia_codec *codec,
const pjmedia_codec_param *param
)
{
return (*codec->op->modify)(codec, param);
}
/**
* Instruct the codec to inspect the specified payload/packet and
* split the packet into individual base frames. Each output frames will
* have ptime that is equal to basic frame ptime (i.e. the value of
* info.frm_ptime in #pjmedia_codec_param).
*
* @param codec The codec instance
* @param pkt The input packet.
* @param pkt_size Size of the packet.
* @param timestamp The timestamp of the first sample in the packet.
* @param frame_cnt On input, specifies the maximum number of frames
* in the array. On output, the codec must fill
* with number of frames detected in the packet.
* @param frames On output, specifies the frames that have been
* detected in the packet.
*
* @return PJ_SUCCESS on success.
*/
PJ_INLINE(pj_status_t) pjmedia_codec_parse( pjmedia_codec *codec,
void *pkt,
pj_size_t pkt_size,
const pj_timestamp *timestamp,
unsigned *frame_cnt,
pjmedia_frame frames[] )
{
return (*codec->op->parse)(codec, pkt, pkt_size, timestamp,
frame_cnt, frames);
}
/**
* Instruct the codec to encode the specified input frame. The input
* PCM samples MUST have ptime that is multiplication of base frame
* ptime (i.e. the value of info.frm_ptime in #pjmedia_codec_param).
*
* @param codec The codec instance.
* @param input The input frame.
* @param out_size The length of buffer in the output frame.
* @param output The output frame.
*
* @return PJ_SUCCESS on success;
*/
PJ_INLINE(pj_status_t) pjmedia_codec_encode(
pjmedia_codec *codec,
const struct pjmedia_frame *input,
unsigned out_size,
struct pjmedia_frame *output )
{
return (*codec->op->encode)(codec, input, out_size, output);
}
/**
* Instruct the codec to decode the specified input frame. The input
* frame MUST have ptime that is exactly equal to base frame
* ptime (i.e. the value of info.frm_ptime in #pjmedia_codec_param).
* Application can achieve this by parsing the packet into base
* frames before decoding each frame.
*
* @param codec The codec instance.
* @param input The input frame.
* @param out_size The length of buffer in the output frame.
* @param output The output frame.
*
* @return PJ_SUCCESS on success;
*/
PJ_INLINE(pj_status_t) pjmedia_codec_decode(
pjmedia_codec *codec,
const struct pjmedia_frame *input,
unsigned out_size,
struct pjmedia_frame *output )
{
return (*codec->op->decode)(codec, input, out_size, output);
}
/**
* Instruct the codec to recover a missing frame.
*
* @param codec The codec instance.
* @param out_size The length of buffer in the output frame.
* @param output The output frame where generated signal
* will be placed.
*
* @return PJ_SUCCESS on success;
*/
PJ_INLINE(pj_status_t) pjmedia_codec_recover( pjmedia_codec *codec,
unsigned out_size,
struct pjmedia_frame *output )
{
if (codec->op && codec->op->recover)
return (*codec->op->recover)(codec, out_size, output);
else
return PJ_ENOTSUP;
}
/**
* @} * @}
*/ */
/** /**
* @defgroup PJMEDIA_CODEC_CODECS Supported codecs * @defgroup PJMEDIA_CODEC_CODECS Supported codecs
* @ingroup PJMEDIA_CODEC * @ingroup PJMEDIA_CODEC
* @brief Documentation about individual codec supported by PJMEDIA * @brief Documentation about individual codec supported by PJMEDIA
* @{ * @{
* Please see the APIs provided by the individual codecs below. * Please see the APIs provided by the individual codecs below.
*/ */
 End of changes. 16 change blocks. 
18 lines changed or deleted 195 lines changed or added


 conference.h   conference.h 
/* $Id: conference.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: conference.h 3664 2011-07-19 03:42:28Z nanang $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 48 skipping to change at line 48
* *
* Some more information about the media flow when conference bridge is * Some more information about the media flow when conference bridge is
* used is described in http://www.pjsip.org/trac/wiki/media-flow . * used is described in http://www.pjsip.org/trac/wiki/media-flow .
*/ */
PJ_BEGIN_DECL PJ_BEGIN_DECL
/** /**
* The conference bridge signature in pjmedia_port_info. * The conference bridge signature in pjmedia_port_info.
*/ */
#define PJMEDIA_CONF_BRIDGE_SIGNATURE \ #define PJMEDIA_CONF_BRIDGE_SIGNATURE PJMEDIA_SIG_PORT_CONF
PJMEDIA_PORT_SIGNATURE('C', 'O', 'N', 'F')
/** /**
* The audio switchboard signature in pjmedia_port_info. * The audio switchboard signature in pjmedia_port_info.
*/ */
#define PJMEDIA_CONF_SWITCH_SIGNATURE \ #define PJMEDIA_CONF_SWITCH_SIGNATURE PJMEDIA_SIG_PORT_CONF_SWITCH
PJMEDIA_PORT_SIGNATURE('A', 'S', 'W', 'I')
/** /**
* Opaque type for conference bridge. * Opaque type for conference bridge.
*/ */
typedef struct pjmedia_conf pjmedia_conf; typedef struct pjmedia_conf pjmedia_conf;
/** /**
* Conference port info. * Conference port info.
*/ */
typedef struct pjmedia_conf_port_info typedef struct pjmedia_conf_port_info
 End of changes. 3 change blocks. 
5 lines changed or deleted 3 lines changed or added


 config.h   config.h 
/* $Id: config.h 4429 2013-03-07 09:35:20Z nanang $ */ /* $Id: config.h 4139 2012-05-22 09:52:29Z bennylp $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 47 skipping to change at line 47
#elif defined(__MWERKS__) #elif defined(__MWERKS__)
# include <pj/compat/cc_codew.h> # include <pj/compat/cc_codew.h>
#elif defined(__GCCE__) #elif defined(__GCCE__)
# include <pj/compat/cc_gcce.h> # include <pj/compat/cc_gcce.h>
#elif defined(__ARMCC__) #elif defined(__ARMCC__)
# include <pj/compat/cc_armcc.h> # include <pj/compat/cc_armcc.h>
#else #else
# error "Unknown compiler." # error "Unknown compiler."
#endif #endif
/* PJ_ALIGN_DATA is compiler specific directive to align data address */
#ifndef PJ_ALIGN_DATA
# error "PJ_ALIGN_DATA is not defined!"
#endif
/******************************************************************** /********************************************************************
* Include target OS specific configuration. * Include target OS specific configuration.
*/ */
#if defined(PJ_AUTOCONF) #if defined(PJ_AUTOCONF)
/* /*
* Autoconf * Autoconf
*/ */
# include <pj/compat/os_auto.h> # include <pj/compat/os_auto.h>
#elif defined(PJ_SYMBIAN) && PJ_SYMBIAN!=0 #elif defined(PJ_SYMBIAN) && PJ_SYMBIAN!=0
skipping to change at line 400 skipping to change at line 405
* If the value is set to NO, then the buffer will be taken from static * If the value is set to NO, then the buffer will be taken from static
* buffer, which in this case will make the log function non-reentrant. * buffer, which in this case will make the log function non-reentrant.
* *
* Default: 1 * Default: 1
*/ */
#ifndef PJ_LOG_USE_STACK_BUFFER #ifndef PJ_LOG_USE_STACK_BUFFER
# define PJ_LOG_USE_STACK_BUFFER 1 # define PJ_LOG_USE_STACK_BUFFER 1
#endif #endif
/** /**
* Enable log indentation feature.
*
* Default: 1
*/
#ifndef PJ_LOG_ENABLE_INDENT
# define PJ_LOG_ENABLE_INDENT 1
#endif
/**
* Number of PJ_LOG_INDENT_CHAR to put every time pj_log_push_indent()
* is called.
*
* Default: 1
*/
#ifndef PJ_LOG_INDENT_SIZE
# define PJ_LOG_INDENT_SIZE 1
#endif
/**
* Log indentation character.
*
* Default: space
*/
#ifndef PJ_LOG_INDENT_CHAR
# define PJ_LOG_INDENT_CHAR '.'
#endif
/**
* Colorfull terminal (for logging etc). * Colorfull terminal (for logging etc).
* *
* Default: 1 * Default: 1
*/ */
#ifndef PJ_TERM_HAS_COLOR #ifndef PJ_TERM_HAS_COLOR
# define PJ_TERM_HAS_COLOR 1 # define PJ_TERM_HAS_COLOR 1
#endif #endif
/** /**
* Set this flag to non-zero to enable various checking for pool * Set this flag to non-zero to enable various checking for pool
skipping to change at line 1083 skipping to change at line 1116
# error "PJ_THREAD_SET_STACK_SIZE should be defined in compat/os_xx.h" # error "PJ_THREAD_SET_STACK_SIZE should be defined in compat/os_xx.h"
#endif #endif
#if !defined(PJ_THREAD_ALLOCATE_STACK) #if !defined(PJ_THREAD_ALLOCATE_STACK)
# error "PJ_THREAD_ALLOCATE_STACK should be defined in compat/os_xx.h" # error "PJ_THREAD_ALLOCATE_STACK should be defined in compat/os_xx.h"
#endif #endif
PJ_BEGIN_DECL PJ_BEGIN_DECL
/** PJLIB version major number. */ /** PJLIB version major number. */
#define PJ_VERSION_NUM_MAJOR 1 #define PJ_VERSION_NUM_MAJOR 2
/** PJLIB version minor number. */ /** PJLIB version minor number. */
#define PJ_VERSION_NUM_MINOR 16 #define PJ_VERSION_NUM_MINOR 0
/** PJLIB version revision number. */ /** PJLIB version revision number. */
#define PJ_VERSION_NUM_REV 0 #define PJ_VERSION_NUM_REV 0
/** /**
* Extra suffix for the version (e.g. "-svn"), or empty for * Extra suffix for the version (e.g. "-trunk"), or empty for
* web release version. * web release version.
*/ */
#define PJ_VERSION_NUM_EXTRA "" #define PJ_VERSION_NUM_EXTRA ""
/** /**
* PJLIB version number consists of three bytes with the following format: * PJLIB version number consists of three bytes with the following format:
* 0xMMIIRR00, where MM: major number, II: minor number, RR: revision * 0xMMIIRR00, where MM: major number, II: minor number, RR: revision
* number, 00: always zero for now. * number, 00: always zero for now.
*/ */
#define PJ_VERSION_NUM ((PJ_VERSION_NUM_MAJOR << 24) | \ #define PJ_VERSION_NUM ((PJ_VERSION_NUM_MAJOR << 24) | \
 End of changes. 6 change blocks. 
4 lines changed or deleted 37 lines changed or added


 delaybuf.h   delaybuf.h 
/* $Id: delaybuf.h 3567 2011-05-15 12:54:28Z ming $ */ /* $Id: delaybuf.h 3841 2011-10-24 09:28:13Z ming $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 echo.h   echo.h 
/* $Id: echo.h 4079 2012-04-24 10:26:07Z ming $ */ /* $Id: echo.h 4082 2012-04-24 13:09:14Z bennylp $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 endpoint.h   endpoint.h 
/* $Id: endpoint.h 3988 2012-03-28 07:32:42Z nanang $ */ /* $Id: endpoint.h 3999 2012-03-30 07:10:13Z bennylp $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 41 skipping to change at line 41
* The media endpoint acts as placeholder for endpoint capabilities. Each * The media endpoint acts as placeholder for endpoint capabilities. Each
* media endpoint will have a codec manager to manage list of codecs instal led * media endpoint will have a codec manager to manage list of codecs instal led
* in the endpoint and a sound device factory. * in the endpoint and a sound device factory.
* *
* A reference to media endpoint instance is required when application want s * A reference to media endpoint instance is required when application want s
* to create a media session (#pjmedia_session_create()). * to create a media session (#pjmedia_session_create()).
*/ */
#include <pjmedia/codec.h> #include <pjmedia/codec.h>
#include <pjmedia/sdp.h> #include <pjmedia/sdp.h>
#include <pjmedia/transport.h>
PJ_BEGIN_DECL PJ_BEGIN_DECL
/** /**
* This enumeration describes various flags that can be set or retrieved in * This enumeration describes various flags that can be set or retrieved in
* the media endpoint, by using pjmedia_endpt_set_flag() and * the media endpoint, by using pjmedia_endpt_set_flag() and
* pjmedia_endpt_get_flag() respectively. * pjmedia_endpt_get_flag() respectively.
*/ */
typedef enum pjmedia_endpt_flag typedef enum pjmedia_endpt_flag
{ {
skipping to change at line 181 skipping to change at line 182
/** /**
* Create a SDP session description that describes the endpoint * Create a SDP session description that describes the endpoint
* capability. * capability.
* *
* @param endpt The media endpoint. * @param endpt The media endpoint.
* @param pool Pool to use to create the SDP descriptor. * @param pool Pool to use to create the SDP descriptor.
* @param stream_cnt Number of elements in the sock_info array. This * @param stream_cnt Number of elements in the sock_info array. This
* also denotes the maximum number of streams (i.e. * also denotes the maximum number of streams (i.e.
* the "m=" lines) that will be created in the SDP. * the "m=" lines) that will be created in the SDP.
* By convention, if this value is greater than one,
* the first media will be audio and the remaining
* media is video.
* @param sock_info Array of socket transport information. One * @param sock_info Array of socket transport information. One
* transport is needed for each media stream, and * transport is needed for each media stream, and
* each transport consists of an RTP and RTCP socket * each transport consists of an RTP and RTCP socket
* pair. * pair.
* @param p_sdp Pointer to receive SDP session descriptor. * @param p_sdp Pointer to receive SDP session descriptor.
* *
* @return PJ_SUCCESS on success. * @return PJ_SUCCESS on success.
*/ */
PJ_DECL(pj_status_t) pjmedia_endpt_create_sdp( pjmedia_endpt *endpt, PJ_DECL(pj_status_t) pjmedia_endpt_create_sdp( pjmedia_endpt *endpt,
pj_pool_t *pool, pj_pool_t *pool,
unsigned stream_cnt, unsigned stream_cnt,
const pjmedia_sock_info sock_ info[], const pjmedia_sock_info sock_ info[],
pjmedia_sdp_session **p_sdp ) ; pjmedia_sdp_session **p_sdp ) ;
/** /**
* Create a "blank" SDP session description. The SDP will contain basic SDP
* fields such as origin, time, and name, but without any media lines.
*
* @param endpt The media endpoint.
* @param pool Pool to allocate memory from.
* @param sess_name Optional SDP session name, or NULL to use default
* value.
* @param origin Address to put in the origin field.
* @param p_sdp Pointer to receive the created SDP session.
*
* @return PJ_SUCCESS on success, or the appropriate error code
.
*/
PJ_DECL(pj_status_t) pjmedia_endpt_create_base_sdp(pjmedia_endpt *endpt,
pj_pool_t *pool,
const pj_str_t *sess_name
,
const pj_sockaddr *origin
,
pjmedia_sdp_session **p_s
dp);
/**
* Create SDP media line for audio media.
*
* @param endpt The media endpoint.
* @param pool Pool to allocate memory from.
* @param si Socket information.
* @param options Option flags, must be zero for now.
* @param p_m Pointer to receive the created SDP media.
*
* @return PJ_SUCCESS on success, or the appropriate error code
.
*/
PJ_DECL(pj_status_t) pjmedia_endpt_create_audio_sdp(pjmedia_endpt *endpt,
pj_pool_t *pool,
const pjmedia_sock_info
*si,
unsigned options,
pjmedia_sdp_media **p_m
);
/**
* Create SDP media line for video media.
*
* @param endpt The media endpoint.
* @param pool Pool to allocate memory from.
* @param si Socket information.
* @param options Option flags, must be zero for now.
* @param p_m Pointer to receive the created SDP media.
*
* @return PJ_SUCCESS on success, or the appropriate error code
.
*/
PJ_DECL(pj_status_t) pjmedia_endpt_create_video_sdp(pjmedia_endpt *endpt,
pj_pool_t *pool,
const pjmedia_sock_info
*si,
unsigned options,
pjmedia_sdp_media **p_m
);
/**
* Dump media endpoint capabilities. * Dump media endpoint capabilities.
* *
* @param endpt The media endpoint. * @param endpt The media endpoint.
* *
* @return PJ_SUCCESS on success. * @return PJ_SUCCESS on success.
*/ */
PJ_DECL(pj_status_t) pjmedia_endpt_dump(pjmedia_endpt *endpt); PJ_DECL(pj_status_t) pjmedia_endpt_dump(pjmedia_endpt *endpt);
/** /**
* Register cleanup function to be called by media endpoint when * Register cleanup function to be called by media endpoint when
 End of changes. 4 change blocks. 
1 lines changed or deleted 68 lines changed or added


 errno.h   errno.h 
/* $Id: errno.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: errno.h 3664 2011-07-19 03:42:28Z nanang $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 462 skipping to change at line 462
#define PJ_ERRNO_START_USER (PJ_ERRNO_START_SYS + PJ_ERRNO_SPACE_SIZE) #define PJ_ERRNO_START_USER (PJ_ERRNO_START_SYS + PJ_ERRNO_SPACE_SIZE)
/* /*
* Below are list of error spaces that have been taken so far: * Below are list of error spaces that have been taken so far:
* - PJSIP_ERRNO_START (PJ_ERRNO_START_USER) * - PJSIP_ERRNO_START (PJ_ERRNO_START_USER)
* - PJMEDIA_ERRNO_START (PJ_ERRNO_START_USER + PJ_ERRNO_SPACE_SIZE) * - PJMEDIA_ERRNO_START (PJ_ERRNO_START_USER + PJ_ERRNO_SPACE_SIZE)
* - PJSIP_SIMPLE_ERRNO_START (PJ_ERRNO_START_USER + PJ_ERRNO_SPACE_SIZE*2 ) * - PJSIP_SIMPLE_ERRNO_START (PJ_ERRNO_START_USER + PJ_ERRNO_SPACE_SIZE*2 )
* - PJLIB_UTIL_ERRNO_START (PJ_ERRNO_START_USER + PJ_ERRNO_SPACE_SIZE*3 ) * - PJLIB_UTIL_ERRNO_START (PJ_ERRNO_START_USER + PJ_ERRNO_SPACE_SIZE*3 )
* - PJNATH_ERRNO_START (PJ_ERRNO_START_USER + PJ_ERRNO_SPACE_SIZE*4 ) * - PJNATH_ERRNO_START (PJ_ERRNO_START_USER + PJ_ERRNO_SPACE_SIZE*4 )
* - PJMEDIA_AUDIODEV_ERRNO_START (PJ_ERRNO_START_USER + PJ_ERRNO_SPACE_SI ZE*5) * - PJMEDIA_AUDIODEV_ERRNO_START (PJ_ERRNO_START_USER + PJ_ERRNO_SPACE_SI ZE*5)
* - PJ_SSL_ERRNO_START (PJ_ERRNO_START_USER + PJ_ERRNO_SPACE_SIZ
E*6)
* - PJMEDIA_VIDEODEV_ERRNO_START (PJ_ERRNO_START_USER + PJ_ERRNO_SPACE_SI
ZE*7)
*/ */
/* Internal */ /* Internal */
void pj_errno_clear_handlers(void); void pj_errno_clear_handlers(void);
/****** Internal for PJ_PERROR *******/ /****** Internal for PJ_PERROR *******/
/** /**
* @def pj_perror_wrapper_1(arg) * @def pj_perror_wrapper_1(arg)
* Internal function to write log with verbosity 1. Will evaluate to * Internal function to write log with verbosity 1. Will evaluate to
 End of changes. 2 change blocks. 
1 lines changed or deleted 5 lines changed or added


 guid.h   guid.h 
/* $Id: guid.h 4385 2013-02-27 10:11:59Z nanang $ */ /* $Id: guid.h 3553 2011-05-05 06:14:19Z nanang $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 82 skipping to change at line 82
* characters. Caller is responsible for preallocating the storage used * characters. Caller is responsible for preallocating the storage used
* in the string. * in the string.
* *
* @param str The string to store the result. * @param str The string to store the result.
* *
* @return The string. * @return The string.
*/ */
PJ_DECL(pj_str_t*) pj_generate_unique_string(pj_str_t *str); PJ_DECL(pj_str_t*) pj_generate_unique_string(pj_str_t *str);
/** /**
* Create a globally unique string in lowercase, which length is
* PJ_GUID_STRING_LENGTH characters. Caller is responsible for preallocatin
g
* the storage used in the string.
*
* @param str The string to store the result.
*
* @return The string.
*/
PJ_DECL(pj_str_t*) pj_generate_unique_string_lower(pj_str_t *str);
/**
* Generate a unique string. * Generate a unique string.
* *
* @param pool Pool to allocate memory from. * @param pool Pool to allocate memory from.
* @param str The string. * @param str The string.
*/ */
PJ_DECL(void) pj_create_unique_string(pj_pool_t *pool, pj_str_t *str); PJ_DECL(void) pj_create_unique_string(pj_pool_t *pool, pj_str_t *str);
/** /**
* Generate a unique string in lowercase.
*
* @param pool Pool to allocate memory from.
* @param str The string.
*/
PJ_DECL(void) pj_create_unique_string_lower(pj_pool_t *pool, pj_str_t *str)
;
/**
* @} * @}
*/ */
PJ_END_DECL PJ_END_DECL
#endif/* __PJ_GUID_H__ */ #endif/* __PJ_GUID_H__ */
 End of changes. 3 change blocks. 
22 lines changed or deleted 1 lines changed or added


 hash.h   hash.h 
/* $Id: hash.h 4385 2013-02-27 10:11:59Z nanang $ */ /* $Id: hash.h 3841 2011-10-24 09:28:13Z ming $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 77 skipping to change at line 77
* @return the hash value. * @return the hash value.
*/ */
PJ_DECL(pj_uint32_t) pj_hash_calc(pj_uint32_t hval, PJ_DECL(pj_uint32_t) pj_hash_calc(pj_uint32_t hval,
const void *key, unsigned keylen); const void *key, unsigned keylen);
/** /**
* Convert the key to lowercase and calculate the hash value. The resulting * Convert the key to lowercase and calculate the hash value. The resulting
* string is stored in \c result. * string is stored in \c result.
* *
* @param hval The initial hash value, normally zero. * @param hval The initial hash value, normally zero.
* @param result Optional. Buffer to store the result, which must be eno * @param result Buffer to store the result, which must be enough to hol
ugh d
* to hold the string. * the string.
* @param key The input key to be converted and calculated. * @param key The input key to be converted and calculated.
* *
* @return The hash value. * @return The hash value.
*/ */
PJ_DECL(pj_uint32_t) pj_hash_calc_tolower(pj_uint32_t hval, PJ_DECL(pj_uint32_t) pj_hash_calc_tolower(pj_uint32_t hval,
char *result, char *result,
const pj_str_t *key); const pj_str_t *key);
/** /**
* Create a hash table with the specified 'bucket' size. * Create a hash table with the specified 'bucket' size.
skipping to change at line 116 skipping to change at line 116
* the argument is not NULL and the value is zero, it will * the argument is not NULL and the value is zero, it will
* be filled with the computed hash upon return. * be filled with the computed hash upon return.
* *
* @return the value associated with the key, or NULL if the key is not fou nd. * @return the value associated with the key, or NULL if the key is not fou nd.
*/ */
PJ_DECL(void *) pj_hash_get( pj_hash_table_t *ht, PJ_DECL(void *) pj_hash_get( pj_hash_table_t *ht,
const void *key, unsigned keylen, const void *key, unsigned keylen,
pj_uint32_t *hval ); pj_uint32_t *hval );
/** /**
* Variant of #pj_hash_get() with the key being converted to lowercase when
* calculating the hash value.
*
* @see pj_hash_get()
*/
PJ_DECL(void *) pj_hash_get_lower( pj_hash_table_t *ht,
const void *key, unsigned keylen,
pj_uint32_t *hval );
/**
* Associate/disassociate a value with the specified key. If value is not * Associate/disassociate a value with the specified key. If value is not
* NULL and entry already exists, the entry's value will be overwritten. * NULL and entry already exists, the entry's value will be overwritten.
* If value is not NULL and entry does not exist, a new one will be created * If value is not NULL and entry does not exist, a new one will be created
* with the specified pool. Otherwise if value is NULL, entry will be * with the specified pool. Otherwise if value is NULL, entry will be
* deleted if it exists. * deleted if it exists.
* *
* @param pool the pool to allocate the new entry if a new entry has to be * @param pool the pool to allocate the new entry if a new entry has to be
* created. * created.
* @param ht the hash table. * @param ht the hash table.
* @param key the key. If pool is not specified, the key MUST point to * @param key the key. If pool is not specified, the key MUST point to
skipping to change at line 151 skipping to change at line 141
* compute the key. This value can be obtained when calling * compute the key. This value can be obtained when calling
* #pj_hash_get(). * #pj_hash_get().
* @param value value to be associated, or NULL to delete the en try with * @param value value to be associated, or NULL to delete the en try with
* the specified key. * the specified key.
*/ */
PJ_DECL(void) pj_hash_set( pj_pool_t *pool, pj_hash_table_t *ht, PJ_DECL(void) pj_hash_set( pj_pool_t *pool, pj_hash_table_t *ht,
const void *key, unsigned keylen, pj_uint32_t hva l, const void *key, unsigned keylen, pj_uint32_t hva l,
void *value ); void *value );
/** /**
* Variant of #pj_hash_set() with the key being converted to lowercase when
* calculating the hash value.
*
* @see pj_hash_set()
*/
PJ_DECL(void) pj_hash_set_lower( pj_pool_t *pool, pj_hash_table_t *ht,
const void *key, unsigned keylen,
pj_uint32_t hval, void *value );
/**
* Associate/disassociate a value with the specified key. This function wor ks * Associate/disassociate a value with the specified key. This function wor ks
* like #pj_hash_set(), except that it doesn't use pool (hence the np -- no * like #pj_hash_set(), except that it doesn't use pool (hence the np -- no
* pool suffix). If new entry needs to be allocated, it will use the entry_ buf. * pool suffix). If new entry needs to be allocated, it will use the entry_ buf.
* *
* @param ht the hash table. * @param ht the hash table.
* @param key the key. * @param key the key.
* @param keylen the length of the key, or PJ_HASH_KEY_STRING to use the * @param keylen the length of the key, or PJ_HASH_KEY_STRING to use the
* string length of the key. * string length of the key.
* @param hval if the value is not zero, then the hash table will use * @param hval if the value is not zero, then the hash table will use
* this value to search the entry's index, otherwise it wil l * this value to search the entry's index, otherwise it wil l
skipping to change at line 184 skipping to change at line 164
* to be created. * to be created.
* @param value value to be associated, or NULL to delete the en try with * @param value value to be associated, or NULL to delete the en try with
* the specified key. * the specified key.
*/ */
PJ_DECL(void) pj_hash_set_np(pj_hash_table_t *ht, PJ_DECL(void) pj_hash_set_np(pj_hash_table_t *ht,
const void *key, unsigned keylen, const void *key, unsigned keylen,
pj_uint32_t hval, pj_hash_entry_buf entry_buf, pj_uint32_t hval, pj_hash_entry_buf entry_buf,
void *value); void *value);
/** /**
* Variant of #pj_hash_set_np() with the key being converted to lowercase
* when calculating the hash value.
*
* @see pj_hash_set_np()
*/
PJ_DECL(void) pj_hash_set_np_lower(pj_hash_table_t *ht,
const void *key, unsigned keylen,
pj_uint32_t hval,
pj_hash_entry_buf entry_buf,
void *value);
/**
* Get the total number of entries in the hash table. * Get the total number of entries in the hash table.
* *
* @param ht the hash table. * @param ht the hash table.
* *
* @return the number of entries in the hash table. * @return the number of entries in the hash table.
*/ */
PJ_DECL(unsigned) pj_hash_count( pj_hash_table_t *ht ); PJ_DECL(unsigned) pj_hash_count( pj_hash_table_t *ht );
/** /**
* Get the iterator to the first element in the hash table. * Get the iterator to the first element in the hash table.
 End of changes. 5 change blocks. 
36 lines changed or deleted 4 lines changed or added


 http_client.h   http_client.h 
/* $Id: http_client.h 3810 2011-10-11 04:37:37Z bennylp $ */ /* $Id: http_client.h 3841 2011-10-24 09:28:13Z ming $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 ice_strans.h   ice_strans.h 
/* $Id: ice_strans.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: ice_strans.h 4133 2012-05-21 14:00:17Z bennylp $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 268 skipping to change at line 268
* field specifies a hostname rather than domain name. This * field specifies a hostname rather than domain name. This
* field should also be set even when the \a server * field should also be set even when the \a server
* specifies a domain name, to allow DNS SRV resolution * specifies a domain name, to allow DNS SRV resolution
* to fallback to DNS A/AAAA resolution when the DNS SRV * to fallback to DNS A/AAAA resolution when the DNS SRV
* resolution fails. * resolution fails.
* *
* The default value is PJ_STUN_PORT. * The default value is PJ_STUN_PORT.
*/ */
pj_uint16_t port; pj_uint16_t port;
/**
* Ignore STUN resolution error and proceed with just local
* addresses.
*
* The default is PJ_FALSE
*/
pj_bool_t ignore_stun_error;
} stun; } stun;
/** /**
* TURN specific settings. * TURN specific settings.
*/ */
struct { struct {
/** /**
* Optional TURN socket settings. The default values will be * Optional TURN socket settings. The default values will be
* initialized by #pj_turn_sock_cfg_default(). This contains * initialized by #pj_turn_sock_cfg_default(). This contains
* settings such as QoS. * settings such as QoS.
 End of changes. 2 change blocks. 
1 lines changed or deleted 9 lines changed or added


 jbuf.h   jbuf.h 
/* $Id: jbuf.h 3814 2011-10-13 09:02:41Z nanang $ */ /* $Id: jbuf.h 3841 2011-10-24 09:28:13Z ming $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 273 skipping to change at line 273
* @param discarded Flag whether the frame is discarded by jitter buffer . * @param discarded Flag whether the frame is discarded by jitter buffer .
*/ */
PJ_DECL(void) pjmedia_jbuf_put_frame2( pjmedia_jbuf *jb, PJ_DECL(void) pjmedia_jbuf_put_frame2( pjmedia_jbuf *jb,
const void *frame, const void *frame,
pj_size_t size, pj_size_t size,
pj_uint32_t bit_info, pj_uint32_t bit_info,
int frame_seq, int frame_seq,
pj_bool_t *discarded); pj_bool_t *discarded);
/** /**
* Put a frame to the jitter buffer. If the frame can be accepted (based
* on the sequence number), the jitter buffer will copy the frame and put
* it in the appropriate position in the buffer.
*
* Application MUST manage it's own synchronization when multiple threads
* are accessing the jitter buffer at the same time.
*
* @param jb The jitter buffer.
* @param frame Pointer to frame buffer to be stored in the
jitter
* buffer.
* @param size The frame size.
* @param bit_info Bit precise info of the frame, e.g: a frame may not
* exactly start and end at the octet boundary, so this
* field may be used for specifying start & end bit off
set.
* @param frame_seq The frame sequence number.
* @param frame_ts The frame timestamp.
* @param discarded Flag whether the frame is discarded by jitter buffer
.
*/
PJ_DECL(void) pjmedia_jbuf_put_frame3( pjmedia_jbuf *jb,
const void *frame,
pj_size_t size,
pj_uint32_t bit_info,
int frame_seq,
pj_uint32_t frame_ts,
pj_bool_t *discarded);
/**
* Get a frame from the jitter buffer. The jitter buffer will return the * Get a frame from the jitter buffer. The jitter buffer will return the
* oldest frame from it's buffer, when it is available. * oldest frame from it's buffer, when it is available.
* *
* Application MUST manage it's own synchronization when multiple threads * Application MUST manage it's own synchronization when multiple threads
* are accessing the jitter buffer at the same time. * are accessing the jitter buffer at the same time.
* *
* @param jb The jitter buffer. * @param jb The jitter buffer.
* @param frame Buffer to receive the payload from the jitte r buffer. * @param frame Buffer to receive the payload from the jitte r buffer.
* Application MUST make sure that the buffer has * Application MUST make sure that the buffer has
* appropriate size (i.e. not less than the frame size, * appropriate size (i.e. not less than the frame size,
skipping to change at line 322 skipping to change at line 348
* exactly start and end at the octet boundary, so this * exactly start and end at the octet boundary, so this
* field may be used for specifying start & end bit off set. * field may be used for specifying start & end bit off set.
*/ */
PJ_DECL(void) pjmedia_jbuf_get_frame2(pjmedia_jbuf *jb, PJ_DECL(void) pjmedia_jbuf_get_frame2(pjmedia_jbuf *jb,
void *frame, void *frame,
pj_size_t *size, pj_size_t *size,
char *p_frm_type, char *p_frm_type,
pj_uint32_t *bit_info); pj_uint32_t *bit_info);
/** /**
* Get a frame from the jitter buffer. The jitter buffer will return the
* oldest frame from it's buffer, when it is available.
*
* @param jb The jitter buffer.
* @param frame Buffer to receive the payload from the jitte
r buffer.
* @see pjmedia_jbuf_get_frame().
* @param size Pointer to receive frame size.
* @param p_frm_type Pointer to receive frame type.
* @see pjmedia_jbuf_get_frame().
* @param bit_info Bit precise info of the frame, e.g: a frame may not
* exactly start and end at the octet boundary, so this
* field may be used for specifying start & end bit off
set.
* @param ts Frame timestamp.
* @param seq Frame sequence number.
*/
PJ_DECL(void) pjmedia_jbuf_get_frame3(pjmedia_jbuf *jb,
void *frame,
pj_size_t *size,
char *p_frm_type,
pj_uint32_t *bit_info,
pj_uint32_t *ts,
int *seq);
/**
* Peek a frame from the jitter buffer. The jitter buffer state will not be
* modified.
*
* @param jb The jitter buffer.
* @param offset Offset from the oldest frame to be peeked.
* @param frame Buffer to receive the payload from the jitte
r buffer.
* @see pjmedia_jbuf_get_frame().
* @param size Pointer to receive frame size.
* @param p_frm_type Pointer to receive frame type.
* @see pjmedia_jbuf_get_frame().
* @param bit_info Bit precise info of the frame, e.g: a frame may not
* exactly start and end at the octet boundary, so this
* field may be used for specifying start & end bit off
set.
* @param ts Frame timestamp.
* @param seq Frame sequence number.
*/
PJ_DECL(void) pjmedia_jbuf_peek_frame(pjmedia_jbuf *jb,
unsigned offset,
const void **frame,
pj_size_t *size,
char *p_frm_type,
pj_uint32_t *bit_info,
pj_uint32_t *ts,
int *seq);
/**
* Remove frames from the jitter buffer.
*
* @param jb The jitter buffer.
* @param frame_cnt Number of frames to be removed.
*
* @return The number of frame successfully removed.
*/
PJ_DECL(unsigned) pjmedia_jbuf_remove_frame(pjmedia_jbuf *jb,
unsigned frame_cnt);
/**
* Check if the jitter buffer is full.
*
* @param jb The jitter buffer.
*
* @return PJ_TRUE if it is full.
*/
PJ_DECL(pj_bool_t) pjmedia_jbuf_is_full(const pjmedia_jbuf *jb);
/**
* Get jitter buffer current state/settings. * Get jitter buffer current state/settings.
* *
* @param jb The jitter buffer. * @param jb The jitter buffer.
* @param state Buffer to receive jitter buffer state. * @param state Buffer to receive jitter buffer state.
* *
* @return PJ_SUCCESS on success. * @return PJ_SUCCESS on success.
*/ */
PJ_DECL(pj_status_t) pjmedia_jbuf_get_state( const pjmedia_jbuf *jb, PJ_DECL(pj_status_t) pjmedia_jbuf_get_state( const pjmedia_jbuf *jb,
pjmedia_jb_state *state ); pjmedia_jb_state *state );
 End of changes. 3 change blocks. 
1 lines changed or deleted 104 lines changed or added


 log.h   log.h 
/* $Id: log.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: log.h 3752 2011-09-18 14:38:46Z bennylp $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 84 skipping to change at line 84
PJ_LOG_HAS_MONTH = 4, /**< Include month [no] */ PJ_LOG_HAS_MONTH = 4, /**< Include month [no] */
PJ_LOG_HAS_DAY_OF_MON = 8, /**< Include day of month [no] */ PJ_LOG_HAS_DAY_OF_MON = 8, /**< Include day of month [no] */
PJ_LOG_HAS_TIME = 16, /**< Include time [yes] */ PJ_LOG_HAS_TIME = 16, /**< Include time [yes] */
PJ_LOG_HAS_MICRO_SEC = 32, /**< Include microseconds [yes] */ PJ_LOG_HAS_MICRO_SEC = 32, /**< Include microseconds [yes] */
PJ_LOG_HAS_SENDER = 64, /**< Include sender in the log [yes] */ PJ_LOG_HAS_SENDER = 64, /**< Include sender in the log [yes] */
PJ_LOG_HAS_NEWLINE = 128, /**< Terminate each call with newline [yes ] */ PJ_LOG_HAS_NEWLINE = 128, /**< Terminate each call with newline [yes ] */
PJ_LOG_HAS_CR = 256, /**< Include carriage return [no] */ PJ_LOG_HAS_CR = 256, /**< Include carriage return [no] */
PJ_LOG_HAS_SPACE = 512, /**< Include two spaces before log [yes] */ PJ_LOG_HAS_SPACE = 512, /**< Include two spaces before log [yes] */
PJ_LOG_HAS_COLOR = 1024, /**< Colorize logs [yes on win32] */ PJ_LOG_HAS_COLOR = 1024, /**< Colorize logs [yes on win32] */
PJ_LOG_HAS_LEVEL_TEXT = 2048, /**< Include level text string [no] */ PJ_LOG_HAS_LEVEL_TEXT = 2048, /**< Include level text string [no] */
PJ_LOG_HAS_THREAD_ID = 4096 /**< Include thread identification [no] PJ_LOG_HAS_THREAD_ID = 4096, /**< Include thread identification [no]
*/ */
PJ_LOG_HAS_THREAD_SWC = 8192, /**< Add mark when thread has switched [y
es]*/
PJ_LOG_HAS_INDENT =16384 /**< Indentation. Say yes! [yes]
*/
}; };
/** /**
* Write log message. * Write log message.
* This is the main macro used to write text to the logging backend. * This is the main macro used to write text to the logging backend.
* *
* @param level The logging verbosity level. Lower number indica tes higher * @param level The logging verbosity level. Lower number indica tes higher
* importance, with level zero indicates fatal error. Only * importance, with level zero indicates fatal error. Only
* numeral argument is permitted (e.g. not variable). * numeral argument is permitted (e.g. not variable).
* @param arg Enclosed 'printf' like arguments, with the first * @param arg Enclosed 'printf' like arguments, with the first
skipping to change at line 206 skipping to change at line 208
PJ_DECL(void) pj_log_set_decor(unsigned decor); PJ_DECL(void) pj_log_set_decor(unsigned decor);
/** /**
* Get current log decoration flag. * Get current log decoration flag.
* *
* @return Log decoration flag. * @return Log decoration flag.
*/ */
PJ_DECL(unsigned) pj_log_get_decor(void); PJ_DECL(unsigned) pj_log_get_decor(void);
/** /**
* Add indentation to log message. Indentation will add PJ_LOG_INDENT_CHAR
* before the message, and is useful to show the depth of function calls.
*
* @param indent The indentation to add or substract. Positive value
* adds current indent, negative value subtracts current
* indent.
*/
PJ_DECL(void) pj_log_add_indent(int indent);
/**
* Push indentation to the right by default value (PJ_LOG_INDENT).
*/
PJ_DECL(void) pj_log_push_indent(void);
/**
* Pop indentation (to the left) by default value (PJ_LOG_INDENT).
*/
PJ_DECL(void) pj_log_pop_indent(void);
/**
* Set color of log messages. * Set color of log messages.
* *
* @param level Log level which color will be changed. * @param level Log level which color will be changed.
* @param color Desired color. * @param color Desired color.
*/ */
PJ_DECL(void) pj_log_set_color(int level, pj_color_t color); PJ_DECL(void) pj_log_set_color(int level, pj_color_t color);
/** /**
* Get color of log messages. * Get color of log messages.
* *
 End of changes. 3 change blocks. 
3 lines changed or deleted 27 lines changed or added


 opencore_amrnb.h   opencore_amrnb.h 
/* $Id: opencore_amrnb.h 3816 2011-10-14 04:15:15Z bennylp $ */ /* $Id: opencore_amrnb.h 3841 2011-10-24 09:28:13Z ming $ */
/* /*
* Copyright (C) 2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2011 Dan Arrhenius <dan@keystream.se> * Copyright (C) 2011 Dan Arrhenius <dan@keystream.se>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 os.h   os.h 
/* $Id: os.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: os.h 3664 2011-07-19 03:42:28Z nanang $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 1413 skipping to change at line 1413
*/ */
PJ_DECL(pj_uint32_t) pj_elapsed_cycle( const pj_timestamp *start, PJ_DECL(pj_uint32_t) pj_elapsed_cycle( const pj_timestamp *start,
const pj_timestamp *stop ); const pj_timestamp *stop );
#endif /* PJ_HAS_HIGH_RES_TIMER */ #endif /* PJ_HAS_HIGH_RES_TIMER */
/** @} */ /** @} */
/* ************************************************************************ **/ /* ************************************************************************ **/
/** /**
* @defgroup PJ_APP_OS Application execution
* @ingroup PJ_OS
* @{
*/
/* Type for main function. */
typedef int (*pj_main_func_ptr)(int argc, char *argv[]);
/**
* Run the application. This function has to be called in the main thread
* and after doing the necessary initialization according to the flags
* provided, it will call main_func() function.
*
* @param main_func Application's main function.
* @param argc Number of arguments from the main() function, which
* will be passed to main_func() function.
* @param argv The arguments from the main() function, which will
* be passed to main_func() function.
* @param flags Flags for application execution, currently must be 0.
*
* @return main_func()'s return value.
*/
int pj_run_app(pj_main_func_ptr main_func, int argc, char *argv[],
unsigned flags);
/** @} */
/* ************************************************************************
**/
/**
* Internal PJLIB function to initialize the threading subsystem. * Internal PJLIB function to initialize the threading subsystem.
* @return PJ_SUCCESS or the appropriate error code. * @return PJ_SUCCESS or the appropriate error code.
*/ */
pj_status_t pj_thread_init(void); pj_status_t pj_thread_init(void);
PJ_END_DECL PJ_END_DECL
#endif /* __PJ_OS_H__ */ #endif /* __PJ_OS_H__ */
 End of changes. 2 change blocks. 
1 lines changed or deleted 31 lines changed or added


 os_auto.h   os_auto.h 
/* pjlib/include/pj/compat/os_auto.h. Generated from os_auto.h.in by confi gure. */ /* pjlib/include/pj/compat/os_auto.h. Generated from os_auto.h.in by confi gure. */
/* $Id: os_auto.h.in 3692 2011-08-11 08:45:38Z ming $ */ /* $Id: os_auto.h.in 3841 2011-10-24 09:28:13Z ming $ */
/* /*
* Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 os_auto.h.in   os_auto.h.in 
/* $Id: os_auto.h.in 3692 2011-08-11 08:45:38Z ming $ */ /* $Id: os_auto.h.in 3841 2011-10-24 09:28:13Z ming $ */
/* /*
* Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 os_symbian.h   os_symbian.h 
/* $Id: os_symbian.h 3822 2011-10-18 04:26:37Z bennylp $ */ /* $Id: os_symbian.h 3841 2011-10-24 09:28:13Z ming $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 os_win32_wince.h   os_win32_wince.h 
/* $Id: os_win32_wince.h 3822 2011-10-18 04:26:37Z bennylp $ */ /* $Id: os_win32_wince.h 3841 2011-10-24 09:28:13Z ming $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 pjmedia-codec.h   pjmedia-codec.h 
/* $Id: pjmedia-codec.h 3816 2011-10-14 04:15:15Z bennylp $ */ /* $Id: pjmedia-codec.h 4049 2012-04-13 06:24:23Z ming $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 28 skipping to change at line 28
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A
*/ */
#ifndef __PJMEDIA_CODEC_PJMEDIA_CODEC_H__ #ifndef __PJMEDIA_CODEC_PJMEDIA_CODEC_H__
#define __PJMEDIA_CODEC_PJMEDIA_CODEC_H__ #define __PJMEDIA_CODEC_PJMEDIA_CODEC_H__
/** /**
* @file pjmedia-codec.h * @file pjmedia-codec.h
* @brief Include all codecs API in PJMEDIA-CODEC * @brief Include all codecs API in PJMEDIA-CODEC
*/ */
#include <pjmedia-codec/audio_codecs.h>
#include <pjmedia-codec/l16.h> #include <pjmedia-codec/l16.h>
#include <pjmedia-codec/ffmpeg_vid_codecs.h>
#include <pjmedia-codec/gsm.h> #include <pjmedia-codec/gsm.h>
#include <pjmedia-codec/speex.h> #include <pjmedia-codec/speex.h>
#include <pjmedia-codec/ilbc.h> #include <pjmedia-codec/ilbc.h>
#include <pjmedia-codec/g722.h> #include <pjmedia-codec/g722.h>
#include <pjmedia-codec/g7221.h> #include <pjmedia-codec/g7221.h>
#include <pjmedia-codec/ipp_codecs.h> #include <pjmedia-codec/ipp_codecs.h>
#include <pjmedia-codec/passthrough.h> #include <pjmedia-codec/passthrough.h>
#include <pjmedia-codec/opencore_amrnb.h> #include <pjmedia-codec/opencore_amrnb.h>
#endif /* __PJMEDIA_CODEC_PJMEDIA_CODEC_H__ */ #endif /* __PJMEDIA_CODEC_PJMEDIA_CODEC_H__ */
 End of changes. 3 change blocks. 
1 lines changed or deleted 3 lines changed or added


 pjmedia.h   pjmedia.h 
/* $Id: pjmedia.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: pjmedia.h 3664 2011-07-19 03:42:28Z nanang $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 27 skipping to change at line 27
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A
*/ */
#ifndef __PJMEDIA_H__ #ifndef __PJMEDIA_H__
#define __PJMEDIA_H__ #define __PJMEDIA_H__
/** /**
* @file pjmedia.h * @file pjmedia.h
* @brief PJMEDIA main header file. * @brief PJMEDIA main header file.
*/ */
#include <pjmedia/types.h>
#include <pjmedia/alaw_ulaw.h> #include <pjmedia/alaw_ulaw.h>
#include <pjmedia/avi_stream.h>
#include <pjmedia/bidirectional.h> #include <pjmedia/bidirectional.h>
#include <pjmedia/circbuf.h> #include <pjmedia/circbuf.h>
#include <pjmedia/clock.h> #include <pjmedia/clock.h>
#include <pjmedia/codec.h> #include <pjmedia/codec.h>
#include <pjmedia/conference.h> #include <pjmedia/conference.h>
#include <pjmedia/converter.h>
#include <pjmedia/delaybuf.h> #include <pjmedia/delaybuf.h>
#include <pjmedia/echo.h> #include <pjmedia/echo.h>
#include <pjmedia/echo_port.h> #include <pjmedia/echo_port.h>
#include <pjmedia/errno.h>
#include <pjmedia/endpoint.h> #include <pjmedia/endpoint.h>
#include <pjmedia/errno.h>
#include <pjmedia/event.h>
#include <pjmedia/frame.h>
#include <pjmedia/format.h>
#include <pjmedia/g711.h> #include <pjmedia/g711.h>
#include <pjmedia/jbuf.h> #include <pjmedia/jbuf.h>
#include <pjmedia/master_port.h> #include <pjmedia/master_port.h>
#include <pjmedia/mem_port.h> #include <pjmedia/mem_port.h>
#include <pjmedia/null_port.h> #include <pjmedia/null_port.h>
#include <pjmedia/plc.h> #include <pjmedia/plc.h>
#include <pjmedia/port.h> #include <pjmedia/port.h>
#include <pjmedia/resample.h> #include <pjmedia/resample.h>
#include <pjmedia/rtcp.h> #include <pjmedia/rtcp.h>
#include <pjmedia/rtcp_xr.h> #include <pjmedia/rtcp_xr.h>
#include <pjmedia/rtp.h> #include <pjmedia/rtp.h>
#include <pjmedia/sdp.h> #include <pjmedia/sdp.h>
#include <pjmedia/sdp_neg.h> #include <pjmedia/sdp_neg.h>
#include <pjmedia/session.h> //#include <pjmedia/session.h>
#include <pjmedia/silencedet.h> #include <pjmedia/silencedet.h>
#include <pjmedia/sound.h> #include <pjmedia/sound.h>
#include <pjmedia/sound_port.h> #include <pjmedia/sound_port.h>
#include <pjmedia/splitcomb.h> #include <pjmedia/splitcomb.h>
#include <pjmedia/stereo.h> #include <pjmedia/stereo.h>
#include <pjmedia/stream.h> #include <pjmedia/stream.h>
#include <pjmedia/stream_common.h>
#include <pjmedia/tonegen.h> #include <pjmedia/tonegen.h>
#include <pjmedia/transport.h> #include <pjmedia/transport.h>
#include <pjmedia/transport_adapter_sample.h> #include <pjmedia/transport_adapter_sample.h>
#include <pjmedia/transport_ice.h> #include <pjmedia/transport_ice.h>
#include <pjmedia/transport_loop.h> #include <pjmedia/transport_loop.h>
#include <pjmedia/transport_srtp.h> #include <pjmedia/transport_srtp.h>
#include <pjmedia/transport_udp.h> #include <pjmedia/transport_udp.h>
#include <pjmedia/vid_port.h>
#include <pjmedia/vid_codec.h>
#include <pjmedia/vid_stream.h>
#include <pjmedia/vid_tee.h>
#include <pjmedia/wav_playlist.h> #include <pjmedia/wav_playlist.h>
#include <pjmedia/wav_port.h> #include <pjmedia/wav_port.h>
#include <pjmedia/wave.h> #include <pjmedia/wave.h>
#include <pjmedia/wsola.h> #include <pjmedia/wsola.h>
#endif /* __PJMEDIA_H__ */ #endif /* __PJMEDIA_H__ */
 End of changes. 9 change blocks. 
5 lines changed or deleted 13 lines changed or added


 pjsua_internal.h   pjsua_internal.h 
/* $Id: pjsua_internal.h 4389 2013-02-27 10:44:04Z ming $ */ /* $Id: pjsua_internal.h 4099 2012-04-26 16:46:27Z nanang $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 30 skipping to change at line 30
#ifndef __PJSUA_INTERNAL_H__ #ifndef __PJSUA_INTERNAL_H__
#define __PJSUA_INTERNAL_H__ #define __PJSUA_INTERNAL_H__
/** /**
* This is the private header used by pjsua library implementation. * This is the private header used by pjsua library implementation.
* Applications should not include this file. * Applications should not include this file.
*/ */
PJ_BEGIN_DECL PJ_BEGIN_DECL
/** Forward decl of pjsua call */
typedef struct pjsua_call pjsua_call;
/** Forward decl of pjsua call media */
typedef struct pjsua_call_media pjsua_call_media;
/** /**
* Media transport state. * Call's media stream.
*/ */
typedef enum pjsua_med_tp_st struct pjsua_call_media
{ {
/** Not initialized */ pjsua_call *call; /**< Parent call.
PJSUA_MED_TP_IDLE, */
pjmedia_type type; /**< Media type.
*/
unsigned idx; /**< This media index in parent call.
*/
pjsua_call_media_status state; /**< Media state.
*/
pjsua_call_media_status prev_state;/**< Previous media state.
*/
pjmedia_dir dir; /**< Media direction.
*/
/** The stream */
struct {
/** Audio stream */
struct {
pjmedia_stream *stream; /**< The audio stream.
*/
int conf_slot; /**< Slot # in conference bridge.
*/
} a;
/** Video stream */
struct {
pjmedia_vid_stream *stream; /**< The video stream.
*/
pjsua_vid_win_id cap_win_id;/**< The video capture window
*/
pjsua_vid_win_id rdr_win_id;/**< The video render window
*/
pjmedia_vid_dev_index cap_dev; /**< The video capture device
*/
pjmedia_vid_dev_index rdr_dev; /**< The video-in render device
*/
} v;
} strm;
pj_uint32_t ssrc; /**< RTP SSRC
*/
pj_uint32_t rtp_tx_ts; /**< Initial RTP timestamp for s
ender. */
pj_uint16_t rtp_tx_seq;/**< Initial RTP sequence for se
nder. */
pj_uint8_t rtp_tx_seq_ts_set;
/**< Bitmask flags if initial RTP sequen
ce
and/or timestamp for sender are set
.
bit 0/LSB : sequence flag
bit 1 : timestamp flag
*/
/** Initialized (media_create() has been called) */ pjmedia_transport *tp; /**< Current media transport (can be 0)
PJSUA_MED_TP_INIT, */
pj_status_t tp_ready; /**< Media transport status.
*/
pj_status_t tp_result; /**< Media transport creation re
sult. */
pjmedia_transport *tp_orig; /**< Original media transport
*/
pj_bool_t tp_auto_del; /**< May delete media transport
*/
pjsua_med_tp_st tp_st; /**< Media transport state
*/
pj_bool_t use_custom_med_tp;/**< Use custom media transport?
*/
pj_sockaddr rtp_addr; /**< Current RTP source address
(used to update ICE default
address)
*/
pjmedia_srtp_use rem_srtp_use; /**< Remote's SRTP usage policy.
*/
pj_timestamp last_req_keyframe;/**< Last TX keyframe request.
*/
/** Running (media_start() has been called) */ pjsua_med_tp_state_cb med_init_cb;/**< Media transport
PJSUA_MED_TP_RUNNING initialization callback.
*/
} pjsua_med_tp_st; /** Media transport creation callback. */
pj_status_t (*med_create_cb)(pjsua_call_media *call_med,
pj_status_t status, int security_level,
int *sip_err_code);
};
/**
* Maximum number of SDP "m=" lines to be supported.
*/
#define PJSUA_MAX_CALL_MEDIA PJMEDIA_MAX_SDP_MEDIA
/* Call answer's list. */
typedef struct call_answer
{
PJ_DECL_LIST_MEMBER(struct call_answer);
pjsua_msg_data *msg_data; /**< Answer's headers list. */
pj_str_t *reason; /**< Answer's reason phrase. */
unsigned code; /**< Answer's status code. */
} call_answer;
/** /**
* Structure to be attached to invite dialog. * Structure to be attached to invite dialog.
* Given a dialog "dlg", application can retrieve this structure * Given a dialog "dlg", application can retrieve this structure
* by accessing dlg->mod_data[pjsua.mod.id]. * by accessing dlg->mod_data[pjsua.mod.id].
*/ */
typedef struct pjsua_call struct pjsua_call
{ {
unsigned index; /**< Index in pjsua array. */ unsigned index; /**< Index in pjsua array. */
pjsua_call_setting opt; /**< Call setting. */
pjsip_inv_session *inv; /**< The invite session. */ pjsip_inv_session *inv; /**< The invite session. */
void *user_data; /**< User/application data. */ void *user_data; /**< User/application data. */
pjsip_status_code last_code; /**< Last status code seen. */ pjsip_status_code last_code; /**< Last status code seen. */
pj_str_t last_text; /**< Last status text seen. */ pj_str_t last_text; /**< Last status text seen. */
pj_time_val start_time;/**< First INVITE sent/received. */ pj_time_val start_time;/**< First INVITE sent/received. */
pj_time_val res_time; /**< First response sent/receive d. */ pj_time_val res_time; /**< First response sent/receive d. */
pj_time_val conn_time; /**< Connected/confirmed time. */ pj_time_val conn_time; /**< Connected/confirmed time. */
pj_time_val dis_time; /**< Disconnect time. */ pj_time_val dis_time; /**< Disconnect time. */
pjsua_acc_id acc_id; /**< Account index being used. */ pjsua_acc_id acc_id; /**< Account index being used. */
int secure_level;/**< Signaling security level. */ int secure_level;/**< Signaling security level. */
pjsua_call_hold_type call_hold_type; /**< How to do call hold. */ pjsua_call_hold_type call_hold_type; /**< How to do call hold. */
pj_bool_t local_hold;/**< Flag for call-hold by local. */ pj_bool_t local_hold;/**< Flag for call-hold by local. */
void *hold_msg; /**< Outgoing hold tx_data. */ void *hold_msg; /**< Outgoing hold tx_data. */
pjsua_call_media_status media_st;/**< Media state.
*/ unsigned med_cnt; /**< Number of media in SDP.
pjmedia_dir media_dir; /**< Media direction. */
*/ pjsua_call_media media[PJSUA_MAX_CALL_MEDIA]; /**< Array of media
pjmedia_session *session; /**< The media session. */
*/ unsigned med_prov_cnt;/**< Number of provisional media.
int audio_idx; /**< Index of m=audio in SDP. */
*/ pjsua_call_media media_prov[PJSUA_MAX_CALL_MEDIA];
pj_uint32_t ssrc; /**< RTP SSRC /**< Array of provisional media.
*/ */
pj_uint32_t rtp_tx_ts; /**< Initial RTP timestamp for s
ender. */ int audio_idx; /**< First active audio media.
pj_uint16_t rtp_tx_seq;/**< Initial RTP sequence for se */
nder. */ pj_mutex_t *med_ch_mutex;/**< Media channel callback's mutex.
pj_uint8_t rtp_tx_seq_ts_set; */
/**< Bitmask flags if initial RTP sequen pjsua_med_tp_state_cb med_ch_cb;/**< Media channel callback.
ce */
and/or timestamp for sender are set pjsua_med_tp_state_info med_ch_info;/**< Media channel info.
. */
bit 0/LSB : sequence flag
bit 1 : timestamp flag
*/
int conf_slot; /**< Slot # in conference bridge
. */
pjsip_evsub *xfer_sub; /**< Xfer server subscription, i f this pjsip_evsub *xfer_sub; /**< Xfer server subscription, i f this
call was triggered by xfer. */ call was triggered by xfer. */
pjmedia_transport *med_tp; /**< Current media transport.
*/
pj_status_t med_tp_ready;/**< Media transport status.
*/
pjmedia_transport *med_orig; /**< Original media transport
*/
pj_bool_t med_tp_auto_del; /**< May delete media transport
*/
pjsua_med_tp_st med_tp_st; /**< Media transport state
*/
pj_sockaddr med_rtp_addr; /**< Current RTP source addre
ss
(used to update ICE default
address)
*/
pj_stun_nat_type rem_nat_type; /**< NAT type of remote endpoint. */ pj_stun_nat_type rem_nat_type; /**< NAT type of remote endpoint. */
pjmedia_srtp_use rem_srtp_use; /**< Remote's SRTP usage policy. */
char last_text_buf_[128]; /**< Buffer for last_text. */ char last_text_buf_[128]; /**< Buffer for last_text. */
struct { struct {
pj_timer_entry reinv_timer;/**< Reinvite retry timer. */ pj_timer_entry reinv_timer;/**< Reinvite retry timer. */
pj_uint32_t sdp_ver; /**< SDP version of the bad answer */ pj_uint32_t sdp_ver; /**< SDP version of the bad answer */
int retry_cnt; /**< Retry count. */ int retry_cnt; /**< Retry count. */
pj_bool_t pending; /**< Pending until CONFIRMED state */ pj_bool_t pending; /**< Pending until CONFIRMED state */
} lock_codec; /**< Data for codec locking when answer } lock_codec; /**< Data for codec locking when answer
contains multiple codecs. */ contains multiple codecs. */
} pjsua_call; struct {
pjsip_dialog *dlg; /**< Call dialog.
*/
pjmedia_sdp_session *rem_sdp;/**< Remote SDP.
*/
pj_pool_t *pool_prov;/**< Provisional pool.
*/
pj_bool_t med_ch_deinit;/**< Media channel de-init-ed?
*/
union {
struct {
pjsua_msg_data *msg_data;/**< Headers for outgoing INVITE.
*/
} out_call;
struct {
call_answer answers;/**< A list of call answers.
*/
} inc_call;
} call_var;
} async_call; /**< Temporary storage for async
outgoing/incoming call.
*/
pj_bool_t rem_offerer; /**< Was remote SDP offerer?
*/
unsigned rem_aud_cnt; /**< No of active audio in last remot
e
offer.
*/
unsigned rem_vid_cnt; /**< No of active video in last remot
e
offer.
*/
};
/** /**
* Server presence subscription list head. * Server presence subscription list head.
*/ */
struct pjsua_srv_pres struct pjsua_srv_pres
{ {
PJ_DECL_LIST_MEMBER(struct pjsua_srv_pres); PJ_DECL_LIST_MEMBER(struct pjsua_srv_pres);
pjsip_evsub *sub; /**< The evsub. */ pjsip_evsub *sub; /**< The evsub. */
char *remote; /**< Remote URI. */ char *remote; /**< Remote URI. */
int acc_id; /**< Account ID. */ int acc_id; /**< Account ID. */
skipping to change at line 247 skipping to change at line 325
unsigned channel_count; unsigned channel_count;
unsigned samples_per_frame; unsigned samples_per_frame;
unsigned bits_per_sample; unsigned bits_per_sample;
} pjsua_conf_setting; } pjsua_conf_setting;
typedef struct pjsua_stun_resolve typedef struct pjsua_stun_resolve
{ {
PJ_DECL_LIST_MEMBER(struct pjsua_stun_resolve); PJ_DECL_LIST_MEMBER(struct pjsua_stun_resolve);
pj_pool_t *pool; /**< Pool */ pj_pool_t *pool; /**< Pool */
int ref_cnt; /**< Reference count */
pj_bool_t destroy_flag; /**< To be destroyed */
pj_bool_t has_result;
unsigned count; /**< # of entries */ unsigned count; /**< # of entries */
pj_str_t *srv; /**< Array of entries */ pj_str_t *srv; /**< Array of entries */
unsigned idx; /**< Current index */ unsigned idx; /**< Current index */
void *token; /**< App token */ void *token; /**< App token */
pj_stun_resolve_cb cb; /**< App callback */ pj_stun_resolve_cb cb; /**< App callback */
pj_bool_t blocking; /**< Blocking? */ pj_bool_t blocking; /**< Blocking? */
pj_status_t status; /**< Session status */ pj_status_t status; /**< Session status */
pj_sockaddr addr; /**< Result */ pj_sockaddr addr; /**< Result */
pj_stun_sock *stun_sock; /**< Testing STUN sock */ pj_stun_sock *stun_sock; /**< Testing STUN sock */
} pjsua_stun_resolve; } pjsua_stun_resolve;
/* See also pjsua_vid_win_type_name() */
typedef enum pjsua_vid_win_type
{
PJSUA_WND_TYPE_NONE,
PJSUA_WND_TYPE_PREVIEW,
PJSUA_WND_TYPE_STREAM
} pjsua_vid_win_type;
typedef struct pjsua_vid_win
{
pjsua_vid_win_type type; /**< Type. */
pj_pool_t *pool; /**< Own pool. */
unsigned ref_cnt; /**< Reference counter. */
pjmedia_vid_port *vp_cap; /**< Capture vidport. */
pjmedia_vid_port *vp_rend; /**< Renderer vidport */
pjmedia_port *tee; /**< Video tee */
pjmedia_vid_dev_index preview_cap_id;/**< Capture dev id */
pj_bool_t preview_running;/**< Preview is started*/
pj_bool_t is_native; /**< Preview is by dev */
} pjsua_vid_win;
typedef struct pjsua_timer_list
{
PJ_DECL_LIST_MEMBER(struct pjsua_timer_list);
pj_timer_entry entry;
void (*cb)(void *user_data);
void *user_data;
} pjsua_timer_list;
/** /**
* Global pjsua application data. * Global pjsua application data.
*/ */
struct pjsua_data struct pjsua_data
{ {
/* Control: */ /* Control: */
pj_caching_pool cp; /**< Global pool factory. */ pj_caching_pool cp; /**< Global pool factory. */
pj_pool_t *pool; /**< pjsua's private pool. */ pj_pool_t *pool; /**< pjsua's private pool. */
pj_mutex_t *mutex; /**< Mutex protection for this data */ pj_mutex_t *mutex; /**< Mutex protection for this data */
unsigned mutex_nesting_level; /**< Mutex nesting level. */
pj_thread_t *mutex_owner; /**< Mutex owner.
*/
pjsua_state state; /**< Library state.
*/
/* Logging: */ /* Logging: */
pjsua_logging_config log_cfg; /**< Current logging config. */ pjsua_logging_config log_cfg; /**< Current logging config. */
pj_oshandle_t log_file; /**<Output log file handle */ pj_oshandle_t log_file; /**<Output log file handle */
/* SIP: */ /* SIP: */
pjsip_endpoint *endpt; /**< Global endpoint. */ pjsip_endpoint *endpt; /**< Global endpoint. */
pjsip_module mod; /**< pjsua's PJSIP module. */ pjsip_module mod; /**< pjsua's PJSIP module. */
pjsua_transport_data tpdata[8]; /**< Array of transports. */ pjsua_transport_data tpdata[8]; /**< Array of transports. */
pjsip_tp_state_callback old_tp_cb; /**< Old transport callback. */ pjsip_tp_state_callback old_tp_cb; /**< Old transport callback. */
skipping to change at line 340 skipping to change at line 447
pjmedia_aud_dev_index play_dev; /**< Playback device ID. */ pjmedia_aud_dev_index play_dev; /**< Playback device ID. */
pj_uint32_t aud_svmask;/**< Which settings to save */ pj_uint32_t aud_svmask;/**< Which settings to save */
pjmedia_aud_param aud_param; /**< User settings to sound dev */ pjmedia_aud_param aud_param; /**< User settings to sound dev */
pj_bool_t aud_open_cnt;/**< How many # device is opened */ pj_bool_t aud_open_cnt;/**< How many # device is opened */
pj_bool_t no_snd; /**< No sound (app will manage it) */ pj_bool_t no_snd; /**< No sound (app will manage it) */
pj_pool_t *snd_pool; /**< Sound's private pool. */ pj_pool_t *snd_pool; /**< Sound's private pool. */
pjmedia_snd_port *snd_port; /**< Sound port. */ pjmedia_snd_port *snd_port; /**< Sound port. */
pj_timer_entry snd_idle_timer;/**< Sound device idle timer. */ pj_timer_entry snd_idle_timer;/**< Sound device idle timer. */
pjmedia_master_port *null_snd; /**< Master port for null sound. */ pjmedia_master_port *null_snd; /**< Master port for null sound. */
pjmedia_port *null_port; /**< Null port. */ pjmedia_port *null_port; /**< Null port. */
pj_bool_t snd_is_on; /**< Media flow is currently active */
/* Video device */
pjmedia_vid_dev_index vcap_dev; /**< Capture device ID. */
pjmedia_vid_dev_index vrdr_dev; /**< Playback device ID. */
/* File players: */ /* File players: */
unsigned player_cnt;/**< Number of file players. */ unsigned player_cnt;/**< Number of file players. */
pjsua_file_data player[PJSUA_MAX_PLAYERS];/**< Array of players.*/ pjsua_file_data player[PJSUA_MAX_PLAYERS];/**< Array of players.*/
/* File recorders: */ /* File recorders: */
unsigned rec_cnt; /**< Number of file recorders. */ unsigned rec_cnt; /**< Number of file recorders. */
pjsua_file_data recorder[PJSUA_MAX_RECORDERS];/**< Array of recs.*/ pjsua_file_data recorder[PJSUA_MAX_RECORDERS];/**< Array of recs.*/
/* Video windows */
#if PJSUA_HAS_VIDEO
pjsua_vid_win win[PJSUA_MAX_VID_WINS]; /**< Array of windows */
#endif
/* Timer entry list */
pjsua_timer_list timer_list;
pj_mutex_t *timer_mutex;
}; };
extern struct pjsua_data pjsua_var; extern struct pjsua_data pjsua_var;
/** /**
* Get the instance of pjsua * Get the instance of pjsua
*/ */
PJ_DECL(struct pjsua_data*) pjsua_get_var(void); PJ_DECL(struct pjsua_data*) pjsua_get_var(void);
/** /**
skipping to change at line 369 skipping to change at line 490
*/ */
typedef struct pjsua_im_data typedef struct pjsua_im_data
{ {
pjsua_acc_id acc_id; pjsua_acc_id acc_id;
pjsua_call_id call_id; pjsua_call_id call_id;
pj_str_t to; pj_str_t to;
pj_str_t body; pj_str_t body;
void *user_data; void *user_data;
} pjsua_im_data; } pjsua_im_data;
pj_status_t pjsua_media_apply_xml_control(pjsua_call_id call_id,
const pj_str_t *xml_st);
/** /**
* Duplicate IM data. * Duplicate IM data.
*/ */
PJ_INLINE(pjsua_im_data*) pjsua_im_data_dup(pj_pool_t *pool, PJ_INLINE(pjsua_im_data*) pjsua_im_data_dup(pj_pool_t *pool,
const pjsua_im_data *src) const pjsua_im_data *src)
{ {
pjsua_im_data *dst; pjsua_im_data *dst;
dst = (pjsua_im_data*) pj_pool_alloc(pool, sizeof(*dst)); dst = (pjsua_im_data*) pj_pool_alloc(pool, sizeof(*dst));
dst->acc_id = src->acc_id; dst->acc_id = src->acc_id;
dst->call_id = src->call_id; dst->call_id = src->call_id;
pj_strdup_with_null(pool, &dst->to, &src->to); pj_strdup_with_null(pool, &dst->to, &src->to);
dst->user_data = src->user_data; dst->user_data = src->user_data;
pj_strdup_with_null(pool, &dst->body, &src->body); pj_strdup_with_null(pool, &dst->body, &src->body);
return dst; return dst;
} }
#if 1 #if 1
#define PJSUA_LOCK() pj_mutex_lock(pjsua_var.mutex)
#define PJSUA_TRY_LOCK() pj_mutex_trylock(pjsua_var.mutex) PJ_INLINE(void) PJSUA_LOCK()
#define PJSUA_UNLOCK() pj_mutex_unlock(pjsua_var.mutex) {
pj_mutex_lock(pjsua_var.mutex);
pjsua_var.mutex_owner = pj_thread_this();
++pjsua_var.mutex_nesting_level;
}
PJ_INLINE(void) PJSUA_UNLOCK()
{
if (--pjsua_var.mutex_nesting_level == 0)
pjsua_var.mutex_owner = NULL;
pj_mutex_unlock(pjsua_var.mutex);
}
PJ_INLINE(pj_status_t) PJSUA_TRY_LOCK()
{
pj_status_t status;
status = pj_mutex_trylock(pjsua_var.mutex);
if (status == PJ_SUCCESS) {
pjsua_var.mutex_owner = pj_thread_this();
++pjsua_var.mutex_nesting_level;
}
return status;
}
PJ_INLINE(pj_bool_t) PJSUA_LOCK_IS_LOCKED()
{
return pjsua_var.mutex_owner == pj_thread_this();
}
#else #else
#define PJSUA_LOCK() #define PJSUA_LOCK()
#define PJSUA_TRY_LOCK() PJ_SUCCESS #define PJSUA_TRY_LOCK() PJ_SUCCESS
#define PJSUA_UNLOCK() #define PJSUA_UNLOCK()
#define PJSUA_LOCK_IS_LOCKED() PJ_TRUE
#endif #endif
/* Core */
void pjsua_set_state(pjsua_state new_state);
/****** /******
* STUN resolution * STUN resolution
*/ */
/* Resolve the STUN server */ /* Resolve the STUN server */
pj_status_t resolve_stun_server(pj_bool_t wait); pj_status_t resolve_stun_server(pj_bool_t wait);
/** /**
* Normalize route URI (check for ";lr" and append one if it doesn't * Normalize route URI (check for ";lr" and append one if it doesn't
* exist and pjsua_config.force_lr is set. * exist and pjsua_config.force_lr is set.
*/ */
skipping to change at line 422 skipping to change at line 578
pj_bool_t pjsua_call_on_incoming(pjsip_rx_data *rdata); pj_bool_t pjsua_call_on_incoming(pjsip_rx_data *rdata);
/* /*
* Media channel. * Media channel.
*/ */
pj_status_t pjsua_media_channel_init(pjsua_call_id call_id, pj_status_t pjsua_media_channel_init(pjsua_call_id call_id,
pjsip_role_e role, pjsip_role_e role,
int security_level, int security_level,
pj_pool_t *tmp_pool, pj_pool_t *tmp_pool,
const pjmedia_sdp_session *rem_sdp, const pjmedia_sdp_session *rem_sdp,
int *sip_err_code); int *sip_err_code,
pj_bool_t async,
pjsua_med_tp_state_cb cb);
pj_status_t pjsua_media_channel_create_sdp(pjsua_call_id call_id, pj_status_t pjsua_media_channel_create_sdp(pjsua_call_id call_id,
pj_pool_t *pool, pj_pool_t *pool,
const pjmedia_sdp_session *rem_sd p, const pjmedia_sdp_session *rem_sd p,
pjmedia_sdp_session **p_sdp, pjmedia_sdp_session **p_sdp,
int *sip_err_code); int *sip_err_code);
pj_status_t pjsua_media_channel_update(pjsua_call_id call_id, pj_status_t pjsua_media_channel_update(pjsua_call_id call_id,
const pjmedia_sdp_session *local_sdp, const pjmedia_sdp_session *local_sdp,
const pjmedia_sdp_session *remote_sdp ); const pjmedia_sdp_session *remote_sdp );
pj_status_t pjsua_media_channel_deinit(pjsua_call_id call_id); pj_status_t pjsua_media_channel_deinit(pjsua_call_id call_id);
pj_status_t pjsua_call_media_init(pjsua_call_media *call_med,
pjmedia_type type,
const pjsua_transport_config *tcfg,
int security_level,
int *sip_err_code,
pj_bool_t async,
pjsua_med_tp_state_cb cb);
void pjsua_set_media_tp_state(pjsua_call_media *call_med, pjsua_med_tp_st t
p_st);
void pjsua_media_prov_clean_up(pjsua_call_id call_id);
/* Callback to receive media events */
pj_status_t call_media_on_event(pjmedia_event *event,
void *user_data);
/** /**
* Init presence. * Init presence.
*/ */
pj_status_t pjsua_pres_init(); pj_status_t pjsua_pres_init();
/* /*
* Start presence subsystem. * Start presence subsystem.
*/ */
pj_status_t pjsua_pres_start(void); pj_status_t pjsua_pres_start(void);
skipping to change at line 569 skipping to change at line 742
pjsip_dialog* on_dlg_forked(pjsip_dialog *first_set, pjsip_rx_data *res); pjsip_dialog* on_dlg_forked(pjsip_dialog *first_set, pjsip_rx_data *res);
pj_status_t acquire_call(const char *title, pj_status_t acquire_call(const char *title,
pjsua_call_id call_id, pjsua_call_id call_id,
pjsua_call **p_call, pjsua_call **p_call,
pjsip_dialog **p_dlg); pjsip_dialog **p_dlg);
const char *good_number(char *buf, pj_int32_t val); const char *good_number(char *buf, pj_int32_t val);
void print_call(const char *title, void print_call(const char *title,
int call_id, int call_id,
char *buf, pj_size_t size); char *buf, pj_size_t size);
/*
* Audio
*/
pj_status_t pjsua_aud_subsys_init(void);
pj_status_t pjsua_aud_subsys_start(void);
pj_status_t pjsua_aud_subsys_destroy(void);
void pjsua_aud_stop_stream(pjsua_call_media *call_med);
pj_status_t pjsua_aud_channel_update(pjsua_call_media *call_med,
pj_pool_t *tmp_pool,
pjmedia_stream_info *si,
const pjmedia_sdp_session *local_sdp,
const pjmedia_sdp_session *remote_sdp);
/*
* Video
*/
pj_status_t pjsua_vid_subsys_init(void);
pj_status_t pjsua_vid_subsys_start(void);
pj_status_t pjsua_vid_subsys_destroy(void);
void pjsua_vid_stop_stream(pjsua_call_media *call_med);
pj_status_t pjsua_vid_channel_init(pjsua_call_media *call_med);
pj_status_t pjsua_vid_channel_update(pjsua_call_media *call_med,
pj_pool_t *tmp_pool,
pjmedia_vid_stream_info *si,
const pjmedia_sdp_session *local_sdp,
const pjmedia_sdp_session *remote_sdp);
#if PJSUA_HAS_VIDEO
PJ_DECL(void) pjsua_vid_win_reset(pjsua_vid_win_id wid);
#else
# define pjsua_vid_win_reset(wid)
#endif
PJ_END_DECL PJ_END_DECL
#endif /* __PJSUA_INTERNAL_H__ */ #endif /* __PJSUA_INTERNAL_H__ */
 End of changes. 27 change blocks. 
60 lines changed or deleted 301 lines changed or added


 pool.h   pool.h 
/* $Id: pool.h 4395 2013-02-27 12:07:30Z ming $ */ /* $Id: pool.h 3553 2011-05-05 06:14:19Z nanang $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 505 skipping to change at line 505
* *
* @return Memory buffer of the specified type. * @return Memory buffer of the specified type.
*/ */
#define PJ_POOL_ZALLOC_T(pool,type) \ #define PJ_POOL_ZALLOC_T(pool,type) \
((type*)pj_pool_zalloc(pool, sizeof(type))) ((type*)pj_pool_zalloc(pool, sizeof(type)))
/* /*
* Internal functions * Internal functions
*/ */
PJ_IDECL(void*) pj_pool_alloc_from_block(pj_pool_block *block, pj_size_t si ze); PJ_IDECL(void*) pj_pool_alloc_from_block(pj_pool_block *block, pj_size_t si ze);
PJ_DECL(void*) pj_pool_allocate_find(pj_pool_t *pool, pj_size_t size); PJ_DECL(void*) pj_pool_allocate_find(pj_pool_t *pool, unsigned size);
/** /**
* @} // PJ_POOL * @} // PJ_POOL
*/ */
/* ************************************************************************ **/ /* ************************************************************************ **/
/** /**
* @defgroup PJ_POOL_FACTORY Pool Factory and Policy * @defgroup PJ_POOL_FACTORY Pool Factory and Policy
* @ingroup PJ_POOL_GROUP * @ingroup PJ_POOL_GROUP
* @brief * @brief
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 pool_i.h   pool_i.h 
/* $Id: pool_i.h 4395 2013-02-27 12:07:30Z ming $ */ /* $Id: pool_i.h 3553 2011-05-05 06:14:19Z nanang $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 48 skipping to change at line 48
PJ_IDEF(void*) pj_pool_alloc_from_block( pj_pool_block *block, pj_size_t si ze ) PJ_IDEF(void*) pj_pool_alloc_from_block( pj_pool_block *block, pj_size_t si ze )
{ {
/* The operation below is valid for size==0. /* The operation below is valid for size==0.
* When size==0, the function will return the pointer to the pool * When size==0, the function will return the pointer to the pool
* memory address, but no memory will be allocated. * memory address, but no memory will be allocated.
*/ */
if (size & (PJ_POOL_ALIGNMENT-1)) { if (size & (PJ_POOL_ALIGNMENT-1)) {
size = (size + PJ_POOL_ALIGNMENT) & ~(PJ_POOL_ALIGNMENT-1); size = (size + PJ_POOL_ALIGNMENT) & ~(PJ_POOL_ALIGNMENT-1);
} }
if ((pj_size_t)(block->end - block->cur) >= size) { if ((unsigned)(block->end - block->cur) >= size) {
void *ptr = block->cur; void *ptr = block->cur;
block->cur += size; block->cur += size;
return ptr; return ptr;
} }
return NULL; return NULL;
} }
PJ_IDEF(void*) pj_pool_alloc( pj_pool_t *pool, pj_size_t size) PJ_IDEF(void*) pj_pool_alloc( pj_pool_t *pool, pj_size_t size)
{ {
void *ptr = pj_pool_alloc_from_block(pool->block_list.next, size); void *ptr = pj_pool_alloc_from_block(pool->block_list.next, size);
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 port.h   port.h 
/* $Id: port.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: port.h 3893 2011-12-01 10:49:07Z ming $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 27 skipping to change at line 27
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A
*/ */
#ifndef __PJMEDIA_PORT_H__ #ifndef __PJMEDIA_PORT_H__
#define __PJMEDIA_PORT_H__ #define __PJMEDIA_PORT_H__
/** /**
* @file port.h * @file port.h
* @brief Port interface declaration * @brief Port interface declaration
*/ */
#include <pjmedia/types.h> #include <pjmedia/clock.h>
#include <pjmedia/event.h>
#include <pjmedia/format.h>
#include <pjmedia/frame.h>
#include <pjmedia/signatures.h>
#include <pj/assert.h> #include <pj/assert.h>
#include <pj/os.h> #include <pj/os.h>
/** /**
@addtogroup PJMEDIA_PORT Media Ports Framework @addtogroup PJMEDIA_PORT Media Ports Framework
@{ @{
@section media_port_intro Media Port Concepts @section media_port_intro Media Port Concepts
@subsection The Media Port @subsection The Media Port
skipping to change at line 181 skipping to change at line 185
@subsection media_port_autom Automating Media Flow @subsection media_port_autom Automating Media Flow
PJMEDIA provides few mechanisms to make media flows automatically PJMEDIA provides few mechanisms to make media flows automatically
among media ports. This concept is described in @ref PJMEDIA_PORT_CLOCK among media ports. This concept is described in @ref PJMEDIA_PORT_CLOCK
section. section.
*/ */
PJ_BEGIN_DECL PJ_BEGIN_DECL
/** /**
* Create 32bit port signature from ASCII characters.
*/
#define PJMEDIA_PORT_SIG(a,b,c,d) PJMEDIA_OBJ_SIG(a,b,c,d)
/**
* Port operation setting. * Port operation setting.
*/ */
typedef enum pjmedia_port_op typedef enum pjmedia_port_op
{ {
/** /**
* No change to the port TX or RX settings. * No change to the port TX or RX settings.
*/ */
PJMEDIA_PORT_NO_CHANGE, PJMEDIA_PORT_NO_CHANGE,
/** /**
skipping to change at line 216 skipping to change at line 225
} pjmedia_port_op; } pjmedia_port_op;
/** /**
* Port info. * Port info.
*/ */
typedef struct pjmedia_port_info typedef struct pjmedia_port_info
{ {
pj_str_t name; /**< Port name. */ pj_str_t name; /**< Port name. */
pj_uint32_t signature; /**< Port signature. */ pj_uint32_t signature; /**< Port signature. */
pjmedia_type type; /**< Media type. pjmedia_dir dir; /**< Port direction.
*/ */
pj_bool_t has_info; /**< Has info? pjmedia_format fmt; /**< Format.
*/ */
pj_bool_t need_info; /**< Need info on connect?
*/
unsigned pt; /**< Payload type (can be dynamic).
*/
pjmedia_format format; /**< Format.
*/
pj_str_t encoding_name; /**< Encoding name.
*/
unsigned clock_rate; /**< Sampling rate.
*/
unsigned channel_count; /**< Number of channels.
*/
unsigned bits_per_sample; /**< Bits/sample
*/
unsigned samples_per_frame; /**< No of samples per frame.
*/
unsigned bytes_per_frame; /**< No of bytes per frame.
*/
} pjmedia_port_info; } pjmedia_port_info;
/** /**
* Utility to retrieve audio clock rate/sampling rate value from
* pjmedia_port_info.
*
* @param pia Pointer to port info containing audio format.
* @return Audio clock rate.
*/
PJ_INLINE(unsigned) PJMEDIA_PIA_SRATE(const pjmedia_port_info *pia)
{
pj_assert(pia->fmt.type==PJMEDIA_TYPE_AUDIO &&
pia->fmt.detail_type==PJMEDIA_FORMAT_DETAIL_AUDIO);
return pia->fmt.det.aud.clock_rate;
}
/**
* Utility to retrieve audio channel count value from pjmedia_port_info.
*
* @param pia Pointer to port info containing audio format.
* @return Audio channel count.
*/
PJ_INLINE(unsigned) PJMEDIA_PIA_CCNT(const pjmedia_port_info *pia)
{
pj_assert(pia->fmt.type==PJMEDIA_TYPE_AUDIO &&
pia->fmt.detail_type==PJMEDIA_FORMAT_DETAIL_AUDIO);
return pia->fmt.det.aud.channel_count;
}
/**
* Utility to retrieve audio bits per sample value from pjmedia_port_info.
*
* @param pia Pointer to port info containing audio format.
* @return Number of bits per sample.
*/
PJ_INLINE(unsigned) PJMEDIA_PIA_BITS(const pjmedia_port_info *pia)
{
pj_assert(pia->fmt.type==PJMEDIA_TYPE_AUDIO &&
pia->fmt.detail_type==PJMEDIA_FORMAT_DETAIL_AUDIO);
return pia->fmt.det.aud.bits_per_sample;
}
/**
* Utility to retrieve audio frame interval (ptime) value from
* pjmedia_port_info.
*
* @param pia Pointer to port info containing audio format.
* @return Frame interval in msec.
*/
PJ_INLINE(unsigned) PJMEDIA_PIA_PTIME(const pjmedia_port_info *pia)
{
pj_assert(pia->fmt.type==PJMEDIA_TYPE_AUDIO &&
pia->fmt.detail_type==PJMEDIA_FORMAT_DETAIL_AUDIO);
return pia->fmt.det.aud.frame_time_usec / 1000;
}
/**
* This is a utility routine to retrieve the audio samples_per_frame value
* from port info.
*
* @param pia Pointer to port info containing audio format.
* @return Samples per frame value.
*/
PJ_INLINE(unsigned) PJMEDIA_PIA_SPF(const pjmedia_port_info *pia)
{
pj_assert(pia->fmt.type==PJMEDIA_TYPE_AUDIO &&
pia->fmt.detail_type==PJMEDIA_FORMAT_DETAIL_AUDIO);
return PJMEDIA_AFD_SPF(&pia->fmt.det.aud);
}
/**
* This is a utility routine to retrieve the average bitrate value
* from port info.
*
* @param pia Pointer to port info containing audio format.
* @return Bitrate, in bits per second.
*/
PJ_INLINE(unsigned) PJMEDIA_PIA_AVG_BPS(const pjmedia_port_info *pia)
{
pj_assert(pia->fmt.type==PJMEDIA_TYPE_AUDIO &&
pia->fmt.detail_type==PJMEDIA_FORMAT_DETAIL_AUDIO);
return pia->fmt.det.aud.avg_bps;
}
/**
* This is a utility routine to retrieve the maximum bitrate value
* from port info.
*
* @param pia Pointer to port info containing audio format.
* @return Bitrate, in bits per second.
*/
PJ_INLINE(unsigned) PJMEDIA_PIA_MAX_BPS(const pjmedia_port_info *pia)
{
pj_assert(pia->fmt.type==PJMEDIA_TYPE_AUDIO &&
pia->fmt.detail_type==PJMEDIA_FORMAT_DETAIL_AUDIO);
return pia->fmt.det.aud.max_bps;
}
/**
* This is a utility routine to retrieve the average audio frame size value
* from pjmedia_port_info.
*
* @param pia Pointer to port info containing audio format.
* @return Frame size in bytes.
*/
PJ_INLINE(unsigned) PJMEDIA_PIA_AVG_FSZ(const pjmedia_port_info *pia)
{
pj_assert(pia->fmt.type==PJMEDIA_TYPE_AUDIO &&
pia->fmt.detail_type==PJMEDIA_FORMAT_DETAIL_AUDIO);
return PJMEDIA_AFD_AVG_FSZ(&pia->fmt.det.aud);
}
/**
* Utility to retrieve audio frame size from maximum bitrate from
* pjmedia_port_info.
*
* @param pia Pointer to port info containing audio format.
* @return Frame size in bytes.
*/
PJ_INLINE(unsigned) PJMEDIA_PIA_MAX_FSZ(const pjmedia_port_info *pia)
{
pj_assert(pia->fmt.type==PJMEDIA_TYPE_AUDIO &&
pia->fmt.detail_type==PJMEDIA_FORMAT_DETAIL_AUDIO);
return PJMEDIA_AFD_MAX_FSZ(&pia->fmt.det.aud);
}
/**
* Port interface. * Port interface.
*/ */
typedef struct pjmedia_port typedef struct pjmedia_port
{ {
pjmedia_port_info info; /**< Port information. */ pjmedia_port_info info; /**< Port information. */
/** Port data can be used by the port creator to attach arbitrary /** Port data can be used by the port creator to attach arbitrary
* value to be associated with the port. * value to be associated with the port.
*/ */
struct port_data { struct port_data {
void *pdata; /**< Pointer data. */ void *pdata; /**< Pointer data. */
long ldata; /**< Long data. */ long ldata; /**< Long data. */
} port_data; } port_data;
/** /**
* Get clock source.
* This should only be called by #pjmedia_port_get_clock_src().
*/
pjmedia_clock_src* (*get_clock_src)(struct pjmedia_port *this_port,
pjmedia_dir dir);
/**
* Sink interface. * Sink interface.
* This should only be called by #pjmedia_port_put_frame(). * This should only be called by #pjmedia_port_put_frame().
*/ */
pj_status_t (*put_frame)(struct pjmedia_port *this_port, pj_status_t (*put_frame)(struct pjmedia_port *this_port,
const pjmedia_frame *frame); pjmedia_frame *frame);
/** /**
* Source interface. * Source interface.
* This should only be called by #pjmedia_port_get_frame(). * This should only be called by #pjmedia_port_get_frame().
*/ */
pj_status_t (*get_frame)(struct pjmedia_port *this_port, pj_status_t (*get_frame)(struct pjmedia_port *this_port,
pjmedia_frame *frame); pjmedia_frame *frame);
/** /**
* Called to destroy this port. * Called to destroy this port.
skipping to change at line 288 skipping to change at line 419
*/ */
PJ_DECL(pj_status_t) pjmedia_port_info_init( pjmedia_port_info *info, PJ_DECL(pj_status_t) pjmedia_port_info_init( pjmedia_port_info *info,
const pj_str_t *name, const pj_str_t *name,
unsigned signature, unsigned signature,
unsigned clock_rate, unsigned clock_rate,
unsigned channel_count, unsigned channel_count,
unsigned bits_per_sample, unsigned bits_per_sample,
unsigned samples_per_frame); unsigned samples_per_frame);
/** /**
* This is an auxiliary function to initialize port info for
* ports which deal with PCM audio.
*
* @param info The port info to be initialized.
* @param name Port name.
* @param signature Port signature.
* @param dir Port's direction.
* @param fmt Port's media format.
*
* @return PJ_SUCCESS on success.
*/
PJ_DECL(pj_status_t) pjmedia_port_info_init2(pjmedia_port_info *info,
const pj_str_t *name,
unsigned signature,
pjmedia_dir dir,
const pjmedia_format *fmt);
/**
* Get a clock source from the port.
*
* @param port The media port.
* @param dir Media port's direction.
*
* @return The clock source or NULL if clock source is not present
* in the port.
*/
PJ_DECL(pjmedia_clock_src *) pjmedia_port_get_clock_src( pjmedia_port *port
,
pjmedia_dir dir );
/**
* Get a frame from the port (and subsequent downstream ports). * Get a frame from the port (and subsequent downstream ports).
* *
* @param port The media port. * @param port The media port.
* @param frame Frame to store samples. * @param frame Frame to store samples.
* *
* @return PJ_SUCCESS on success, or the appropriate error code. * @return PJ_SUCCESS on success, or the appropriate error code.
*/ */
PJ_DECL(pj_status_t) pjmedia_port_get_frame( pjmedia_port *port, PJ_DECL(pj_status_t) pjmedia_port_get_frame( pjmedia_port *port,
pjmedia_frame *frame ); pjmedia_frame *frame );
/** /**
* Put a frame to the port (and subsequent downstream ports). * Put a frame to the port (and subsequent downstream ports).
* *
* @param port The media port. * @param port The media port.
* @param frame Frame to the put to the port. * @param frame Frame to the put to the port.
* *
* @return PJ_SUCCESS on success, or the appropriate error code. * @return PJ_SUCCESS on success, or the appropriate error code.
*/ */
PJ_DECL(pj_status_t) pjmedia_port_put_frame( pjmedia_port *port, PJ_DECL(pj_status_t) pjmedia_port_put_frame( pjmedia_port *port,
const pjmedia_frame *frame ); pjmedia_frame *frame );
/** /**
* Destroy port (and subsequent downstream ports) * Destroy port (and subsequent downstream ports)
* *
* @param port The media port. * @param port The media port.
* *
* @return PJ_SUCCESS on success, or the appropriate error code. * @return PJ_SUCCESS on success, or the appropriate error code.
*/ */
PJ_DECL(pj_status_t) pjmedia_port_destroy( pjmedia_port *port ); PJ_DECL(pj_status_t) pjmedia_port_destroy( pjmedia_port *port );
 End of changes. 9 change blocks. 
26 lines changed or deleted 179 lines changed or added


 rtcp.h   rtcp.h 
/* $Id: rtcp.h 3960 2012-02-27 14:41:21Z nanang $ */ /* $Id: rtcp.h 3999 2012-03-30 07:10:13Z bennylp $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 rtcp_xr.h   rtcp_xr.h 
/* $Id: rtcp_xr.h 3969 2012-03-08 08:34:30Z nanang $ */ /* $Id: rtcp_xr.h 3999 2012-03-30 07:10:13Z bennylp $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 sdp.h   sdp.h 
/* $Id: sdp.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: sdp.h 3945 2012-01-27 09:12:59Z nanang $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 28 skipping to change at line 28
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A
*/ */
#ifndef __PJMEDIA_SDP_H__ #ifndef __PJMEDIA_SDP_H__
#define __PJMEDIA_SDP_H__ #define __PJMEDIA_SDP_H__
/** /**
* @file sdp.h * @file sdp.h
* @brief SDP header file. * @brief SDP header file.
*/ */
#include <pjmedia/types.h> #include <pjmedia/types.h>
#include <pj/sock.h>
/** /**
* @defgroup PJMEDIA_SDP SDP Parsing and Data Structure * @defgroup PJMEDIA_SDP SDP Parsing and Data Structure
* @ingroup PJMEDIA_SESSION * @ingroup PJMEDIA_SESSION
* @brief SDP data structure representation and parsing * @brief SDP data structure representation and parsing
* @{ * @{
* *
* The basic SDP session descriptor and elements are described in header * The basic SDP session descriptor and elements are described in header
* file <b><pjmedia/sdp.h></b>. This file contains declaration for * file <b><pjmedia/sdp.h></b>. This file contains declaration for
* SDP session descriptor and SDP media descriptor, along with their * SDP session descriptor and SDP media descriptor, along with their
skipping to change at line 269 skipping to change at line 270
* @return PJ_SUCCESS on success. * @return PJ_SUCCESS on success.
*/ */
PJ_DECL(pj_status_t) PJ_DECL(pj_status_t)
pjmedia_sdp_rtpmap_to_attr( pj_pool_t *pool, pjmedia_sdp_rtpmap_to_attr( pj_pool_t *pool,
const pjmedia_sdp_rtpmap *rtpmap, const pjmedia_sdp_rtpmap *rtpmap,
pjmedia_sdp_attr **p_attr); pjmedia_sdp_attr **p_attr);
/** /**
* This structure describes SDP \a fmtp attribute. * This structure describes SDP \a fmtp attribute.
*/ */
struct pjmedia_sdp_fmtp typedef struct pjmedia_sdp_fmtp
{ {
pj_str_t fmt; /**< Format type. */ pj_str_t fmt; /**< Format type. */
pj_str_t fmt_param; /**< Format specific parameter. */ pj_str_t fmt_param; /**< Format specific parameter. */
}; } pjmedia_sdp_fmtp;
/**
* @see pjmedia_sdp_fmtp
*/
typedef struct pjmedia_sdp_fmtp pjmedia_sdp_fmtp;
/** /**
* Get the fmtp representation of the same SDP attribute. * Get the fmtp representation of the same SDP attribute.
* *
* @param attr Generic attribute to be converted to fmtp, which * @param attr Generic attribute to be converted to fmtp, which
* name must be "fmtp". * name must be "fmtp".
* @param fmtp SDP fmtp attribute to be initialized. * @param fmtp SDP fmtp attribute to be initialized.
* *
* @return PJ_SUCCESS on success. * @return PJ_SUCCESS on success.
*/ */
skipping to change at line 357 skipping to change at line 353
* Clone connection info. * Clone connection info.
* *
* @param pool Pool to allocate memory for the new connection info. * @param pool Pool to allocate memory for the new connection info.
* @param rhs The connection into to clone. * @param rhs The connection into to clone.
* *
* @return The new connection info. * @return The new connection info.
*/ */
PJ_DECL(pjmedia_sdp_conn*) pjmedia_sdp_conn_clone(pj_pool_t *pool, PJ_DECL(pjmedia_sdp_conn*) pjmedia_sdp_conn_clone(pj_pool_t *pool,
const pjmedia_sdp_conn *rh s); const pjmedia_sdp_conn *rh s);
/**
* Compare connection info.
*
* @param conn1 The first connection info to compare.
* @param conn1 The second connection info to compare.
* @param option Comparison option, which should be zero for now.
*
* @return PJ_SUCCESS when both connection info are equal, otherwis
e
* returns PJMEDIA_SDP_ECONNNOTEQUAL.
*/
PJ_DECL(pj_status_t) pjmedia_sdp_conn_cmp(const pjmedia_sdp_conn *conn1,
const pjmedia_sdp_conn *conn2,
unsigned option);
/* ************************************************************************ ** /* ************************************************************************ **
* SDP BANDWIDTH INFO * SDP BANDWIDTH INFO
************************************************************************** ** ************************************************************************** **
*/ */
/** /**
* This structure describes SDP bandwidth info ("b=" line). * This structure describes SDP bandwidth info ("b=" line).
*/ */
typedef struct pjmedia_sdp_bandw typedef struct pjmedia_sdp_bandw
{ {
skipping to change at line 576 skipping to change at line 586
struct struct
{ {
pj_str_t user; /**< User */ pj_str_t user; /**< User */
pj_uint32_t id; /**< Session ID */ pj_uint32_t id; /**< Session ID */
pj_uint32_t version; /**< Session version */ pj_uint32_t version; /**< Session version */
pj_str_t net_type; /**< Network type ("IN") */ pj_str_t net_type; /**< Network type ("IN") */
pj_str_t addr_type; /**< Address type ("IP4", "IP6") */ pj_str_t addr_type; /**< Address type ("IP4", "IP6") */
pj_str_t addr; /**< The address. */ pj_str_t addr; /**< The address. */
} origin; } origin;
pj_str_t name; /**< Subject line (s=) */ pj_str_t name; /**< Subject line (s=) */
pjmedia_sdp_conn *conn; /**< Connection line (c=) */ pjmedia_sdp_conn *conn; /**< Connection line (c=) */
unsigned bandw_count; /**< Number of bandwidth info (b=) */
pjmedia_sdp_bandw *bandw[PJMEDIA_MAX_SDP_BANDW];
/**< Bandwidth info array (b=) */
/** Session time (t= line) */ /** Session time (t= line) */
struct struct
{ {
pj_uint32_t start; /**< Start time. */ pj_uint32_t start; /**< Start time. */
pj_uint32_t stop; /**< Stop time. */ pj_uint32_t stop; /**< Stop time. */
} time; } time;
unsigned attr_count; /**< Number of attributes. */ unsigned attr_count; /**< Number of attributes. */
pjmedia_sdp_attr *attr[PJMEDIA_MAX_SDP_ATTR]; /**< Attributes array. */ pjmedia_sdp_attr *attr[PJMEDIA_MAX_SDP_ATTR]; /**< Attributes array. */
 End of changes. 6 change blocks. 
10 lines changed or deleted 24 lines changed or added


 sdp_neg.h   sdp_neg.h 
/* $Id: sdp_neg.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: sdp_neg.h 3664 2011-07-19 03:42:28Z nanang $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 649 skipping to change at line 649
* @param allow_asym Should be zero. * @param allow_asym Should be zero.
* *
* @return PJ_SUCCESS when there is at least one media * @return PJ_SUCCESS when there is at least one media
* is actuve common in both offer and answer, or * is actuve common in both offer and answer, or
* failure code when negotiation has failed. * failure code when negotiation has failed.
*/ */
PJ_DECL(pj_status_t) pjmedia_sdp_neg_negotiate( pj_pool_t *pool, PJ_DECL(pj_status_t) pjmedia_sdp_neg_negotiate( pj_pool_t *pool,
pjmedia_sdp_neg *neg, pjmedia_sdp_neg *neg,
pj_bool_t allow_asym); pj_bool_t allow_asym);
/**
* Enumeration of customized SDP format matching option flags. See
* #pjmedia_sdp_neg_register_fmt_match_cb() for more info.
*/
typedef enum pjmedia_sdp_neg_fmt_match_flag
{
/**
* In generating answer, the SDP fmtp in the answer candidate may need
* to be modified by the customized SDP format matching callback to
* achieve flexible SDP negotiation, e.g: AMR fmtp 'octet-align' field
* can be adjusted with the offer when the codec implementation support
* both packetization modes octet-aligned and bandwidth-efficient.
*/
PJMEDIA_SDP_NEG_FMT_MATCH_ALLOW_MODIFY_ANSWER = 1,
} pjmedia_sdp_neg_fmt_match_flag;
/**
* The declaration of customized SDP format matching callback. See
* #pjmedia_sdp_neg_register_fmt_match_cb() for more info.
*
* @param pool The memory pool.
* @param offer The SDP media offer.
* @param o_fmt_idx Index of the format in the SDP media offer.
* @param answer The SDP media answer.
* @param a_fmt_idx Index of the format in the SDP media answer.
* @param option The format matching option, see
* #pjmedia_sdp_neg_fmt_match_flag.
*
* @return PJ_SUCCESS when the formats in offer and answer matc
h.
*/
typedef pj_status_t (*pjmedia_sdp_neg_fmt_match_cb)(pj_pool_t *pool,
pjmedia_sdp_media *offer
,
unsigned o_fmt_idx,
pjmedia_sdp_media *answe
r,
unsigned a_fmt_idx,
unsigned option);
/**
* Register customized SDP format matching callback function for the specif
ied
* format. The customized SDP format matching is needed when the format
* identification in a media stream session cannot be simply determined by
* encoding name and clock rate, but also involves one or more format speci
fic
* parameters, which are specified in SDP fmtp attribute. For example,
* an H.264 video stream is also identified by profile, level, and
* packetization-mode parameters. As those parameters are format specifics,
* the negotiation must be done by the format or codec implementation.
*
* To unregister the callback of specific format, just call this function w
ith
* parameter #cb set to NULL.
*
* @param fmt_name The format name, e.g: "H.264", "AMR", "G7221". Note
* that the string buffer must remain valid until the
* callback is unregistered.
* @param cb The customized SDP format negotiation callback or
* NULL to unregister the specified format callback.
*
* @return PJ_SUCCESS on success.
*/
PJ_DECL(pj_status_t) pjmedia_sdp_neg_register_fmt_match_cb(
const pj_str_t *fmt_name,
pjmedia_sdp_neg_fmt_match_cb cb);
/**
* Match format in the SDP media offer and answer. The matching mechanism
* will be done by comparing the encoding name and clock rate, and if the
* custom format matching callback for the specified format is registered,
* see #pjmedia_sdp_neg_register_fmt_match_cb(), it will be called for more
* detail verification, e.g: format parameters specified in SDP fmtp.
*
* @param pool The memory pool.
* @param offer The SDP media offer.
* @param o_fmt_idx Index of the format in the SDP media offer.
* @param answer The SDP media answer.
* @param a_fmt_idx Index of the format in the SDP media answer.
* @param option The format matching option, see
* #pjmedia_sdp_neg_fmt_match_flag.
*
* @return PJ_SUCCESS when the formats in offer and answer matc
h.
*/
PJ_DECL(pj_status_t) pjmedia_sdp_neg_fmt_match( pj_pool_t *pool,
pjmedia_sdp_media *offer,
unsigned o_fmt_idx,
pjmedia_sdp_media *answer,
unsigned a_fmt_idx,
unsigned option);
PJ_END_DECL PJ_END_DECL
/** /**
* @} * @}
*/ */
#endif /* __PJMEDIA_SDP_NEG_H__ */ #endif /* __PJMEDIA_SDP_NEG_H__ */
 End of changes. 2 change blocks. 
1 lines changed or deleted 95 lines changed or added


 session.h   session.h 
/* $Id: session.h 3571 2011-05-19 08:05:23Z ming $ */ /* $Id: session.h 3841 2011-10-24 09:28:13Z ming $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 sip_config.h   sip_config.h 
/* $Id: sip_config.h 4091 2012-04-26 09:20:07Z bennylp $ */ /* $Id: sip_config.h 4094 2012-04-26 09:31:00Z bennylp $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 sip_endpoint.h   sip_endpoint.h 
/* $Id: sip_endpoint.h 3988 2012-03-28 07:32:42Z nanang $ */ /* $Id: sip_endpoint.h 3999 2012-03-30 07:10:13Z bennylp $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 sip_inv.h   sip_inv.h 
/* $Id: sip_inv.h 3598 2011-06-24 07:35:28Z bennylp $ */ /* $Id: sip_inv.h 3841 2011-10-24 09:28:13Z ming $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 538 skipping to change at line 538
*/ */
PJ_DECL(pj_status_t) pjsip_inv_verify_request2( pjsip_rx_data *rdata, PJ_DECL(pj_status_t) pjsip_inv_verify_request2( pjsip_rx_data *rdata,
unsigned *options, unsigned *options,
const pjmedia_sdp_session *o ffer, const pjmedia_sdp_session *o ffer,
const pjmedia_sdp_session *a nswer, const pjmedia_sdp_session *a nswer,
pjsip_dialog *dlg, pjsip_dialog *dlg,
pjsip_endpoint *endpt, pjsip_endpoint *endpt,
pjsip_tx_data **tdata); pjsip_tx_data **tdata);
/** /**
* Variant of #pjsip_inv_verify_request() which allows application not to
* specify the rdata (i.e. pass NULL as the rdata parameter) and specify
* the parsed SDP in the \a offer argument and a temporary pool in the
* \a tmp_pool argument.
* This is useful if application no longer has access to the rdata.
*
* @see pjsip_inv_verify_request()
*/
PJ_DECL(pj_status_t) pjsip_inv_verify_request3( pjsip_rx_data *rdata,
pj_pool_t *tmp_pool,
unsigned *options,
const pjmedia_sdp_session *o
ffer,
const pjmedia_sdp_session *a
nswer,
pjsip_dialog *dlg,
pjsip_endpoint *endpt,
pjsip_tx_data **tdata);
/**
* Create UAS invite session for the specified dialog in dlg. Application * Create UAS invite session for the specified dialog in dlg. Application
* SHOULD call the verification function before calling this function, * SHOULD call the verification function before calling this function,
* to ensure that it can create the session successfully. * to ensure that it can create the session successfully.
* *
* @param dlg The dialog to be used. * @param dlg The dialog to be used.
* @param rdata Application MUST specify the received INVITE request * @param rdata Application MUST specify the received INVITE request
* in rdata. The invite session needs to inspect the * in rdata. The invite session needs to inspect the
* received request to see if the request contains * received request to see if the request contains
* features that it supports. * features that it supports.
* @param local_sdp If application has determined its media capability, * @param local_sdp If application has determined its media capability,
skipping to change at line 698 skipping to change at line 716
* @return PJ_SUCCESS if response message was created * @return PJ_SUCCESS if response message was created
* successfully. * successfully.
*/ */
PJ_DECL(pj_status_t) pjsip_inv_answer( pjsip_inv_session *inv, PJ_DECL(pj_status_t) pjsip_inv_answer( pjsip_inv_session *inv,
int st_code, int st_code,
const pj_str_t *st_text, const pj_str_t *st_text,
const pjmedia_sdp_session *local_sdp , const pjmedia_sdp_session *local_sdp ,
pjsip_tx_data **p_tdata ); pjsip_tx_data **p_tdata );
/** /**
* Set local offer or answer depending on negotiator state (it may also
* create a negotiator if it doesn't exist yet).
*
* @param inv The invite session.
* @param sdp The SDP description which will be set as
* an offer/answer to remote.
*
* @return PJ_SUCCESS if local offer/answer can be accepted by
* SDP negotiator.
*/
PJ_DECL(pj_status_t) pjsip_inv_set_local_sdp(pjsip_inv_session *inv,
const pjmedia_sdp_session *sdp
);
/**
* Set local answer to respond to remote SDP offer, to be carried by * Set local answer to respond to remote SDP offer, to be carried by
* subsequent response (or request). * subsequent response (or request).
* *
* @param inv The invite session. * @param inv The invite session.
* @param sdp The SDP description which will be set as answer * @param sdp The SDP description which will be set as answer
* to remote. * to remote.
* *
* @return PJ_SUCCESS if local answer can be accepted by * @return PJ_SUCCESS if local answer can be accepted by
* SDP negotiator. * SDP negotiator.
*/ */
 End of changes. 3 change blocks. 
1 lines changed or deleted 36 lines changed or added


 sip_regc.h   sip_regc.h 
/* $Id: sip_regc.h 4037 2012-04-11 09:41:25Z bennylp $ */ /* $Id: sip_regc.h 4038 2012-04-11 10:01:00Z bennylp $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 sip_transport.h   sip_transport.h 
/* $Id: sip_transport.h 3954 2012-02-18 02:12:22Z bennylp $ */ /* $Id: sip_transport.h 3999 2012-03-30 07:10:13Z bennylp $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 sip_transport_tls.h   sip_transport_tls.h 
/* $Id: sip_transport_tls.h 3943 2012-01-17 07:02:14Z nanang $ */ /* $Id: sip_transport_tls.h 3999 2012-03-30 07:10:13Z bennylp $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 sip_uri.h   sip_uri.h 
/* $Id: sip_uri.h 4404 2013-02-27 14:47:37Z riza $ */ /* $Id: sip_uri.h 3553 2011-05-05 06:14:19Z nanang $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 225 skipping to change at line 225
/** /**
* The declaration of 'base class' for all URI scheme. * The declaration of 'base class' for all URI scheme.
*/ */
struct pjsip_uri struct pjsip_uri
{ {
/** All URIs must have URI virtual function table as their first member . */ /** All URIs must have URI virtual function table as their first member . */
pjsip_uri_vptr *vptr; pjsip_uri_vptr *vptr;
}; };
/** /**
* This macro checks that the URL is a "sip:" URL. * This macro checks that the URL is a "sip:" or "sips:" URL.
* @param url The URL (pointer to) * @param url The URL (pointer to)
* @return non-zero if TRUE. * @return non-zero if TRUE.
*/ */
#define PJSIP_URI_SCHEME_IS_SIP(url) \ #define PJSIP_URI_SCHEME_IS_SIP(url) \
(pj_stricmp2(pjsip_uri_get_scheme(url), "sip")==0) (pj_strnicmp2(pjsip_uri_get_scheme(url), "sip", 3)==0)
/** /**
* This macro checks that the URL is a "sips:" URL (not SIP). * This macro checks that the URL is a "sips:" URL (not SIP).
* @param url The URL (pointer to) * @param url The URL (pointer to)
* @return non-zero if TRUE. * @return non-zero if TRUE.
*/ */
#define PJSIP_URI_SCHEME_IS_SIPS(url) \ #define PJSIP_URI_SCHEME_IS_SIPS(url) \
(pj_stricmp2(pjsip_uri_get_scheme(url), "sips")==0) (pj_strnicmp2(pjsip_uri_get_scheme(url), "sips", 4)==0)
/** /**
* This macro checks that the URL is a "tel:" URL. * This macro checks that the URL is a "tel:" URL.
* @param url The URL (pointer to) * @param url The URL (pointer to)
* @return non-zero if TRUE. * @return non-zero if TRUE.
*/ */
#define PJSIP_URI_SCHEME_IS_TEL(url) \ #define PJSIP_URI_SCHEME_IS_TEL(url) \
(pj_stricmp2(pjsip_uri_get_scheme(url), "tel")==0) (pj_strnicmp2(pjsip_uri_get_scheme(url), "tel", 3)==0)
/** /**
* Generic function to get the URI scheme. * Generic function to get the URI scheme.
* @param uri the URI object. * @param uri the URI object.
* @return the URI scheme. * @return the URI scheme.
*/ */
PJ_INLINE(const pj_str_t*) pjsip_uri_get_scheme(const void *uri) PJ_INLINE(const pj_str_t*) pjsip_uri_get_scheme(const void *uri)
{ {
return (*((pjsip_uri*)uri)->vptr->p_get_scheme)(uri); return (*((pjsip_uri*)uri)->vptr->p_get_scheme)(uri);
} }
 End of changes. 5 change blocks. 
5 lines changed or deleted 5 lines changed or added


 sock.h   sock.h 
/* $Id: sock.h 3741 2011-08-30 01:45:07Z bennylp $ */ /* $Id: sock.h 3841 2011-10-24 09:28:13Z ming $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 sound_port.h   sound_port.h 
/* $Id: sound_port.h 4065 2012-04-21 02:17:07Z bennylp $ */ /* $Id: sound_port.h 4082 2012-04-24 13:09:14Z bennylp $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 28 skipping to change at line 28
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A
*/ */
#ifndef __PJMEDIA_SOUND_PORT_H__ #ifndef __PJMEDIA_SOUND_PORT_H__
#define __PJMEDIA_SOUND_PORT_H__ #define __PJMEDIA_SOUND_PORT_H__
/** /**
* @file sound_port.h * @file sound_port.h
* @brief Media port connection abstraction to sound device. * @brief Media port connection abstraction to sound device.
*/ */
#include <pjmedia-audiodev/audiodev.h> #include <pjmedia-audiodev/audiodev.h>
#include <pjmedia/clock.h>
#include <pjmedia/port.h> #include <pjmedia/port.h>
PJ_BEGIN_DECL PJ_BEGIN_DECL
/** /**
* @defgroup PJMED_SND_PORT Sound Device Port * @defgroup PJMED_SND_PORT Sound Device Port
* @ingroup PJMEDIA_PORT_CLOCK * @ingroup PJMEDIA_PORT_CLOCK
* @brief Media Port Connection Abstraction to the Sound Device * @brief Media Port Connection Abstraction to the Sound Device
@{ @{
skipping to change at line 280 skipping to change at line 281
* *
* @param snd_port The sound device port. * @param snd_port The sound device port.
* @param p_length Pointer to receive the tail length. * @param p_length Pointer to receive the tail length.
* *
* @return PJ_SUCCESS on success. * @return PJ_SUCCESS on success.
*/ */
PJ_DECL(pj_status_t) pjmedia_snd_port_get_ec_tail(pjmedia_snd_port *snd_por t, PJ_DECL(pj_status_t) pjmedia_snd_port_get_ec_tail(pjmedia_snd_port *snd_por t,
unsigned *p_length); unsigned *p_length);
/** /**
* Get a clock source from the sound port.
*
* @param snd_port The sound port.
* @param dir Sound port's direction.
*
* @return The clock source.
*/
PJ_DECL(pjmedia_clock_src *)
pjmedia_snd_port_get_clock_src( pjmedia_snd_port *snd_port,
pjmedia_dir dir );
/**
* Connect a port to the sound device port. If the sound device port has a * Connect a port to the sound device port. If the sound device port has a
* sound recorder device, then this will start periodic function call to * sound recorder device, then this will start periodic function call to
* the port's put_frame() function. If the sound device has a sound player * the port's put_frame() function. If the sound device has a sound player
* device, then this will start periodic function call to the port's * device, then this will start periodic function call to the port's
* get_frame() function. * get_frame() function.
* *
* For this version of PJMEDIA, the media port MUST have the same audio * For this version of PJMEDIA, the media port MUST have the same audio
* settings as the sound device port, or otherwise the connection will * settings as the sound device port, or otherwise the connection will
* fail. This means the port MUST have the same clock_rate, channel count, * fail. This means the port MUST have the same clock_rate, channel count,
* samples per frame, and bits per sample as the sound device port. * samples per frame, and bits per sample as the sound device port.
 End of changes. 3 change blocks. 
1 lines changed or deleted 14 lines changed or added


 ssl_sock.h   ssl_sock.h 
/* $Id: ssl_sock.h 4376 2013-02-27 09:41:37Z nanang $ */ /* $Id: ssl_sock.h 3999 2012-03-30 07:10:13Z bennylp $ */
/* /*
* Copyright (C) 2009-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2009-2011 Teluu Inc. (http://www.teluu.com)
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
skipping to change at line 529 skipping to change at line 529
/** /**
* Describes active remote certificate info. * Describes active remote certificate info.
*/ */
pj_ssl_cert_info *remote_cert_info; pj_ssl_cert_info *remote_cert_info;
/** /**
* Status of peer certificate verification. * Status of peer certificate verification.
*/ */
pj_uint32_t verify_status; pj_uint32_t verify_status;
/**
* Last native error returned by the backend.
*/
unsigned long last_native_err;
} pj_ssl_sock_info; } pj_ssl_sock_info;
/** /**
* Definition of secure socket creation parameters. * Definition of secure socket creation parameters.
*/ */
typedef struct pj_ssl_sock_param typedef struct pj_ssl_sock_param
{ {
/** /**
* Specifies socket address family, either pj_AF_INET() and pj_AF_INET6 (). * Specifies socket address family, either pj_AF_INET() and pj_AF_INET6 ().
* *
 End of changes. 2 change blocks. 
6 lines changed or deleted 1 lines changed or added


 stream.h   stream.h 
/* $Id: stream.h 3571 2011-05-19 08:05:23Z ming $ */ /* $Id: stream.h 3841 2011-10-24 09:28:13Z ming $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 34 skipping to change at line 34
* @file stream.h * @file stream.h
* @brief Media Stream. * @brief Media Stream.
*/ */
#include <pjmedia/codec.h> #include <pjmedia/codec.h>
#include <pjmedia/endpoint.h> #include <pjmedia/endpoint.h>
#include <pjmedia/jbuf.h> #include <pjmedia/jbuf.h>
#include <pjmedia/port.h> #include <pjmedia/port.h>
#include <pjmedia/rtcp.h> #include <pjmedia/rtcp.h>
#include <pjmedia/transport.h> #include <pjmedia/transport.h>
#include <pjmedia/vid_codec.h>
#include <pj/sock.h> #include <pj/sock.h>
PJ_BEGIN_DECL PJ_BEGIN_DECL
/** /**
* @defgroup PJMED_STRM Streams * @defgroup PJMED_STRM Streams
* @ingroup PJMEDIA_PORT * @ingroup PJMEDIA_PORT
* @brief Communicating with remote peer via the network * @brief Communicating with remote peer via the network
* @{ * @{
* *
skipping to change at line 88 skipping to change at line 89
* Media channel is unidirectional flow of media from sender to * Media channel is unidirectional flow of media from sender to
* receiver. * receiver.
*/ */
typedef struct pjmedia_channel pjmedia_channel; typedef struct pjmedia_channel pjmedia_channel;
/** /**
* This structure describes media stream information. Each media stream * This structure describes media stream information. Each media stream
* corresponds to one "m=" line in SDP session descriptor, and it has * corresponds to one "m=" line in SDP session descriptor, and it has
* its own RTP/RTCP socket pair. * its own RTP/RTCP socket pair.
*/ */
struct pjmedia_stream_info typedef struct pjmedia_stream_info
{ {
pjmedia_type type; /**< Media type (audio, video) */ pjmedia_type type; /**< Media type (audio, video) */
pjmedia_tp_proto proto; /**< Transport protocol (RTP/AVP, etc.) */ pjmedia_tp_proto proto; /**< Transport protocol (RTP/AVP, etc.) */
pjmedia_dir dir; /**< Media direction. */ pjmedia_dir dir; /**< Media direction. */
pj_sockaddr rem_addr; /**< Remote RTP address */ pj_sockaddr rem_addr; /**< Remote RTP address */
pj_sockaddr rem_rtcp; /**< Optional remote RTCP addres s. If pj_sockaddr rem_rtcp; /**< Optional remote RTCP addres s. If
sin_family is zero, the RTP address sin_family is zero, the RTP address
will be calculated from RTP. */ will be calculated from RTP. */
#if defined(PJMEDIA_HAS_RTCP_XR) && (PJMEDIA_HAS_RTCP_XR != 0) #if defined(PJMEDIA_HAS_RTCP_XR) && (PJMEDIA_HAS_RTCP_XR != 0)
pj_bool_t rtcp_xr_enabled; pj_bool_t rtcp_xr_enabled;
skipping to change at line 110 skipping to change at line 111
pj_uint32_t rtcp_xr_interval; /**< RTCP XR interval. */ pj_uint32_t rtcp_xr_interval; /**< RTCP XR interval. */
pj_sockaddr rtcp_xr_dest;/**<Additional remote RTCP XR a ddress. pj_sockaddr rtcp_xr_dest;/**<Additional remote RTCP XR a ddress.
This is useful for third-party (e.g : This is useful for third-party (e.g :
network monitor) to monitor the network monitor) to monitor the
stream. If sin_family is zero, stream. If sin_family is zero,
this will be ignored. */ this will be ignored. */
#endif #endif
pjmedia_codec_info fmt; /**< Incoming codec format info. */ pjmedia_codec_info fmt; /**< Incoming codec format info. */
pjmedia_codec_param *param; /**< Optional codec param. */ pjmedia_codec_param *param; /**< Optional codec param. */
unsigned tx_pt; /**< Outgoing codec paylaod type. */ unsigned tx_pt; /**< Outgoing codec paylaod type. */
unsigned rx_pt; /**< Incoming codec paylaod type. */
unsigned tx_maxptime;/**< Outgoing codec max ptime. */ unsigned tx_maxptime;/**< Outgoing codec max ptime. */
int tx_event_pt;/**< Outgoing pt for telephone-e vents. */ int tx_event_pt;/**< Outgoing pt for telephone-e vents. */
int rx_event_pt;/**< Incoming pt for telephone-e vents. */ int rx_event_pt;/**< Incoming pt for telephone-e vents. */
pj_uint32_t ssrc; /**< RTP SSRC. */ pj_uint32_t ssrc; /**< RTP SSRC. */
pj_uint32_t rtp_ts; /**< Initial RTP timestamp. */ pj_uint32_t rtp_ts; /**< Initial RTP timestamp. */
pj_uint16_t rtp_seq; /**< Initial RTP sequence number . */ pj_uint16_t rtp_seq; /**< Initial RTP sequence number . */
pj_uint8_t rtp_seq_ts_set; pj_uint8_t rtp_seq_ts_set;
/**< Bitmask flags if initial RTP sequen ce /**< Bitmask flags if initial RTP sequen ce
and/or timestamp for sender are set . and/or timestamp for sender are set .
bit 0/LSB : sequence flag bit 0/LSB : sequence flag
skipping to change at line 137 skipping to change at line 139
int jb_max; /**< Jitter buffer max delay in msec. */ int jb_max; /**< Jitter buffer max delay in msec. */
#if defined(PJMEDIA_STREAM_ENABLE_KA) && PJMEDIA_STREAM_ENABLE_KA!=0 #if defined(PJMEDIA_STREAM_ENABLE_KA) && PJMEDIA_STREAM_ENABLE_KA!=0
pj_bool_t use_ka; /**< Stream keep-alive and NAT hole punc h pj_bool_t use_ka; /**< Stream keep-alive and NAT hole punc h
(see #PJMEDIA_STREAM_ENABLE_KA) (see #PJMEDIA_STREAM_ENABLE_KA)
is enabled? */ is enabled? */
#endif #endif
pj_bool_t rtcp_sdes_bye_disabled; pj_bool_t rtcp_sdes_bye_disabled;
/**< Disable automatic sending of RTCP /**< Disable automatic sending of RTCP
SDES and BYE. */ SDES and BYE. */
}; } pjmedia_stream_info;
/** /**
* @see pjmedia_stream_info. * This function will initialize the stream info based on information
*/ * in both SDP session descriptors for the specified stream index.
typedef struct pjmedia_stream_info pjmedia_stream_info; * The remaining information will be taken from default codec parameters.
* If socket info array is specified, the socket will be copied to the
* session info as well.
*
* @param si Stream info structure to be initialized.
* @param pool Pool to allocate memory.
* @param endpt PJMEDIA endpoint instance.
* @param local Local SDP session descriptor.
* @param remote Remote SDP session descriptor.
* @param stream_idx Media stream index in the session descriptor.
*
* @return PJ_SUCCESS if stream info is successfully initialize
d.
*/
PJ_DECL(pj_status_t)
pjmedia_stream_info_from_sdp( pjmedia_stream_info *si,
pj_pool_t *pool,
pjmedia_endpt *endpt,
const pjmedia_sdp_session *local,
const pjmedia_sdp_session *remote,
unsigned stream_idx);
/** /**
* Create a media stream based on the specified parameter. After the stream * Create a media stream based on the specified parameter. After the stream
* has been created, application normally would want to get the media port * has been created, application normally would want to get the media port
* interface of the streams, by calling pjmedia_stream_get_port(). The * interface of the streams, by calling pjmedia_stream_get_port(). The
* media port interface exports put_frame() and get_frame() function, used * media port interface exports put_frame() and get_frame() function, used
* to transmit and receive media frames from the stream. * to transmit and receive media frames from the stream.
* *
* Without application calling put_frame() and get_frame(), there will be * Without application calling put_frame() and get_frame(), there will be
* no media frames transmitted or received by the stream. * no media frames transmitted or received by the stream.
skipping to change at line 227 skipping to change at line 248
* in the media stream, depending on the media direction that was set * in the media stream, depending on the media direction that was set
* when the stream was created. * when the stream was created.
* *
* @param stream The media stream. * @param stream The media stream.
* *
* @return PJ_SUCCESS on success. * @return PJ_SUCCESS on success.
*/ */
PJ_DECL(pj_status_t) pjmedia_stream_start(pjmedia_stream *stream); PJ_DECL(pj_status_t) pjmedia_stream_start(pjmedia_stream *stream);
/** /**
* Get the stream info.
*
* @param stream The media stream.
* @param info Stream info.
*
* @return PJ_SUCCESS on success.
*/
PJ_DECL(pj_status_t) pjmedia_stream_get_info( const pjmedia_stream *stream,
pjmedia_stream_info *info);
/**
* Get the stream statistics. See also * Get the stream statistics. See also
* #pjmedia_stream_get_stat_jbuf() * #pjmedia_stream_get_stat_jbuf()
* *
* @param stream The media stream. * @param stream The media stream.
* @param stat Media stream statistics. * @param stat Media stream statistics.
* *
* @return PJ_SUCCESS on success. * @return PJ_SUCCESS on success.
*/ */
PJ_DECL(pj_status_t) pjmedia_stream_get_stat( const pjmedia_stream *stream, PJ_DECL(pj_status_t) pjmedia_stream_get_stat( const pjmedia_stream *stream,
pjmedia_rtcp_stat *stat); pjmedia_rtcp_stat *stat);
 End of changes. 7 change blocks. 
6 lines changed or deleted 39 lines changed or added


 stun_session.h   stun_session.h 
/* $Id: stun_session.h 4407 2013-02-27 15:02:03Z riza $ */ /* $Id: stun_session.h 3553 2011-05-05 06:14:19Z nanang $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 677 skipping to change at line 677
pj_bool_t notify, pj_bool_t notify,
pj_status_t status); pj_status_t status);
/** /**
* Explicitly request retransmission of the request. Normally application * Explicitly request retransmission of the request. Normally application
* doesn't need to do this, but this functionality is needed by ICE to * doesn't need to do this, but this functionality is needed by ICE to
* speed up connectivity check completion. * speed up connectivity check completion.
* *
* @param sess The STUN session instance. * @param sess The STUN session instance.
* @param tdata The request message previously sent. * @param tdata The request message previously sent.
* @param mod_count Boolean flag to indicate whether transmission count
* needs to be incremented.
* *
* @return PJ_SUCCESS on success, or the appropriate error. * @return PJ_SUCCESS on success, or the appropriate error.
* This function will return PJNATH_ESTUNDESTROYED if * This function will return PJNATH_ESTUNDESTROYED if
* application has destroyed the session in \a on_send_msg( ) * application has destroyed the session in \a on_send_msg( )
* callback. * callback.
*/ */
PJ_DECL(pj_status_t) pj_stun_session_retransmit_req(pj_stun_session *sess, PJ_DECL(pj_status_t) pj_stun_session_retransmit_req(pj_stun_session *sess,
pj_stun_tx_data *tdata, pj_stun_tx_data *tdata);
pj_bool_t mod_count);
/** /**
* Application must call this function to notify the STUN session about * Application must call this function to notify the STUN session about
* the arrival of STUN packet. The STUN packet MUST have been checked * the arrival of STUN packet. The STUN packet MUST have been checked
* first with #pj_stun_msg_check() to verify that this is indeed a valid * first with #pj_stun_msg_check() to verify that this is indeed a valid
* STUN packet. * STUN packet.
* *
* The STUN session will decode the packet into pj_stun_msg, and process * The STUN session will decode the packet into pj_stun_msg, and process
* the message accordingly. If the message is a response, it will search * the message accordingly. If the message is a response, it will search
* through the outstanding STUN client transactions for a matching * through the outstanding STUN client transactions for a matching
 End of changes. 3 change blocks. 
5 lines changed or deleted 2 lines changed or added


 stun_transaction.h   stun_transaction.h 
/* $Id: stun_transaction.h 4407 2013-02-27 15:02:03Z riza $ */ /* $Id: stun_transaction.h 3553 2011-05-05 06:14:19Z nanang $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 227 skipping to change at line 227
pj_bool_t retransmit, pj_bool_t retransmit,
void *pkt, void *pkt,
unsigned pkt_len); unsigned pkt_len);
/** /**
* Request to retransmit the request. Normally application should not need * Request to retransmit the request. Normally application should not need
* to call this function since retransmission would be handled internally, * to call this function since retransmission would be handled internally,
* but this functionality is needed by ICE. * but this functionality is needed by ICE.
* *
* @param tsx The STUN client transaction instance. * @param tsx The STUN client transaction instance.
* @param mod_count Boolean flag to indicate whether transmission count
* needs to be incremented.
* *
* @return PJ_SUCCESS on success, or PJNATH_ESTUNDESTROYED * @return PJ_SUCCESS on success, or PJNATH_ESTUNDESTROYED
* when the user has destroyed the transaction in * when the user has destroyed the transaction in
* \a on_send_msg() callback, or any other error code * \a on_send_msg() callback, or any other error code
* as returned by \a on_send_msg() callback. * as returned by \a on_send_msg() callback.
*/ */
PJ_DECL(pj_status_t) pj_stun_client_tsx_retransmit(pj_stun_client_tsx *tsx, PJ_DECL(pj_status_t) pj_stun_client_tsx_retransmit(pj_stun_client_tsx *tsx)
pj_bool_t mod_count); ;
/** /**
* Notify the STUN transaction about the arrival of STUN response. * Notify the STUN transaction about the arrival of STUN response.
* If the STUN response contains a final error (300 and greater), the * If the STUN response contains a final error (300 and greater), the
* transaction will be terminated and callback will be called. If the * transaction will be terminated and callback will be called. If the
* STUN response contains response code 100-299, retransmission * STUN response contains response code 100-299, retransmission
* will cease, but application must still call this function again * will cease, but application must still call this function again
* with a final response later to allow the transaction to complete. * with a final response later to allow the transaction to complete.
* *
* @param tsx The STUN client transaction instance. * @param tsx The STUN client transaction instance.
 End of changes. 3 change blocks. 
5 lines changed or deleted 3 lines changed or added


 transport.h   transport.h 
/* $Id: transport.h 4346 2013-02-13 08:20:33Z nanang $ */ /* $Id: transport.h 3664 2011-07-19 03:42:28Z nanang $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 30 skipping to change at line 30
#ifndef __PJMEDIA_TRANSPORT_H__ #ifndef __PJMEDIA_TRANSPORT_H__
#define __PJMEDIA_TRANSPORT_H__ #define __PJMEDIA_TRANSPORT_H__
/** /**
* @file transport.h Media Transport Interface * @file transport.h Media Transport Interface
* @brief Transport interface. * @brief Transport interface.
*/ */
#include <pjmedia/types.h> #include <pjmedia/types.h>
#include <pjmedia/errno.h> #include <pjmedia/errno.h>
#include <pj/string.h>
/** /**
* @defgroup PJMEDIA_TRANSPORT Media Transport * @defgroup PJMEDIA_TRANSPORT Media Transport
* @brief Transports. * @brief Transports.
* @{ * @{
* The media transport (#pjmedia_transport) is the object to send and * The media transport (#pjmedia_transport) is the object to send and
* receive media packets over the network. The media transport interface * receive media packets over the network. The media transport interface
* allows the library to be extended to support different types of * allows the library to be extended to support different types of
* transports to send and receive packets. * transports to send and receive packets.
* *
skipping to change at line 255 skipping to change at line 256
* transport validation, this is useful when transport is stacked with * transport validation, this is useful when transport is stacked with
* other transport, for example when transport UDP is stacked under * other transport, for example when transport UDP is stacked under
* transport SRTP, media transport validation only need to be done by * transport SRTP, media transport validation only need to be done by
* transport SRTP. * transport SRTP.
*/ */
PJMEDIA_TPMED_NO_TRANSPORT_CHECKING = 1 PJMEDIA_TPMED_NO_TRANSPORT_CHECKING = 1
} pjmedia_tranport_media_option; } pjmedia_tranport_media_option;
/** /**
* Media socket info is used to describe the underlying sockets
* to be used as media transport.
*/
typedef struct pjmedia_sock_info
{
/** The RTP socket handle */
pj_sock_t rtp_sock;
/** Address to be advertised as the local address for the RTP
* socket, which does not need to be equal as the bound
* address (for example, this address can be the address resolved
* with STUN).
*/
pj_sockaddr rtp_addr_name;
/** The RTCP socket handle. */
pj_sock_t rtcp_sock;
/** Address to be advertised as the local address for the RTCP
* socket, which does not need to be equal as the bound
* address (for example, this address can be the address resolved
* with STUN).
*/
pj_sockaddr rtcp_addr_name;
} pjmedia_sock_info;
/**
* This structure describes the operations for the stream transport. * This structure describes the operations for the stream transport.
*/ */
struct pjmedia_transport_op struct pjmedia_transport_op
{ {
/** /**
* Get media socket info from the specified transport. * Get media socket info from the specified transport.
* *
* Application should call #pjmedia_transport_get_info() instead * Application should call #pjmedia_transport_get_info() instead
*/ */
pj_status_t (*get_info)(pjmedia_transport *tp, pj_status_t (*get_info)(pjmedia_transport *tp,
skipping to change at line 448 skipping to change at line 477
struct pjmedia_transport struct pjmedia_transport
{ {
/** Transport name (for logging purpose). */ /** Transport name (for logging purpose). */
char name[PJ_MAX_OBJ_NAME]; char name[PJ_MAX_OBJ_NAME];
/** Transport type. */ /** Transport type. */
pjmedia_transport_type type; pjmedia_transport_type type;
/** Transport's "virtual" function table. */ /** Transport's "virtual" function table. */
pjmedia_transport_op *op; pjmedia_transport_op *op;
/** Application/user data */
void *user_data;
}; };
/** /**
* This structure describes storage buffer of transport specific info. * This structure describes storage buffer of transport specific info.
* The actual transport specific info contents will be defined by transport * The actual transport specific info contents will be defined by transport
* implementation. Note that some transport implementations do not need to * implementation. Note that some transport implementations do not need to
* provide specific info, since the general socket info is enough. * provide specific info, since the general socket info is enough.
*/ */
typedef struct pjmedia_transport_specific_info typedef struct pjmedia_transport_specific_info
{ {
skipping to change at line 525 skipping to change at line 557
info->specific_info_cnt = 0; info->specific_info_cnt = 0;
} }
/** /**
* Get media transport info from the specified transport and all underlying * Get media transport info from the specified transport and all underlying
* transports if any. The transport also contains information about socket info * transports if any. The transport also contains information about socket info
* which describes the local address of the transport, and would be needed * which describes the local address of the transport, and would be needed
* for example to fill in the "c=" and "m=" line of local SDP. * for example to fill in the "c=" and "m=" line of local SDP.
* *
* @param tp The transport. * @param tp The transport.
* @param info Media transport info to be initialized. * @param info Media socket info to be initialized.
* *
* @return PJ_SUCCESS on success. * @return PJ_SUCCESS on success.
*/ */
PJ_INLINE(pj_status_t) pjmedia_transport_get_info(pjmedia_transport *tp, PJ_INLINE(pj_status_t) pjmedia_transport_get_info(pjmedia_transport *tp,
pjmedia_transport_info *in fo) pjmedia_transport_info *in fo)
{ {
if (tp && tp->op && tp->op->get_info) if (tp && tp->op && tp->op->get_info)
return (*tp->op->get_info)(tp, info); return (*tp->op->get_info)(tp, info);
return PJ_ENOTSUP; return PJ_ENOTSUP;
} }
/** /**
* Utility API to get transport type specific info from the specified media
* transport info.
*
* @param info Media transport info.
* @param type Media transport type.
*
* @return Pointer to media transport specific info, or NULL if
* specific info for the transport type is not found.
*/
PJ_INLINE(void*) pjmedia_transport_info_get_spc_info(
pjmedia_transport_info *info
,
pjmedia_transport_type type)
{
unsigned i;
for (i = 0; i < info->specific_info_cnt; ++i) {
if (info->spc_info[i].type == type)
return (void*)info->spc_info[i].buffer;
}
return NULL;
}
/**
* Attach callbacks to be called on receipt of incoming RTP/RTCP packets. * Attach callbacks to be called on receipt of incoming RTP/RTCP packets.
* This is just a simple wrapper which calls <tt>attach()</tt> member of * This is just a simple wrapper which calls <tt>attach()</tt> member of
* the transport. * the transport.
* *
* @param tp The media transport. * @param tp The media transport.
* @param user_data Arbitrary user data to be set when the callbacks are * @param user_data Arbitrary user data to be set when the callbacks are
* called. * called.
* @param rem_addr Remote RTP address to send RTP packet to. * @param rem_addr Remote RTP address to send RTP packet to.
* @param rem_rtcp Optional remote RTCP address. If the argument is NULL * @param rem_rtcp Optional remote RTCP address. If the argument is NULL
* or if the address is zero, the RTCP address will be * or if the address is zero, the RTCP address will be
 End of changes. 6 change blocks. 
25 lines changed or deleted 34 lines changed or added


 transport_adapter_sample.h   transport_adapter_sample.h 
/* $Id: transport_adapter_sample.h 3804 2011-10-09 10:58:38Z bennylp $ */ /* $Id: transport_adapter_sample.h 3841 2011-10-24 09:28:13Z ming $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 transport_ice.h   transport_ice.h 
/* $Id: transport_ice.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: transport_ice.h 3872 2011-10-28 04:27:41Z bennylp $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 98 skipping to change at line 98
* second element denotes RTCP. * second element denotes RTCP.
*/ */
struct struct
{ {
/** /**
* Local candidate type. * Local candidate type.
*/ */
pj_ice_cand_type lcand_type; pj_ice_cand_type lcand_type;
/** /**
* The local address.
*/
pj_sockaddr lcand_addr;
/**
* Remote candidate type. * Remote candidate type.
*/ */
pj_ice_cand_type rcand_type; pj_ice_cand_type rcand_type;
/**
* Remote address.
*/
pj_sockaddr rcand_addr;
} comp[2]; } comp[2];
} pjmedia_ice_transport_info; } pjmedia_ice_transport_info;
/** /**
* Options that can be specified when creating ICE transport. * Options that can be specified when creating ICE transport.
*/ */
enum pjmedia_transport_ice_options enum pjmedia_transport_ice_options
{ {
/** /**
skipping to change at line 177 skipping to change at line 187
* @return PJ_SUCCESS on success, or the appropriate error code . * @return PJ_SUCCESS on success, or the appropriate error code .
*/ */
PJ_DECL(pj_status_t) pjmedia_ice_create2(pjmedia_endpt *endpt, PJ_DECL(pj_status_t) pjmedia_ice_create2(pjmedia_endpt *endpt,
const char *name, const char *name,
unsigned comp_cnt, unsigned comp_cnt,
const pj_ice_strans_cfg *cfg, const pj_ice_strans_cfg *cfg,
const pjmedia_ice_cb *cb, const pjmedia_ice_cb *cb,
unsigned options, unsigned options,
pjmedia_transport **p_tp); pjmedia_transport **p_tp);
/**
* The same as #pjmedia_ice_create2() with additional \a user_data param.
*
* @param endpt The media endpoint.
* @param name Optional name to identify this ICE media transport
* for logging purposes.
* @param comp_cnt Number of components to be created.
* @param cfg Pointer to configuration settings.
* @param cb Optional structure containing ICE specific callbacks
.
* @param options Options, see #pjmedia_transport_ice_options.
* @param user_data User data to be attached to the transport.
* @param p_tp Pointer to receive the media transport instance.
*
* @return PJ_SUCCESS on success, or the appropriate error code
.
*/
PJ_DECL(pj_status_t) pjmedia_ice_create3(pjmedia_endpt *endpt,
const char *name,
unsigned comp_cnt,
const pj_ice_strans_cfg *cfg,
const pjmedia_ice_cb *cb,
unsigned options,
void *user_data,
pjmedia_transport **p_tp);
PJ_END_DECL PJ_END_DECL
/** /**
* @} * @}
*/ */
#endif /* __PJMEDIA_TRANSPORT_ICE_H__ */ #endif /* __PJMEDIA_TRANSPORT_ICE_H__ */
 End of changes. 4 change blocks. 
1 lines changed or deleted 37 lines changed or added


 transport_srtp.h   transport_srtp.h 
/* $Id: transport_srtp.h 3986 2012-03-22 11:29:20Z nanang $ */ /* $Id: transport_srtp.h 3999 2012-03-30 07:10:13Z bennylp $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 types.h   types.h 
/* $Id: types.h 3987 2012-03-23 08:24:58Z bennylp $ */ /* $Id: types.h 3999 2012-03-30 07:10:13Z bennylp $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/