amr_helper.h   amr_helper.h 
/* $Id: amr_helper.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: amr_helper.h 3589 2011-06-20 04:06: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 567 skipping to change at line 567
pjmedia_codec_amrwb_ordermap_1825, pjmedia_codec_amrwb_ordermap_1825,
pjmedia_codec_amrwb_ordermap_1985, pjmedia_codec_amrwb_ordermap_1985,
pjmedia_codec_amrwb_ordermap_2305, pjmedia_codec_amrwb_ordermap_2305,
pjmedia_codec_amrwb_ordermap_2385 pjmedia_codec_amrwb_ordermap_2385
}; };
/** /**
* Constant of AMR-NB frame lengths in bytes. * Constant of AMR-NB frame lengths in bytes.
*/ */
const pj_uint8_t pjmedia_codec_amrnb_framelen[16] = const pj_uint8_t pjmedia_codec_amrnb_framelen[16] =
{12, 13, 15, 17, 19, 20, 26, 31, 5, 0, 0, 0, 0, 0, 0, 5}; {12, 13, 15, 17, 19, 20, 26, 31, 5, 0, 0, 0, 0, 0, 0, 0};
/** /**
* Constant of AMR-NB frame lengths in bits. * Constant of AMR-NB frame lengths in bits.
*/ */
const pj_uint16_t pjmedia_codec_amrnb_framelenbits[9] = const pj_uint16_t pjmedia_codec_amrnb_framelenbits[9] =
{95, 103, 118, 134, 148, 159, 204, 244, 39}; {95, 103, 118, 134, 148, 159, 204, 244, 39};
/** /**
* Constant of AMR-NB bitrates. * Constant of AMR-NB bitrates.
*/ */
const pj_uint16_t pjmedia_codec_amrnb_bitrates[8] = const pj_uint16_t pjmedia_codec_amrnb_bitrates[8] =
{4750, 5150, 5900, 6700, 7400, 7950, 10200, 12200}; {4750, 5150, 5900, 6700, 7400, 7950, 10200, 12200};
/** /**
* Constant of AMR-WB frame lengths in bytes. * Constant of AMR-WB frame lengths in bytes.
*/ */
const pj_uint8_t pjmedia_codec_amrwb_framelen[16] = const pj_uint8_t pjmedia_codec_amrwb_framelen[16] =
{17, 23, 32, 37, 40, 46, 50, 58, 60, 5, 0, 0, 0, 0, 0, 5}; {17, 23, 32, 37, 40, 46, 50, 58, 60, 5, 0, 0, 0, 0, 0, 0};
/** /**
* Constant of AMR-WB frame lengths in bits. * Constant of AMR-WB frame lengths in bits.
*/ */
const pj_uint16_t pjmedia_codec_amrwb_framelenbits[10] = const pj_uint16_t pjmedia_codec_amrwb_framelenbits[10] =
{132, 177, 253, 285, 317, 365, 397, 461, 477, 40}; {132, 177, 253, 285, 317, 365, 397, 461, 477, 40};
/** /**
* Constant of AMR-WB bitrates. * Constant of AMR-WB bitrates.
*/ */
const pj_uint16_t pjmedia_codec_amrwb_bitrates[9] = const pj_uint16_t pjmedia_codec_amrwb_bitrates[9] =
{6600, 8850, 12650, 14250, 15850, 18250, 19850, 23050, 23850}; {6600, 8850, 12650, 14250, 15850, 18250, 19850, 23050, 23850};
skipping to change at line 605 skipping to change at line 605
/** /**
* This structure describes AMR frame info, to be fitted into #pjmedia_fram e * This structure describes AMR frame info, to be fitted into #pjmedia_fram e
* bit info. * bit info.
*/ */
#pragma pack(1) #pragma pack(1)
typedef struct pjmedia_codec_amr_bit_info { typedef struct pjmedia_codec_amr_bit_info {
pj_uint8_t frame_type; /**< AMR frame type. */ pj_uint8_t frame_type; /**< AMR frame type. */
pj_int8_t mode; /**< AMR mode. */ pj_int8_t mode; /**< AMR mode. */
pj_uint8_t start_bit; /**< Frame start bit. */ pj_uint8_t start_bit; /**< Frame start bit. */
pj_uint8_t good_quality:1; /**< Flag if frame is good/degraded. */ pj_uint8_t good_quality:1; /**< Flag if frame is good/degraded. */
pj_uint8_t STI:1; /**< STI mode (first/update). */
} pjmedia_codec_amr_bit_info; } pjmedia_codec_amr_bit_info;
#pragma pack() #pragma pack()
/** /**
* This structure describes AMR settings. * This structure describes AMR settings.
*/ */
typedef struct pjmedia_codec_amr_pack_setting { typedef struct pjmedia_codec_amr_pack_setting {
pj_uint8_t amr_nb:1; /**< Set 1 for AMR-NB, 0 for AMR-WB. */ pj_uint8_t amr_nb:1; /**< Set 1 for AMR-NB, 0 for AMR-WB. */
pj_uint8_t reorder:1; /**< Reorder bitstream into descending pj_uint8_t reorder:1; /**< Reorder bitstream into descending
sensitivity order or vice versa. */ sensitivity order or vice versa. */
skipping to change at line 1016 skipping to change at line 1017
w_bitptr = 0; w_bitptr = 0;
++w; ++w;
*w = 0; *w = 0;
} }
} }
} }
} else if (info->frame_type == SID_FT) { } else if (info->frame_type == SID_FT) {
/* SID */ /* SID */
pj_uint8_t STI = 0; amr_bits[35] |= info->STI;
amr_bits[35] = (pj_uint8_t)(STI & 1);
if (setting->amr_nb) { if (setting->amr_nb) {
amr_bits[36] = (pj_uint8_t)((info->mode >> 2) & 1); amr_bits[36] = (pj_uint8_t)((info->mode >> 2) & 1);
amr_bits[37] = (pj_uint8_t)((info->mode >> 1) & 1); amr_bits[37] = (pj_uint8_t)((info->mode >> 1) & 1);
amr_bits[38] = (pj_uint8_t)((info->mode) & 1); amr_bits[38] = (pj_uint8_t)((info->mode) & 1);
} else { } else {
amr_bits[36] = (pj_uint8_t)((info->mode >> 3) & 1); amr_bits[36] = (pj_uint8_t)((info->mode >> 3) & 1);
amr_bits[37] = (pj_uint8_t)((info->mode >> 2) & 1); amr_bits[37] = (pj_uint8_t)((info->mode >> 2) & 1);
amr_bits[38] = (pj_uint8_t)((info->mode >> 1) & 1); amr_bits[38] = (pj_uint8_t)((info->mode >> 1) & 1);
amr_bits[39] = (pj_uint8_t)((info->mode) & 1); amr_bits[39] = (pj_uint8_t)((info->mode) & 1);
skipping to change at line 1158 skipping to change at line 1157
++r; ++r;
r_bitptr = 0; r_bitptr = 0;
} }
/* Set frame attributes */ /* Set frame attributes */
info = (pjmedia_codec_amr_bit_info*) &frames[cnt].bit_info; info = (pjmedia_codec_amr_bit_info*) &frames[cnt].bit_info;
info->frame_type = FT; info->frame_type = FT;
info->mode = (pj_int8_t)((FT < SID_FT)? FT : -1); info->mode = (pj_int8_t)((FT < SID_FT)? FT : -1);
info->good_quality = (pj_uint8_t)(Q == 1); info->good_quality = (pj_uint8_t)(Q == 1);
info->start_bit = 0; info->start_bit = 0;
info->STI = 0;
frames[cnt].timestamp = ts_; frames[cnt].timestamp = ts_;
frames[cnt].type = PJMEDIA_FRAME_TYPE_AUDIO; frames[cnt].type = PJMEDIA_FRAME_TYPE_AUDIO;
/* AMR frame length is 20ms */ /* AMR frame length is 20ms */
ts_.u64 += setting->amr_nb? 160 : 320; ts_.u64 += setting->amr_nb? 160 : 320;
if (++cnt == *nframes || !F) if (++cnt == *nframes || !F)
break; break;
} }
*nframes = cnt; *nframes = cnt;
skipping to change at line 1181 skipping to change at line 1181
/* Speech frames */ /* Speech frames */
while (cnt < *nframes) { while (cnt < *nframes) {
pj_uint8_t FT; pj_uint8_t FT;
info = (pjmedia_codec_amr_bit_info*) &frames[cnt].bit_info; info = (pjmedia_codec_amr_bit_info*) &frames[cnt].bit_info;
FT = info->frame_type; FT = info->frame_type;
frames[cnt].buf = r; frames[cnt].buf = r;
info->start_bit = r_bitptr; info->start_bit = r_bitptr;
if (FT == SID_FT) {
unsigned sti_bitptr;
sti_bitptr = r_bitptr + 35;
info->STI = (pj_uint8_t)
(r[sti_bitptr >> 3] >> (7 - (sti_bitptr % 8))) & 1;
}
if (setting->octet_aligned) { if (setting->octet_aligned) {
r += framelen_tbl[FT]; r += framelen_tbl[FT];
frames[cnt].size = framelen_tbl[FT]; frames[cnt].size = framelen_tbl[FT];
} else { } else {
if (FT == 14 || FT == 15) { if (FT == 14 || FT == 15) {
/* NO DATA */ /* NO DATA */
frames[cnt].size = 0; frames[cnt].size = 0;
} else { } else {
unsigned adv_bit; unsigned adv_bit;
 End of changes. 7 change blocks. 
6 lines changed or deleted 13 lines changed or added


 config.h   config.h 
/* $Id: config.h 3554 2011-05-05 09:10:15Z nanang $ */ /* $Id: config.h 3884 2011-11-08 17:11: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 165 skipping to change at line 165
# undef PJ_M_X86_64 # undef PJ_M_X86_64
# define PJ_M_X86_64 1 # define PJ_M_X86_64 1
# define PJ_M_NAME "x86_64" # define PJ_M_NAME "x86_64"
# define PJ_HAS_PENTIUM 1 # define PJ_HAS_PENTIUM 1
# define PJ_IS_LITTLE_ENDIAN 1 # define PJ_IS_LITTLE_ENDIAN 1
# define PJ_IS_BIG_ENDIAN 0 # define PJ_IS_BIG_ENDIAN 0
#elif defined(PJ_M_IA64) || defined(__ia64__) || defined(_IA64) || \ #elif defined(PJ_M_IA64) || defined(__ia64__) || defined(_IA64) || \
defined(__IA64__) || defined( _M_IA64) defined(__IA64__) || defined( _M_IA64)
/* /*
* Intel IA64 processor, little endian * Intel IA64 processor, default to little endian
*/ */
# undef PJ_M_IA64 # undef PJ_M_IA64
# define PJ_M_IA64 1 # define PJ_M_IA64 1
# define PJ_M_NAME "ia64" # define PJ_M_NAME "ia64"
# define PJ_HAS_PENTIUM 1 # define PJ_HAS_PENTIUM 1
# define PJ_IS_LITTLE_ENDIAN 1 # define PJ_IS_LITTLE_ENDIAN 1
# define PJ_IS_BIG_ENDIAN 0 # define PJ_IS_BIG_ENDIAN 0
#elif defined (PJ_M_M68K) && PJ_M_M68K != 0 #elif defined (PJ_M_M68K) && PJ_M_M68K != 0
skipping to change at line 201 skipping to change at line 201
# undef PJ_M_ALPHA # undef PJ_M_ALPHA
# define PJ_M_ALPHA 1 # define PJ_M_ALPHA 1
# define PJ_M_NAME "alpha" # define PJ_M_NAME "alpha"
# define PJ_HAS_PENTIUM 0 # define PJ_HAS_PENTIUM 0
# define PJ_IS_LITTLE_ENDIAN 1 # define PJ_IS_LITTLE_ENDIAN 1
# define PJ_IS_BIG_ENDIAN 0 # define PJ_IS_BIG_ENDIAN 0
#elif defined(PJ_M_MIPS) || defined(__mips__) || defined(__mips) || \ #elif defined(PJ_M_MIPS) || defined(__mips__) || defined(__mips) || \
defined(__MIPS__) || defined(MIPS) || defined(_MIPS_) defined(__MIPS__) || defined(MIPS) || defined(_MIPS_)
/* /*
* MIPS, default to little endian * MIPS, bi-endian, so raise error if endianness is not configured
*/ */
# undef PJ_M_MIPS # undef PJ_M_MIPS
# define PJ_M_MIPS 1 # define PJ_M_MIPS 1
# define PJ_M_NAME "mips" # define PJ_M_NAME "mips"
# define PJ_HAS_PENTIUM 0 # define PJ_HAS_PENTIUM 0
# if !defined(PJ_IS_LITTLE_ENDIAN) && !defined(PJ_IS_BIG_ENDIAN) # if !PJ_IS_LITTLE_ENDIAN && !PJ_IS_BIG_ENDIAN
# define PJ_IS_LITTLE_ENDIAN 1 # error Endianness must be declared for this processor
# define PJ_IS_BIG_ENDIAN 0
# endif # endif
#elif defined (PJ_M_SPARC) || defined( __sparc__) || defined(__spar c) #elif defined (PJ_M_SPARC) || defined( __sparc__) || defined(__spar c)
/* /*
* Sun Sparc, big endian * Sun Sparc, big endian
*/ */
# undef PJ_M_SPARC # undef PJ_M_SPARC
# define PJ_M_SPARC 1 # define PJ_M_SPARC 1
# define PJ_M_NAME "sparc" # define PJ_M_NAME "sparc"
# define PJ_HAS_PENTIUM 0 # define PJ_HAS_PENTIUM 0
# define PJ_IS_LITTLE_ENDIAN 0 # define PJ_IS_LITTLE_ENDIAN 0
# define PJ_IS_BIG_ENDIAN 1 # define PJ_IS_BIG_ENDIAN 1
#elif defined (PJ_M_ARMV4) || defined(ARM) || defined(_ARM_) || \ #elif defined (PJ_M_ARMV4) || defined(ARM) || defined(_ARM_) || \
defined(ARMV4) || defined(__arm__) defined(ARMV4) || defined(__arm__)
/* /*
* ARM, default to little endian * ARM, bi-endian, so raise error if endianness is not configured
*/ */
# undef PJ_M_ARMV4 # undef PJ_M_ARMV4
# define PJ_M_ARMV4 1 # define PJ_M_ARMV4 1
# define PJ_M_NAME "armv4" # define PJ_M_NAME "armv4"
# define PJ_HAS_PENTIUM 0 # define PJ_HAS_PENTIUM 0
# if !defined(PJ_IS_LITTLE_ENDIAN) && !defined(PJ_IS_BIG_ENDIAN) # if !PJ_IS_LITTLE_ENDIAN && !PJ_IS_BIG_ENDIAN
# define PJ_IS_LITTLE_ENDIAN 1 # error Endianness must be declared for this processor
# define PJ_IS_BIG_ENDIAN 0
# endif # endif
#elif defined (PJ_M_POWERPC) || defined(__powerpc) || defined(__powerpc__) || \ #elif defined (PJ_M_POWERPC) || defined(__powerpc) || defined(__powerpc__) || \
defined(__POWERPC__) || defined(__ppc__) || defined(_M_PPC) || \ defined(__POWERPC__) || defined(__ppc__) || defined(_M_PPC) || \
defined(_ARCH_PPC) defined(_ARCH_PPC)
/* /*
* PowerPC, big endian * PowerPC, bi-endian, so raise error if endianness is not configured
*/ */
# undef PJ_M_POWERPC # undef PJ_M_POWERPC
# define PJ_M_POWERPC 1 # define PJ_M_POWERPC 1
# define PJ_M_NAME "powerpc" # define PJ_M_NAME "powerpc"
# define PJ_HAS_PENTIUM 0 # define PJ_HAS_PENTIUM 0
# define PJ_IS_LITTLE_ENDIAN 0 # if !PJ_IS_LITTLE_ENDIAN && !PJ_IS_BIG_ENDIAN
# define PJ_IS_BIG_ENDIAN 1 # error Endianness must be declared for this processor
# endif
#elif defined (PJ_M_NIOS2) || defined(__nios2) || defined(__nios2__) || \ #elif defined (PJ_M_NIOS2) || defined(__nios2) || defined(__nios2__) || \
defined(__NIOS2__) || defined(__M_NIOS2) || defined(_ARCH_NIOS2) defined(__NIOS2__) || defined(__M_NIOS2) || defined(_ARCH_NIOS2)
/* /*
* Nios2, little endian * Nios2, little endian
*/ */
# undef PJ_M_NIOS2 # undef PJ_M_NIOS2
# define PJ_M_NIOS2 1 # define PJ_M_NIOS2 1
# define PJ_M_NAME "nios2" # define PJ_M_NAME "nios2"
# define PJ_HAS_PENTIUM 0 # define PJ_HAS_PENTIUM 0
skipping to change at line 1087 skipping to change at line 1086
#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 1
/** PJLIB version minor number. */ /** PJLIB version minor number. */
#define PJ_VERSION_NUM_MINOR 10 #define PJ_VERSION_NUM_MINOR 12
/** 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. "-trunk"), 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 ""
 End of changes. 9 change blocks. 
14 lines changed or deleted 13 lines changed or added


 delaybuf.h   delaybuf.h 
/* $Id: delaybuf.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: delaybuf.h 3567 2011-05-15 12:54:28Z 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 66 skipping to change at line 66
* The delay buffer is used in \ref PJMED_SND_PORT, \ref PJMEDIA_SPLITCOMB, * The delay buffer is used in \ref PJMED_SND_PORT, \ref PJMEDIA_SPLITCOMB,
* and \ref PJMEDIA_CONF. * and \ref PJMEDIA_CONF.
*/ */
PJ_BEGIN_DECL PJ_BEGIN_DECL
/** Opaque declaration for delay buffer. */ /** Opaque declaration for delay buffer. */
typedef struct pjmedia_delay_buf pjmedia_delay_buf; typedef struct pjmedia_delay_buf pjmedia_delay_buf;
/** /**
* Delay buffer options.
*/
typedef enum pjmedia_delay_buf_flag
{
/**
* Use simple FIFO mechanism for the delay buffer, i.e.
* without WSOLA for expanding and shrinking audio samples.
*/
PJMEDIA_DELAY_BUF_SIMPLE_FIFO = 1
} pjmedia_delay_buf_flag;
/**
* Create the delay buffer. Once the delay buffer is created, it will * Create the delay buffer. Once the delay buffer is created, it will
* enter learning state unless the delay argument is specified, which * enter learning state unless the delay argument is specified, which
* in this case it will directly enter the running state. * in this case it will directly enter the running state.
* *
* @param pool Pool where the delay buffer will be allocated * @param pool Pool where the delay buffer will be allocated
* from. * from.
* @param name Optional name for the buffer for log * @param name Optional name for the buffer for log
* identification. * identification.
* @param clock_rate Number of samples processed per second. * @param clock_rate Number of samples processed per second.
* @param samples_per_frame Number of samples per frame. * @param samples_per_frame Number of samples per frame.
* @param channel_count Number of channel per frame. * @param channel_count Number of channel per frame.
* @param max_delay Maximum number of delay to be accommodated, * @param max_delay Maximum number of delay to be accommodated,
* in ms, if this value is negative or less than * in ms, if this value is negative or less than
* one frame time, default maximum delay used is * one frame time, default maximum delay used is
* 400 ms. * 400 ms.
* @param options Option flags, must be zero for now. * @param options Options. If PJMEDIA_DELAY_BUF_SIMPLE_FIFO is
* specified, then a simple FIFO mechanism
* will be used instead of the adaptive
* implementation (which uses WSOLA to expand
* or shrink audio samples).
* See #pjmedia_delay_buf_flag for other options.
* @param p_b Pointer to receive the delay buffer instance. * @param p_b Pointer to receive the delay buffer instance.
* *
* @return PJ_SUCCESS if the delay buffer has been * @return PJ_SUCCESS if the delay buffer has been
* created successfully, otherwise the appropriate * created successfully, otherwise the appropriate
* error will be returned. * error will be returned.
*/ */
PJ_DECL(pj_status_t) pjmedia_delay_buf_create(pj_pool_t *pool, PJ_DECL(pj_status_t) pjmedia_delay_buf_create(pj_pool_t *pool,
const char *name, const char *name,
unsigned clock_rate, unsigned clock_rate,
unsigned samples_per_frame, unsigned samples_per_frame,
 End of changes. 3 change blocks. 
2 lines changed or deleted 20 lines changed or added


 echo.h   echo.h 
/* $Id: echo.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: echo.h 3567 2011-05-15 12:54:28Z 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 85 skipping to change at line 85
/** /**
* For internal use. * For internal use.
*/ */
PJMEDIA_ECHO_ALGO_MASK = 15, PJMEDIA_ECHO_ALGO_MASK = 15,
/** /**
* If PJMEDIA_ECHO_NO_LOCK flag is specified, no mutex will be created * If PJMEDIA_ECHO_NO_LOCK flag is specified, no mutex will be created
* for the echo canceller, but application will guarantee that echo * for the echo canceller, but application will guarantee that echo
* canceller will not be called by different threads at the same time. * canceller will not be called by different threads at the same time.
*/ */
PJMEDIA_ECHO_NO_LOCK = 16 PJMEDIA_ECHO_NO_LOCK = 16,
/**
* If PJMEDIA_ECHO_USE_SIMPLE_FIFO flag is specified, the delay buffer
* created for the echo canceller will use simple FIFO mechanism, i.e.
* without using WSOLA to expand and shrink audio samples.
*/
PJMEDIA_ECHO_USE_SIMPLE_FIFO = 32
} pjmedia_echo_flag; } pjmedia_echo_flag;
/** /**
* Create the echo canceller. * Create the echo canceller.
* *
* @param pool Pool to allocate memory. * @param pool Pool to allocate memory.
* @param clock_rate Media clock rate/sampling rate. * @param clock_rate Media clock rate/sampling rate.
* @param samples_per_frame Number of samples per frame. * @param samples_per_frame Number of samples per frame.
* @param tail_ms Tail length, miliseconds. * @param tail_ms Tail length, miliseconds.
 End of changes. 2 change blocks. 
2 lines changed or deleted 9 lines changed or added


 hash.h   hash.h 
/* $Id: hash.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: hash.h 3673 2011-07-20 08:08: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 125 skipping to change at line 125
/** /**
* 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, which MUST point to buffer that remains valid * @param key the key. If pool is not specified, the key MUST point to
* for the duration of the entry. * buffer that remains valid for the duration of the entry.
* @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
* 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,
 End of changes. 2 change blocks. 
3 lines changed or deleted 3 lines changed or added


 http_client.h   http_client.h 
/* $Id: http_client.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: http_client.h 3810 2011-10-11 04:37:37Z bennylp $ */
/* /*
* 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
skipping to change at line 190 skipping to change at line 190
pj_size_t size; /**< Request body size */ pj_size_t size; /**< Request body size */
pj_size_t total_size; /**< If total_size > 0, data */ pj_size_t total_size; /**< If total_size > 0, data */
/**< will be provided later */ /**< will be provided later */
} reqdata; } reqdata;
/** /**
* Authentication credential needed to respond to 401/407 response. * Authentication credential needed to respond to 401/407 response.
*/ */
pj_http_auth_cred auth_cred; pj_http_auth_cred auth_cred;
/**
* Optional source port range to use when binding the socket.
* This can be used if the source port needs to be within a certain ran
ge
* for instance due to strict firewall settings. The port used will be
* randomized within the range.
*
* Note that if authentication is configured, the authentication respon
se
* will be a new transaction
*
* Default is 0 (The OS will select the source port automatically)
*/
pj_uint16_t source_port_range_start;
/**
* Optional source port range to use when binding.
* The size of the port restriction range
*
* Default is 0 (The OS will select the source port automatically))
*/
pj_uint16_t source_port_range_size;
/**
* Max number of retries if binding to a port fails.
* Note that this does not adress the scenario where a request times ou
t
* or errors. This needs to be taken care of by the on_complete callbac
k.
*
* Default is 3
*/
pj_uint16_t max_retries;
} pj_http_req_param; } pj_http_req_param;
/** /**
* HTTP authentication challenge, parsed from WWW-Authenticate header. * HTTP authentication challenge, parsed from WWW-Authenticate header.
*/ */
typedef struct pj_http_auth_chal typedef struct pj_http_auth_chal
{ {
pj_str_t scheme; /**< Auth scheme. */ pj_str_t scheme; /**< Auth scheme. */
pj_str_t realm; /**< Realm for the challenge. */ pj_str_t realm; /**< Realm for the challenge. */
pj_str_t domain; /**< Domain. */ pj_str_t domain; /**< Domain. */
 End of changes. 2 change blocks. 
1 lines changed or deleted 35 lines changed or added


 jbuf.h   jbuf.h 
/* $Id: jbuf.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: jbuf.h 3814 2011-10-13 09:02:41Z 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
* This section describes PJMEDIA's implementation of de-jitter buffer. * This section describes PJMEDIA's implementation of de-jitter buffer.
* The de-jitter buffer may be set to operate in adaptive mode or fixed * The de-jitter buffer may be set to operate in adaptive mode or fixed
* delay mode. * delay mode.
*/ */
PJ_BEGIN_DECL PJ_BEGIN_DECL
/** /**
* Types of frame returned by the jitter buffer. * Types of frame returned by the jitter buffer.
*/ */
enum pjmedia_jb_frame_type typedef enum pjmedia_jb_frame_type
{ {
PJMEDIA_JB_MISSING_FRAME = 0, /**< No frame because it's missing */ PJMEDIA_JB_MISSING_FRAME = 0, /**< No frame because it's missing */
PJMEDIA_JB_NORMAL_FRAME = 1, /**< Normal frame is being returned */ PJMEDIA_JB_NORMAL_FRAME = 1, /**< Normal frame is being returned */
PJMEDIA_JB_ZERO_PREFETCH_FRAME = 2, /**< Zero frame is being returned PJMEDIA_JB_ZERO_PREFETCH_FRAME = 2, /**< Zero frame is being returned
because JB is bufferring. */ because JB is bufferring. */
PJMEDIA_JB_ZERO_EMPTY_FRAME = 3 /**< Zero frame is being ret urned PJMEDIA_JB_ZERO_EMPTY_FRAME = 3 /**< Zero frame is being ret urned
because JB is empty. */ because JB is empty. */
}; } pjmedia_jb_frame_type;
/** /**
* @see pjmedia_jb_frame_type. * Enumeration of jitter buffer discard algorithm. The jitter buffer
* continuously calculates the jitter level to get the optimum latency at
* any time and in order to adjust the latency, the jitter buffer may need
* to discard some frames.
*/ */
typedef enum pjmedia_jb_frame_type pjmedia_jb_frame_type; typedef enum pjmedia_jb_discard_algo
{
/**
* Jitter buffer should not discard any frame, except when the jitter
* buffer is full and a new frame arrives, one frame will be discarded
* to make space for the new frame.
*/
PJMEDIA_JB_DISCARD_NONE = 0,
/**
* Only discard one frame in at least 200ms when the latency is conside
red
* much higher than it should be. When the jitter buffer is full and a
new
* frame arrives, one frame will be discarded to make space for the new
* frame.
*/
PJMEDIA_JB_DISCARD_STATIC,
/**
* The discard rate is dynamically calculated based on actual parameter
s
* such as jitter level and latency. When the jitter buffer is full and
* a new frame arrives, one frame will be discarded to make space for t
he
* new frame.
*/
PJMEDIA_JB_DISCARD_PROGRESSIVE
} pjmedia_jb_discard_algo;
/** /**
* This structure describes jitter buffer state. * This structure describes jitter buffer state.
*/ */
struct pjmedia_jb_state typedef struct pjmedia_jb_state
{ {
/* Setting */ /* Setting */
unsigned frame_size; /**< Individual frame size, in bytes. */ unsigned frame_size; /**< Individual frame size, in bytes. */
unsigned min_prefetch; /**< Minimum allowed prefetch, in frms. */ unsigned min_prefetch; /**< Minimum allowed prefetch, in frms. */
unsigned max_prefetch; /**< Maximum allowed prefetch, in frms. */ unsigned max_prefetch; /**< Maximum allowed prefetch, in frms. */
/* Status */ /* Status */
unsigned burst; /**< Current burst level, in frames */ unsigned burst; /**< Current burst level, in frames */
unsigned prefetch; /**< Current prefetch value, in frames */ unsigned prefetch; /**< Current prefetch value, in frames */
unsigned size; /**< Current buffer size, in frames. */ unsigned size; /**< Current buffer size, in frames. */
/* Statistic */ /* Statistic */
unsigned avg_delay; /**< Average delay, in ms. */ unsigned avg_delay; /**< Average delay, in ms. */
unsigned min_delay; /**< Minimum delay, in ms. */ unsigned min_delay; /**< Minimum delay, in ms. */
unsigned max_delay; /**< Maximum delay, in ms. */ unsigned max_delay; /**< Maximum delay, in ms. */
unsigned dev_delay; /**< Standard deviation of delay, in ms. */ unsigned dev_delay; /**< Standard deviation of delay, in ms. */
unsigned avg_burst; /**< Average burst, in frames. */ unsigned avg_burst; /**< Average burst, in frames. */
unsigned lost; /**< Number of lost frames. */ unsigned lost; /**< Number of lost frames. */
unsigned discard; /**< Number of discarded frames. */ unsigned discard; /**< Number of discarded frames. */
unsigned empty; /**< Number of empty on GET events. */ unsigned empty; /**< Number of empty on GET events. */
}; } pjmedia_jb_state;
/**
* @see pjmedia_jb_state
*/
typedef struct pjmedia_jb_state pjmedia_jb_state;
/** /**
* The constant PJMEDIA_JB_DEFAULT_INIT_DELAY specifies default jitter * The constant PJMEDIA_JB_DEFAULT_INIT_DELAY specifies default jitter
* buffer prefetch count during jitter buffer creation. * buffer prefetch count during jitter buffer creation.
*/ */
#define PJMEDIA_JB_DEFAULT_INIT_DELAY 15 #define PJMEDIA_JB_DEFAULT_INIT_DELAY 15
/** /**
* Opaque declaration for jitter buffer. * Opaque declaration for jitter buffer.
*/ */
typedef struct pjmedia_jbuf pjmedia_jbuf; typedef struct pjmedia_jbuf pjmedia_jbuf;
/** /**
* Create an adaptive jitter buffer according to the specification. If * Create an adaptive jitter buffer according to the specification. If
* application wants to have a fixed jitter buffer, it may call * application wants to have a fixed jitter buffer, it may call
* #pjmedia_jbuf_set_fixed() after the jitter buffer is created. * #pjmedia_jbuf_set_fixed() after the jitter buffer is created. Also
* if application wants to alter the discard algorithm, which the default
* PJMEDIA_JB_DISCARD_PROGRESSIVE, it may call #pjmedia_jbuf_set_discard().
* *
* This function may allocate large chunk of memory to keep the frames in * This function may allocate large chunk of memory to keep the frames in
* the buffer. * the buffer.
* *
* @param pool The pool to allocate memory. * @param pool The pool to allocate memory.
* @param name Name to identify the jitter buffer for logging * @param name Name to identify the jitter buffer for logging
* purpose. * purpose.
* @param frame_size The size of each frame that will be kept in the * @param frame_size The size of each frame that will be kept in the
* jitter buffer, in bytes. This should correspond * jitter buffer, in bytes. This should correspond
* to the minimum frame size supported by the codec. * to the minimum frame size supported by the codec.
skipping to change at line 173 skipping to change at line 198
* in number of frames. * in number of frames.
* *
* @return PJ_SUCCESS on success. * @return PJ_SUCCESS on success.
*/ */
PJ_DECL(pj_status_t) pjmedia_jbuf_set_adaptive( pjmedia_jbuf *jb, PJ_DECL(pj_status_t) pjmedia_jbuf_set_adaptive( pjmedia_jbuf *jb,
unsigned prefetch, unsigned prefetch,
unsigned min_prefetch, unsigned min_prefetch,
unsigned max_prefetch); unsigned max_prefetch);
/** /**
* Set the jitter buffer discard algorithm. The default discard algorithm,
* set in jitter buffer creation, is PJMEDIA_JB_DISCARD_PROGRESSIVE.
*
* @param jb The jitter buffer.
* @param algo The discard algorithm to be used.
*
* @return PJ_SUCCESS on success.
*/
PJ_DECL(pj_status_t) pjmedia_jbuf_set_discard(pjmedia_jbuf *jb,
pjmedia_jb_discard_algo algo);
/**
* Destroy jitter buffer instance. * Destroy jitter buffer instance.
* *
* @param jb The jitter buffer. * @param jb The jitter buffer.
* *
* @return PJ_SUCCESS on success. * @return PJ_SUCCESS on success.
*/ */
PJ_DECL(pj_status_t) pjmedia_jbuf_destroy(pjmedia_jbuf *jb); PJ_DECL(pj_status_t) pjmedia_jbuf_destroy(pjmedia_jbuf *jb);
/** /**
* Restart jitter. This function flushes all packets in the buffer and * Restart jitter. This function flushes all packets in the buffer and
 End of changes. 9 change blocks. 
13 lines changed or deleted 54 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 3543 2011-04-26 03:07:24Z ming $ */ /* $Id: os_auto.h.in 3692 2011-08-11 08:45:38Z 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,
skipping to change at line 181 skipping to change at line 181
/* The type of atomic variable value: */ /* The type of atomic variable value: */
#define PJ_ATOMIC_VALUE_TYPE long #define PJ_ATOMIC_VALUE_TYPE long
#if defined(PJ_DARWINOS) && PJ_DARWINOS!=0 #if defined(PJ_DARWINOS) && PJ_DARWINOS!=0
# include "TargetConditionals.h" # include "TargetConditionals.h"
# if TARGET_OS_IPHONE # if TARGET_OS_IPHONE
# include "Availability.h" # include "Availability.h"
/* Use CFHost API for pj_getaddrinfo() (see ticket #1246) */ /* Use CFHost API for pj_getaddrinfo() (see ticket #1246) */
# define PJ_GETADDRINFO_USE_CFHOST 1 # define PJ_GETADDRINFO_USE_CFHOST 1
/* Disable local host resolution in pj_gethostip() (see ticket #1342
) */
# define PJ_GETHOSTIP_DISABLE_LOCAL_RESOLUTION 1
# ifdef __IPHONE_4_0 # ifdef __IPHONE_4_0
/* Is multitasking support available? (see ticket #1107) */ /* Is multitasking support available? (see ticket #1107) */
# define PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT 1 # define PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT 1
/* Enable activesock TCP background mode support */ /* Enable activesock TCP background mode support */
# define PJ_ACTIVESOCK_TCP_IPHONE_OS_BG 1 # define PJ_ACTIVESOCK_TCP_IPHONE_OS_BG 1
# endif # endif
# endif # endif
#endif #endif
/* If 1, use Read/Write mutex emulation for platforms that don't support it */ /* If 1, use Read/Write mutex emulation for platforms that don't support it */
 End of changes. 2 change blocks. 
1 lines changed or deleted 4 lines changed or added


 os_auto.h.in   os_auto.h.in 
/* $Id: os_auto.h.in 3543 2011-04-26 03:07:24Z ming $ */ /* $Id: os_auto.h.in 3692 2011-08-11 08:45:38Z 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,
skipping to change at line 180 skipping to change at line 180
/* The type of atomic variable value: */ /* The type of atomic variable value: */
#undef PJ_ATOMIC_VALUE_TYPE #undef PJ_ATOMIC_VALUE_TYPE
#if defined(PJ_DARWINOS) && PJ_DARWINOS!=0 #if defined(PJ_DARWINOS) && PJ_DARWINOS!=0
# include "TargetConditionals.h" # include "TargetConditionals.h"
# if TARGET_OS_IPHONE # if TARGET_OS_IPHONE
# include "Availability.h" # include "Availability.h"
/* Use CFHost API for pj_getaddrinfo() (see ticket #1246) */ /* Use CFHost API for pj_getaddrinfo() (see ticket #1246) */
# define PJ_GETADDRINFO_USE_CFHOST 1 # define PJ_GETADDRINFO_USE_CFHOST 1
/* Disable local host resolution in pj_gethostip() (see ticket #1342
) */
# define PJ_GETHOSTIP_DISABLE_LOCAL_RESOLUTION 1
# ifdef __IPHONE_4_0 # ifdef __IPHONE_4_0
/* Is multitasking support available? (see ticket #1107) */ /* Is multitasking support available? (see ticket #1107) */
# define PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT 1 # define PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT 1
/* Enable activesock TCP background mode support */ /* Enable activesock TCP background mode support */
# define PJ_ACTIVESOCK_TCP_IPHONE_OS_BG 1 # define PJ_ACTIVESOCK_TCP_IPHONE_OS_BG 1
# endif # endif
# endif # endif
#endif #endif
/* If 1, use Read/Write mutex emulation for platforms that don't support it */ /* If 1, use Read/Write mutex emulation for platforms that don't support it */
 End of changes. 2 change blocks. 
1 lines changed or deleted 4 lines changed or added


 os_symbian.h   os_symbian.h 
/* $Id: os_symbian.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: os_symbian.h 3822 2011-10-18 04:26:37Z 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 110 skipping to change at line 110
/* /*
* Declare __FD_SETSIZE now before including <linux*>. * Declare __FD_SETSIZE now before including <linux*>.
#define __FD_SETSIZE PJ_IOQUEUE_MAX_HANDLES #define __FD_SETSIZE PJ_IOQUEUE_MAX_HANDLES
*/ */
#ifndef NULL #ifndef NULL
# define NULL 0 # define NULL 0
#endif #endif
/* Endianness */
#ifndef PJ_IS_LITTLE_ENDIAN
# define PJ_IS_LITTLE_ENDIAN 1
# define PJ_IS_BIG_ENDIAN 0
#endif
/* Doesn't seem to allow more than this */ /* Doesn't seem to allow more than this */
#define PJ_IOQUEUE_MAX_HANDLES 8 #define PJ_IOQUEUE_MAX_HANDLES 8
/* /*
* Override features. * Override features.
*/ */
#define PJ_HAS_FLOATING_POINT 0 #define PJ_HAS_FLOATING_POINT 0
#define PJ_HAS_MALLOC 0 #define PJ_HAS_MALLOC 0
#define PJ_HAS_SEMAPHORE 1 #define PJ_HAS_SEMAPHORE 1
#define PJ_HAS_EVENT_OBJ 0 #define PJ_HAS_EVENT_OBJ 0
 End of changes. 2 change blocks. 
1 lines changed or deleted 7 lines changed or added


 os_win32_wince.h   os_win32_wince.h 
/* $Id: os_win32_wince.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: os_win32_wince.h 3822 2011-10-18 04:26:37Z 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 101 skipping to change at line 101
* be given correct value of nfds (i.e. largest fd + 1). This requires * be given correct value of nfds (i.e. largest fd + 1). This requires
* select ioqueue to re-scan the descriptors on each registration and * select ioqueue to re-scan the descriptors on each registration and
* unregistration. * unregistration.
* If this macro is not set, then ioqueue will always give FD_SETSIZE for * If this macro is not set, then ioqueue will always give FD_SETSIZE for
* nfds argument when calling select(). * nfds argument when calling select().
* *
* Default: 0 * Default: 0
*/ */
#define PJ_SELECT_NEEDS_NFDS 0 #define PJ_SELECT_NEEDS_NFDS 0
/* Endianness */
#ifndef PJ_IS_LITTLE_ENDIAN
# define PJ_IS_LITTLE_ENDIAN 1
# define PJ_IS_BIG_ENDIAN 0
#endif
/* Default threading is enabled, unless it's overridden. */ /* Default threading is enabled, unless it's overridden. */
#ifndef PJ_HAS_THREADS #ifndef PJ_HAS_THREADS
# define PJ_HAS_THREADS (1) # define PJ_HAS_THREADS (1)
#endif #endif
#define PJ_HAS_HIGH_RES_TIMER 1 #define PJ_HAS_HIGH_RES_TIMER 1
#define PJ_HAS_MALLOC 1 #define PJ_HAS_MALLOC 1
#define PJ_OS_HAS_CHECK_STACK 1 #define PJ_OS_HAS_CHECK_STACK 1
#define PJ_ATOMIC_VALUE_TYPE long #define PJ_ATOMIC_VALUE_TYPE long
 End of changes. 2 change blocks. 
1 lines changed or deleted 7 lines changed or added


 pjmedia-codec.h   pjmedia-codec.h 
/* $Id: pjmedia-codec.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: pjmedia-codec.h 3816 2011-10-14 04:15:15Z 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 36 skipping to change at line 36
*/ */
#include <pjmedia-codec/l16.h> #include <pjmedia-codec/l16.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>
#endif /* __PJMEDIA_CODEC_PJMEDIA_CODEC_H__ */ #endif /* __PJMEDIA_CODEC_PJMEDIA_CODEC_H__ */
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 pjsua_internal.h   pjsua_internal.h 
/* $Id: pjsua_internal.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: pjsua_internal.h 3829 2011-10-19 12:45:05Z 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 66 skipping to change at line 66
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. */
pjsua_call_media_status media_st;/**< Media state. */ pjsua_call_media_status media_st;/**< Media state. */
pjmedia_dir media_dir; /**< Media direction. */ pjmedia_dir media_dir; /**< Media direction. */
pjmedia_session *session; /**< The media session. */ pjmedia_session *session; /**< The media session. */
int audio_idx; /**< Index of m=audio in SDP. */ int audio_idx; /**< Index of m=audio in SDP. */
pj_uint32_t ssrc; /**< RTP SSRC */ pj_uint32_t ssrc; /**< RTP SSRC */
pj_uint32_t rtp_tx_ts; /**< Initial RTP timestamp for s ender. */ 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_uint16_t rtp_tx_seq;/**< Initial RTP sequence for se nder. */
pj_uint8_t rtp_tx_seq_ts_set; pj_uint8_t rtp_tx_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 .
skipping to change at line 452 skipping to change at line 453
void pjsua_pres_refresh(void); void pjsua_pres_refresh(void);
/* /*
* Update server subscription (e.g. when our online status has changed) * Update server subscription (e.g. when our online status has changed)
*/ */
void pjsua_pres_update_acc(int acc_id, pj_bool_t force); void pjsua_pres_update_acc(int acc_id, pj_bool_t force);
/* /*
* Shutdown presence. * Shutdown presence.
*/ */
void pjsua_pres_shutdown(void); void pjsua_pres_shutdown(unsigned flags);
/** /**
* Init presence for aoocunt. * Init presence for aoocunt.
*/ */
pj_status_t pjsua_pres_init_acc(int acc_id); pj_status_t pjsua_pres_init_acc(int acc_id);
/** /**
* Send PUBLISH * Send PUBLISH
*/ */
pj_status_t pjsua_pres_init_publish_acc(int acc_id); pj_status_t pjsua_pres_init_publish_acc(int acc_id);
/** /**
* Send un-PUBLISH * Send un-PUBLISH
*/ */
void pjsua_pres_unpublish(pjsua_acc *acc); void pjsua_pres_unpublish(pjsua_acc *acc, unsigned flags);
/** /**
* Terminate server subscription for the account * Terminate server subscription for the account
*/ */
void pjsua_pres_delete_acc(int acc_id); void pjsua_pres_delete_acc(int acc_id, unsigned flags);
/** /**
* Init IM module handler to handle incoming MESSAGE outside dialog. * Init IM module handler to handle incoming MESSAGE outside dialog.
*/ */
pj_status_t pjsua_im_init(void); pj_status_t pjsua_im_init(void);
/** /**
* Start MWI subscription * Start MWI subscription
*/ */
void pjsua_start_mwi(pjsua_acc *acc); void pjsua_start_mwi(pjsua_acc *acc);
skipping to change at line 507 skipping to change at line 508
pj_status_t pjsua_media_subsys_init(const pjsua_media_config *cfg); pj_status_t pjsua_media_subsys_init(const pjsua_media_config *cfg);
/** /**
* Start pjsua media subsystem. * Start pjsua media subsystem.
*/ */
pj_status_t pjsua_media_subsys_start(void); pj_status_t pjsua_media_subsys_start(void);
/** /**
* Destroy pjsua media subsystem. * Destroy pjsua media subsystem.
*/ */
pj_status_t pjsua_media_subsys_destroy(void); pj_status_t pjsua_media_subsys_destroy(unsigned flags);
/** /**
* Private: check if we can accept the message. * Private: check if we can accept the message.
* If not, then p_accept header will be filled with a valid * If not, then p_accept header will be filled with a valid
* Accept header. * Accept header.
*/ */
pj_bool_t pjsua_im_accept_pager(pjsip_rx_data *rdata, pj_bool_t pjsua_im_accept_pager(pjsip_rx_data *rdata,
pjsip_accept_hdr **p_accept_hdr); pjsip_accept_hdr **p_accept_hdr);
/** /**
 End of changes. 6 change blocks. 
5 lines changed or deleted 6 lines changed or added


 session.h   session.h 
/* $Id: session.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: session.h 3571 2011-05-19 08:05: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 226 skipping to change at line 226
* @param index The stream index. * @param index The stream index.
* @param dir The media direction to activate. * @param dir The media direction to activate.
* *
* @return PJ_SUCCESS on success. * @return PJ_SUCCESS on success.
*/ */
PJ_DECL(pj_status_t) pjmedia_session_resume_stream(pjmedia_session *session , PJ_DECL(pj_status_t) pjmedia_session_resume_stream(pjmedia_session *session ,
unsigned index, unsigned index,
pjmedia_dir dir); pjmedia_dir dir);
/** /**
* Send RTCP SDES for the session.
*
* @param session The media session.
*
* @return PJ_SUCCESS on success.
*/
PJ_DECL(pj_status_t)
pjmedia_session_send_rtcp_sdes( const pjmedia_session *session );
/**
* Send RTCP BYE for the session.
*
* @param session The media session.
*
* @return PJ_SUCCESS on success.
*/
PJ_DECL(pj_status_t)
pjmedia_session_send_rtcp_bye( const pjmedia_session *session );
/**
* Enumerate media streams in the session. * Enumerate media streams in the session.
* *
* @param session The media session. * @param session The media session.
* @param count On input, specifies the number of elements i n * @param count On input, specifies the number of elements i n
* the array. On output, the number will be filled * the array. On output, the number will be filled
* with number of streams in the session. * with number of streams in the session.
* @param strm_info Array of stream info. * @param strm_info Array of stream info.
* *
* @return PJ_SUCCESS on success. * @return PJ_SUCCESS on success.
*/ */
 End of changes. 2 change blocks. 
1 lines changed or deleted 21 lines changed or added


 sip_config.h   sip_config.h 
/* $Id: sip_config.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: sip_config.h 3586 2011-06-16 13:15:04Z 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 641 skipping to change at line 641
# define PJSIP_POOL_TSX_LEN 1536 /* 768 */ # define PJSIP_POOL_TSX_LEN 1536 /* 768 */
#endif #endif
/** /**
* Memory increment for transaction object. * Memory increment for transaction object.
*/ */
#ifndef PJSIP_POOL_TSX_INC #ifndef PJSIP_POOL_TSX_INC
# define PJSIP_POOL_TSX_INC 256 # define PJSIP_POOL_TSX_INC 256
#endif #endif
/**
* Delay for non-100 1xx retransmission, in seconds.
* Set to 0 to disable this feature.
*
* Default: 60 seconds
*/
#ifndef PJSIP_TSX_1XX_RETRANS_DELAY
# define PJSIP_TSX_1XX_RETRANS_DELAY 60
#endif
#define PJSIP_MAX_TSX_KEY_LEN (PJSIP_MAX_URL_SIZE*2) #define PJSIP_MAX_TSX_KEY_LEN (PJSIP_MAX_URL_SIZE*2)
/* User agent. */ /* User agent. */
#define PJSIP_POOL_LEN_USER_AGENT 1024 #define PJSIP_POOL_LEN_USER_AGENT 1024
#define PJSIP_POOL_INC_USER_AGENT 1024 #define PJSIP_POOL_INC_USER_AGENT 1024
/* Message/URL related constants. */ /* Message/URL related constants. */
#define PJSIP_MAX_CALL_ID_LEN pj_GUID_STRING_LENGTH() #define PJSIP_MAX_CALL_ID_LEN pj_GUID_STRING_LENGTH()
#define PJSIP_MAX_TAG_LEN pj_GUID_STRING_LENGTH() #define PJSIP_MAX_TAG_LEN pj_GUID_STRING_LENGTH()
#define PJSIP_MAX_BRANCH_LEN (PJSIP_RFC3261_BRANCH_LEN + pj_GUID_ STRING_LENGTH() + 2) #define PJSIP_MAX_BRANCH_LEN (PJSIP_RFC3261_BRANCH_LEN + pj_GUID_ STRING_LENGTH() + 2)
 End of changes. 2 change blocks. 
1 lines changed or deleted 11 lines changed or added


 sip_endpoint.h   sip_endpoint.h 
/* $Id: sip_endpoint.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: sip_endpoint.h 3828 2011-10-19 10:13: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 59 skipping to change at line 59
* - it receives incoming messages from transport layer and automatically * - it receives incoming messages from transport layer and automatically
* dispatches them to the correct transaction (or create a new one). * dispatches them to the correct transaction (or create a new one).
* - it has a single instance of timer management (timer heap). * - it has a single instance of timer management (timer heap).
* - it manages modules, which is the primary means of extending the libra ry. * - it manages modules, which is the primary means of extending the libra ry.
* - it provides single polling function for all objects and distributes * - it provides single polling function for all objects and distributes
* events. * events.
* - it automatically handles incoming requests which can not be handled b y * - it automatically handles incoming requests which can not be handled b y
* existing modules (such as when incoming request has unsupported metho d). * existing modules (such as when incoming request has unsupported metho d).
* - and so on.. * - and so on..
* *
* Theoritically application can have multiple instances of SIP endpoint, * Application should only instantiate one SIP endpoint instance for every
* although it's not clear why application may want to do it. * process.
* *
* @{ * @{
*/ */
/** /**
* Create an instance of SIP endpoint from the specified pool factory. * Create an instance of SIP endpoint from the specified pool factory.
* The pool factory reference then will be kept by the endpoint, so that * The pool factory reference then will be kept by the endpoint, so that
* future memory allocations by SIP components will be taken from the same * future memory allocations by SIP components will be taken from the same
* pool factory. * pool factory.
* *
 End of changes. 2 change blocks. 
3 lines changed or deleted 3 lines changed or added


 sip_inv.h   sip_inv.h 
/* $Id: sip_inv.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: sip_inv.h 3598 2011-06-24 07:35:28Z 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 364 skipping to change at line 364
char obj_name[PJ_MAX_OBJ_NAME]; /**< Log identification */ char obj_name[PJ_MAX_OBJ_NAME]; /**< Log identification */
pj_pool_t *pool; /**< Long term pool. */ pj_pool_t *pool; /**< Long term pool. */
pj_pool_t *pool_prov; /**< Provisional pool */ pj_pool_t *pool_prov; /**< Provisional pool */
pj_pool_t *pool_active; /**< Active/current pool */ pj_pool_t *pool_active; /**< Active/current pool */
pjsip_inv_state state; /**< Invite sess state. */ pjsip_inv_state state; /**< Invite sess state. */
pj_bool_t cancelling; /**< CANCEL requested */ pj_bool_t cancelling; /**< CANCEL requested */
pj_bool_t pending_cancel; /**< Wait to send CANCEL */ pj_bool_t pending_cancel; /**< Wait to send CANCEL */
pjsip_status_code cause; /**< Disconnect cause. */ pjsip_status_code cause; /**< Disconnect cause. */
pj_str_t cause_text; /**< Cause text. */ pj_str_t cause_text; /**< Cause text. */
pj_bool_t notify; /**< Internal. */ pj_bool_t notify; /**< Internal. */
unsigned cb_called; /**< Cb has been called */
pjsip_dialog *dlg; /**< Underlying dialog. */ pjsip_dialog *dlg; /**< Underlying dialog. */
pjsip_role_e role; /**< Invite role. */ pjsip_role_e role; /**< Invite role. */
unsigned options; /**< Options in use. */ unsigned options; /**< Options in use. */
pjmedia_sdp_neg *neg; /**< Negotiator. */ pjmedia_sdp_neg *neg; /**< Negotiator. */
pjsip_transaction *invite_tsx; /**< 1st invite tsx. */ pjsip_transaction *invite_tsx; /**< 1st invite tsx. */
pjsip_tx_data *invite_req; /**< Saved invite req */ pjsip_tx_data *invite_req; /**< Saved invite req */
pjsip_tx_data *last_answer; /**< Last INVITE resp. */ pjsip_tx_data *last_answer; /**< Last INVITE resp. */
pjsip_tx_data *last_ack; /**< Last ACK request */ pjsip_tx_data *last_ack; /**< Last ACK request */
pj_int32_t last_ack_cseq; /**< CSeq of last ACK */ pj_int32_t last_ack_cseq; /**< CSeq of last ACK */
void *mod_data[PJSIP_MAX_MODULE];/**< Modules data. */ void *mod_data[PJSIP_MAX_MODULE];/**< Modules data. */
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 sock.h   sock.h 
/* $Id: sock.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: sock.h 3741 2011-08-30 01:45:07Z 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 480 skipping to change at line 480
* Maximum length of text representation of an IPv4 address. * Maximum length of text representation of an IPv4 address.
*/ */
#define PJ_INET_ADDRSTRLEN 16 #define PJ_INET_ADDRSTRLEN 16
/** /**
* Maximum length of text representation of an IPv6 address. * Maximum length of text representation of an IPv6 address.
*/ */
#define PJ_INET6_ADDRSTRLEN 46 #define PJ_INET6_ADDRSTRLEN 46
/** /**
* The size of sin_zero field in pj_sockaddr_in structure. Most OSes
* use 8, but others such as the BSD TCP/IP stack in eCos uses 24.
*/
#ifndef PJ_SOCKADDR_IN_SIN_ZERO_LEN
# define PJ_SOCKADDR_IN_SIN_ZERO_LEN 8
#endif
/**
* This structure describes Internet socket address. * This structure describes Internet socket address.
* If PJ_SOCKADDR_HAS_LEN is not zero, then sin_zero_len member is added * If PJ_SOCKADDR_HAS_LEN is not zero, then sin_zero_len member is added
* to this struct. As far the application is concerned, the value of * to this struct. As far the application is concerned, the value of
* this member will always be zero. Internally, PJLIB may modify the value * this member will always be zero. Internally, PJLIB may modify the value
* before calling OS socket API, and reset the value back to zero before * before calling OS socket API, and reset the value back to zero before
* returning the struct to application. * returning the struct to application.
*/ */
struct pj_sockaddr_in struct pj_sockaddr_in
{ {
#if defined(PJ_SOCKADDR_HAS_LEN) && PJ_SOCKADDR_HAS_LEN!=0 #if defined(PJ_SOCKADDR_HAS_LEN) && PJ_SOCKADDR_HAS_LEN!=0
pj_uint8_t sin_zero_len; /**< Just ignore this. */ pj_uint8_t sin_zero_len; /**< Just ignore this. */
pj_uint8_t sin_family; /**< Address family. */ pj_uint8_t sin_family; /**< Address family. */
#else #else
pj_uint16_t sin_family; /**< Address family. */ pj_uint16_t sin_family; /**< Address family. */
#endif #endif
pj_uint16_t sin_port; /**< Transport layer port number. */ pj_uint16_t sin_port; /**< Transport layer port number. */
pj_in_addr sin_addr; /**< IP address. */ pj_in_addr sin_addr; /**< IP address. */
char sin_zero[8]; /**< Padding. */ char sin_zero[PJ_SOCKADDR_IN_SIN_ZERO_LEN]; /**< Padding.*/
}; };
#undef s6_addr #undef s6_addr
/** /**
* This structure describes IPv6 address. * This structure describes IPv6 address.
*/ */
typedef union pj_in6_addr typedef union pj_in6_addr
{ {
/* This is the main entry */ /* This is the main entry */
 End of changes. 3 change blocks. 
2 lines changed or deleted 10 lines changed or added


 stream.h   stream.h 
/* $Id: stream.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: stream.h 3571 2011-05-19 08:05: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 134 skipping to change at line 134
delay in msec (-1 for default). */ delay in msec (-1 for default). */
int jb_max_pre; /**< Jitter buffer maximum prefe tch int jb_max_pre; /**< Jitter buffer maximum prefe tch
delay in msec (-1 for default). */ delay in msec (-1 for default). */
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;
/**< Disable automatic sending of RTCP
SDES and BYE.
*/
}; };
/** /**
* @see pjmedia_stream_info. * @see pjmedia_stream_info.
*/ */
typedef struct pjmedia_stream_info pjmedia_stream_info; typedef struct pjmedia_stream_info pjmedia_stream_info;
/** /**
* 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
skipping to change at line 359 skipping to change at line 362
* @return PJ_SUCCESS on success. * @return PJ_SUCCESS on success.
*/ */
PJ_DECL(pj_status_t) PJ_DECL(pj_status_t)
pjmedia_stream_set_dtmf_callback(pjmedia_stream *stream, pjmedia_stream_set_dtmf_callback(pjmedia_stream *stream,
void (*cb)(pjmedia_stream*, void (*cb)(pjmedia_stream*,
void *user_data, void *user_data,
int digit), int digit),
void *user_data); void *user_data);
/** /**
* Send RTCP SDES for the media stream.
*
* @param stream The media stream.
*
* @return PJ_SUCCESS on success.
*/
PJ_DECL(pj_status_t)
pjmedia_stream_send_rtcp_sdes( pjmedia_stream *stream );
/**
* Send RTCP BYE for the media stream.
*
* @param stream The media stream.
*
* @return PJ_SUCCESS on success.
*/
PJ_DECL(pj_status_t)
pjmedia_stream_send_rtcp_bye( pjmedia_stream *stream );
/**
* @} * @}
*/ */
PJ_END_DECL PJ_END_DECL
#endif /* __PJMEDIA_STREAM_H__ */ #endif /* __PJMEDIA_STREAM_H__ */
 End of changes. 3 change blocks. 
1 lines changed or deleted 25 lines changed or added


 transport_adapter_sample.h   transport_adapter_sample.h 
/* $Id: transport_adapter_sample.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: transport_adapter_sample.h 3804 2011-10-09 10:58:38Z 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 49 skipping to change at line 49
PJ_BEGIN_DECL PJ_BEGIN_DECL
/** /**
* Create the transport adapter, specifying the underlying transport to be * Create the transport adapter, specifying the underlying transport to be
* used to send and receive RTP/RTCP packets. * used to send and receive RTP/RTCP packets.
* *
* @param endpt The media endpoint. * @param endpt The media endpoint.
* @param name Optional name to identify this media transport * @param name Optional name to identify this media transport
* for logging purposes. * for logging purposes.
* @param transport The underlying media transport to send and receive * @param base_tp The base/underlying media transport to send and
* RTP/RTCP packets. * receive RTP/RTCP packets.
* @param del_base Specify whether the base transport should also be
* destroyed when destroy() is called upon us.
* @param p_tp Pointer to receive the media transport instance. * @param p_tp Pointer to receive the media transport instance.
* *
* @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_tp_adapter_create( pjmedia_endpt *endpt, PJ_DECL(pj_status_t) pjmedia_tp_adapter_create( pjmedia_endpt *endpt,
const char *name, const char *name,
pjmedia_transport *transport pjmedia_transport *base_tp,
, pj_bool_t del_base,
pjmedia_transport **p_tp); pjmedia_transport **p_tp);
PJ_END_DECL PJ_END_DECL
/** /**
* @} * @}
*/ */
#endif /* __PJMEDIA_TRANSPORT_ADAPTER_SAMPLE_H__ */ #endif /* __PJMEDIA_TRANSPORT_ADAPTER_SAMPLE_H__ */
 End of changes. 3 change blocks. 
5 lines changed or deleted 7 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/