activesock.h   activesock.h 
/* $Id: activesock.h 2039 2008-06-20 22:44:47Z bennylp $ */ /* $Id: activesock.h 2187 2008-08-04 09:59:02Z bennylp $ */
/* /*
* 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,
* 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 202 skipping to change at line 202
* When this value is -1, the concurrency setting will not be forced fo r * When this value is -1, the concurrency setting will not be forced fo r
* this socket, and the socket will inherit the concurrency setting of * this socket, and the socket will inherit the concurrency setting of
* the ioqueue. When this value is zero, the active socket will disable * the ioqueue. When this value is zero, the active socket will disable
* concurrency for the socket. When this value is +1, the active socket * concurrency for the socket. When this value is +1, the active socket
* will enable concurrency for the socket. * will enable concurrency for the socket.
* *
* The default value is -1. * The default value is -1.
*/ */
int concurrency; int concurrency;
/**
* If this option is specified, the active socket will make sure that
* asynchronous send operation with stream oriented socket will only
* call the callback after all data has been sent. This means that the
* active socket will automatically resend the remaining data until
* all data has been sent.
*
* Please note that when this option is specified, it is possible that
* error is reported after partial data has been sent. Also setting
* this will disable the ioqueue concurrency for the socket.
*
* Default value is 1.
*/
pj_bool_t whole_data;
} pj_activesock_cfg; } pj_activesock_cfg;
/** /**
* Initialize the active socket configuration with the default values. * Initialize the active socket configuration with the default values.
* *
* @param cfg The configuration to be initialized. * @param cfg The configuration to be initialized.
*/ */
PJ_DECL(void) pj_activesock_cfg_default(pj_activesock_cfg *cfg); PJ_DECL(void) pj_activesock_cfg_default(pj_activesock_cfg *cfg);
/** /**
skipping to change at line 337 skipping to change at line 352
* *
* @return PJ_SUCCESS if the operation has been successful, * @return PJ_SUCCESS if the operation has been successful,
* or the appropriate error code on failure. * or the appropriate error code on failure.
*/ */
PJ_DECL(pj_status_t) pj_activesock_start_read(pj_activesock_t *asock, PJ_DECL(pj_status_t) pj_activesock_start_read(pj_activesock_t *asock,
pj_pool_t *pool, pj_pool_t *pool,
unsigned buff_size, unsigned buff_size,
pj_uint32_t flags); pj_uint32_t flags);
/** /**
* Same as #pj_activesock_start_read(), except that the application
* supplies the buffers for the read operation so that the acive socket
* does not have to allocate the buffers.
*
* @param asock The active socket.
* @param pool Pool used to allocate buffers for incoming data.
* @param buff_size The size of each buffer, in bytes.
* @param readbuf Array of packet buffers, each has buff_size size.
* @param flags Flags to be given to pj_ioqueue_recv().
*
* @return PJ_SUCCESS if the operation has been successful,
* or the appropriate error code on failure.
*/
PJ_DECL(pj_status_t) pj_activesock_start_read2(pj_activesock_t *asock,
pj_pool_t *pool,
unsigned buff_size,
void *readbuf[],
pj_uint32_t flags);
/**
* Same as pj_activesock_start_read(), except that this function is used * Same as pj_activesock_start_read(), except that this function is used
* only for datagram sockets, and it will trigger \a on_data_recvfrom() * only for datagram sockets, and it will trigger \a on_data_recvfrom()
* callback instead. * callback instead.
* *
* @param asock The active socket. * @param asock The active socket.
* @param pool Pool used to allocate buffers for incoming data. * @param pool Pool used to allocate buffers for incoming data.
* @param buff_size The size of each buffer, in bytes. * @param buff_size The size of each buffer, in bytes.
* @param flags Flags to be given to pj_ioqueue_recvfrom(). * @param flags Flags to be given to pj_ioqueue_recvfrom().
* *
* @return PJ_SUCCESS if the operation has been successful, * @return PJ_SUCCESS if the operation has been successful,
* or the appropriate error code on failure. * or the appropriate error code on failure.
*/ */
PJ_DECL(pj_status_t) pj_activesock_start_recvfrom(pj_activesock_t *asock, PJ_DECL(pj_status_t) pj_activesock_start_recvfrom(pj_activesock_t *asock,
pj_pool_t *pool, pj_pool_t *pool,
unsigned buff_size, unsigned buff_size,
pj_uint32_t flags); pj_uint32_t flags);
/** /**
* Same as #pj_activesock_start_recvfrom() except that the recvfrom()
* operation takes the buffer from the argument rather than creating
* new ones.
*
* @param asock The active socket.
* @param pool Pool used to allocate buffers for incoming data.
* @param buff_size The size of each buffer, in bytes.
* @param readbuf Array of packet buffers, each has buff_size size.
* @param flags Flags to be given to pj_ioqueue_recvfrom().
*
* @return PJ_SUCCESS if the operation has been successful,
* or the appropriate error code on failure.
*/
PJ_DECL(pj_status_t) pj_activesock_start_recvfrom2(pj_activesock_t *asock,
pj_pool_t *pool,
unsigned buff_size,
void *readbuf[],
pj_uint32_t flags);
/**
* Send data using the socket. * Send data using the socket.
* *
* @param asock The active socket. * @param asock The active socket.
* @param send_key The operation key to send the data, which is useful * @param send_key The operation key to send the data, which is useful
* if application wants to submit multiple pending * if application wants to submit multiple pending
* send operations and want to track which exact data * send operations and want to track which exact data
* has been sent in the \a on_data_sent() callback. * has been sent in the \a on_data_sent() callback.
* @param data The data to be sent. This data must remain valid * @param data The data to be sent. This data must remain valid
* until the data has been sent. * until the data has been sent.
* @param size The size of the data. * @param size The size of the data.
skipping to change at line 409 skipping to change at line 464
* value indicates error condition. * value indicates error condition.
*/ */
PJ_DECL(pj_status_t) pj_activesock_sendto(pj_activesock_t *asock, PJ_DECL(pj_status_t) pj_activesock_sendto(pj_activesock_t *asock,
pj_ioqueue_op_key_t *send_key, pj_ioqueue_op_key_t *send_key,
const void *data, const void *data,
pj_ssize_t *size, pj_ssize_t *size,
unsigned flags, unsigned flags,
const pj_sockaddr_t *addr, const pj_sockaddr_t *addr,
int addr_len); int addr_len);
#if PJ_HAS_TCP
/** /**
* Starts asynchronous socket accept() operations on this active socket. * Starts asynchronous socket accept() operations on this active socket.
* Application must bind the socket before calling this function. This * Application must bind the socket before calling this function. This
* function will issue \a async_cnt number of asynchronous \a accept() * function will issue \a async_cnt number of asynchronous \a accept()
* operations to the socket and returns back to caller. Incoming * operations to the socket and returns back to caller. Incoming
* connection on the socket will be reported back to application via the * connection on the socket will be reported back to application via the
* \a on_accept_complete() callback. * \a on_accept_complete() callback.
* *
* Application only needs to call this function once to initiate accept() * Application only needs to call this function once to initiate accept()
* operations. Further accept() operations will be done automatically by * operations. Further accept() operations will be done automatically by
skipping to change at line 453 skipping to change at line 509
* or PJ_EPENDING if connection cannot be established * or PJ_EPENDING if connection cannot be established
* immediately. In this case the \a on_connect_complete() * immediately. In this case the \a on_connect_complete()
* callback will be called when connection is complete. * callback will be called when connection is complete.
* Any other return value indicates error condition. * Any other return value indicates error condition.
*/ */
PJ_DECL(pj_status_t) pj_activesock_start_connect(pj_activesock_t *asock, PJ_DECL(pj_status_t) pj_activesock_start_connect(pj_activesock_t *asock,
pj_pool_t *pool, pj_pool_t *pool,
const pj_sockaddr_t *remadd r, const pj_sockaddr_t *remadd r,
int addr_len); int addr_len);
#endif /* PJ_HAS_TCP */
/** /**
* @} * @}
*/ */
PJ_END_DECL PJ_END_DECL
#endif /* __PJ_ASYNCSOCK_H__ */ #endif /* __PJ_ASYNCSOCK_H__ */
 End of changes. 6 change blocks. 
1 lines changed or deleted 59 lines changed or added


 codec.h   codec.h 
/* $Id: codec.h 2039 2008-06-20 22:44:47Z bennylp $ */ /* $Id: codec.h 2236 2008-08-25 13:58:25Z nanang $ */
/* /*
* 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,
* 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 194 skipping to change at line 194
/** /**
* Standard RTP static payload types, as defined by RFC 3551. * Standard RTP static payload types, as defined by RFC 3551.
* The header file <pjmedia-codec/types.h> also declares dynamic payload * The header file <pjmedia-codec/types.h> also declares dynamic payload
* type numbers that are used by PJMEDIA when advertising the capability * type numbers that are used by PJMEDIA when advertising the capability
* for example in SDP message. * for example in SDP message.
*/ */
enum pjmedia_rtp_pt enum pjmedia_rtp_pt
{ {
PJMEDIA_RTP_PT_PCMU = 0, /**< audio PCMU */ PJMEDIA_RTP_PT_PCMU = 0, /**< audio PCMU */
PJMEDIA_RTP_PT_G726_32 = 2, /**< audio G726-32 */
PJMEDIA_RTP_PT_GSM = 3, /**< audio GSM */ PJMEDIA_RTP_PT_GSM = 3, /**< audio GSM */
PJMEDIA_RTP_PT_G723 = 4, /**< audio G723 */ PJMEDIA_RTP_PT_G723 = 4, /**< audio G723 */
PJMEDIA_RTP_PT_DVI4_8K = 5, /**< audio DVI4 8KHz */ PJMEDIA_RTP_PT_DVI4_8K = 5, /**< audio DVI4 8KHz */
PJMEDIA_RTP_PT_DVI4_16K = 6, /**< audio DVI4 16Khz */ PJMEDIA_RTP_PT_DVI4_16K = 6, /**< audio DVI4 16Khz */
PJMEDIA_RTP_PT_LPC = 7, /**< audio LPC */ PJMEDIA_RTP_PT_LPC = 7, /**< audio LPC */
PJMEDIA_RTP_PT_PCMA = 8, /**< audio PCMA */ PJMEDIA_RTP_PT_PCMA = 8, /**< audio PCMA */
PJMEDIA_RTP_PT_G722 = 9, /**< audio G722 */ PJMEDIA_RTP_PT_G722 = 9, /**< audio G722 */
PJMEDIA_RTP_PT_L16_2 = 10, /**< audio 16bit linear 44.1KHz stereo */ PJMEDIA_RTP_PT_L16_2 = 10, /**< audio 16bit linear 44.1KHz stereo */
PJMEDIA_RTP_PT_L16_1 = 11, /**< audio 16bit linear 44.1KHz mono */ PJMEDIA_RTP_PT_L16_1 = 11, /**< audio 16bit linear 44.1KHz mono */
PJMEDIA_RTP_PT_QCELP = 12, /**< audio QCELP */ PJMEDIA_RTP_PT_QCELP = 12, /**< audio QCELP */
skipping to change at line 236 skipping to change at line 237
*/ */
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.
* The codec specific parameters are to be used with SDP according to
* the standards (e.g: RFC 3555).
*/
typedef struct pjmedia_codec_fmtp
{
pj_uint8_t cnt;
struct param {
pj_str_t name;
pj_str_t val;
} param [PJMEDIA_CODEC_MAX_FMTP_CNT];
} pjmedia_codec_fmtp;
/** /**
* Detailed codec attributes used both to configure a codec and to query * Detailed codec attributes used both to configure a codec and to query
* the capability of codec factories. * the capability of codec factories.
*/ */
typedef struct pjmedia_codec_param typedef struct pjmedia_codec_param
{ {
/** /**
* The "info" part of codec param describes the capability of the codec , * The "info" part of codec param describes the capability of the codec ,
* and the value should NOT be changed by application. * and the value should NOT be changed by application.
*/ */
skipping to change at line 274 skipping to change at line 291
* capabilities are supported by the codec. Application may change the * capabilities are supported by the codec. Application may change the
* settings here before instantiating the codec/stream. * settings here before instantiating the codec/stream.
*/ */
struct { struct {
pj_uint8_t frm_per_pkt; /**< Number of frames per packet. */ pj_uint8_t frm_per_pkt; /**< Number of frames per packet. */
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. */
pj_uint8_t enc_fmtp_mode; /**< Mode param in fmtp (def:0) */ pjmedia_codec_fmtp enc_fmtp;/**< Encoder's fmtp params. */
pj_uint8_t dec_fmtp_mode; /**< Mode param in fmtp (def:0) */ pjmedia_codec_fmtp dec_fmtp;/**< Decoder's fmtp params. */
} setting; } setting;
} pjmedia_codec_param; } pjmedia_codec_param;
/* /*
* 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
 End of changes. 4 change blocks. 
3 lines changed or deleted 20 lines changed or added


 config.h   config.h 
/* $Id: config.h 2039 2008-06-20 22:44:47Z bennylp $ */ /* $Id: config.h 2112 2008-07-07 21:31:02Z bennylp $ */
/* /*
* 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,
* 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 588 skipping to change at line 588
* is lower than FD_SETSIZE value. * is lower than FD_SETSIZE value.
*/ */
# ifdef FD_SETSIZE # ifdef FD_SETSIZE
# if PJ_IOQUEUE_MAX_HANDLES > FD_SETSIZE # if PJ_IOQUEUE_MAX_HANDLES > FD_SETSIZE
# error "PJ_IOQUEUE_MAX_HANDLES is greater than FD_SETSIZE" # error "PJ_IOQUEUE_MAX_HANDLES is greater than FD_SETSIZE"
# endif # endif
# endif # endif
#endif #endif
/** /**
* Specify whether #pj_enum_ip_interface() function should exclude
* loopback interfaces.
*
* Default: 1
*/
#ifndef PJ_IP_HELPER_IGNORE_LOOPBACK_IF
# define PJ_IP_HELPER_IGNORE_LOOPBACK_IF 1
#endif
/**
* Has semaphore functionality? * Has semaphore functionality?
* *
* Default: 1 * Default: 1
*/ */
#ifndef PJ_HAS_SEMAPHORE #ifndef PJ_HAS_SEMAPHORE
# define PJ_HAS_SEMAPHORE 1 # define PJ_HAS_SEMAPHORE 1
#endif #endif
/** /**
* Event object (for synchronization, e.g. in Win32) * Event object (for synchronization, e.g. in Win32)
 End of changes. 2 change blocks. 
1 lines changed or deleted 11 lines changed or added


 config_site_sample.h   config_site_sample.h 
skipping to change at line 31 skipping to change at line 31
/*# define PJMEDIA_HAS_ILBC_CODEC 0*/ /*# define PJMEDIA_HAS_ILBC_CODEC 0*/
/*# define PJMEDIA_HAS_SPEEX_CODEC 0*/ /*# define PJMEDIA_HAS_SPEEX_CODEC 0*/
# define PJMEDIA_HAS_SPEEX_AEC 0 # define PJMEDIA_HAS_SPEEX_AEC 0
# undef PJMEDIA_RESAMPLE_IMP # undef PJMEDIA_RESAMPLE_IMP
# define PJMEDIA_RESAMPLE_IMP PJMEDIA_RESAMPLE_LIBRESAMPLE # define PJMEDIA_RESAMPLE_IMP PJMEDIA_RESAMPLE_LIBRESAMPLE
# define PJMEDIA_WSOLA_IMP PJMEDIA_WSOLA_IMP_WSOLA_LITE # define PJMEDIA_WSOLA_IMP PJMEDIA_WSOLA_IMP_WSOLA_LITE
/* Speex default quality settings */ /* Speex default quality settings */
# define PJSUA_DEFAULT_CODEC_QUALITY 5 # define PJSUA_DEFAULT_CODEC_QUALITY 5
# define PJMEDIA_CODEC_SPEEX_DEFAULT_QUALITY 5 # define PJMEDIA_CODEC_SPEEX_DEFAULT_QUALITY 5
# define PJMEDIA_SDP_NEG_PREFER_REMOTE_CODEC_ORDER 0
#endif #endif
/* /*
* Typical configuration for Symbian OS target * Typical configuration for Symbian OS target
*/ */
#if defined(PJ_SYMBIAN) && PJ_SYMBIAN!=0 #if defined(PJ_SYMBIAN) && PJ_SYMBIAN!=0
/* We don't want to use float, for now */ /* We don't want to use float, for now */
# undef PJ_HAS_FLOATING_POINT # undef PJ_HAS_FLOATING_POINT
# define PJ_HAS_FLOATING_POINT 0 # define PJ_HAS_FLOATING_POINT 0
 End of changes. 1 change blocks. 
0 lines changed or deleted 2 lines changed or added


 ctype.h   ctype.h 
/* $Id: ctype.h 2039 2008-06-20 22:44:47Z bennylp $ */ /* $Id: ctype.h 2307 2008-09-23 09:11:20Z bennylp $ */
/* /*
* 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,
* 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 47 skipping to change at line 47
* This module contains several inline functions/macros for testing or * This module contains several inline functions/macros for testing or
* manipulating character types. It is provided in PJLIB because PJLIB * manipulating character types. It is provided in PJLIB because PJLIB
* must not depend to LIBC. * must not depend to LIBC.
*/ */
/** /**
* Returns a non-zero value if either isalpha or isdigit is true for c. * Returns a non-zero value if either isalpha or isdigit is true for c.
* @param c The integer character to test. * @param c The integer character to test.
* @return Non-zero value if either isalpha or isdigit is true for c. * @return Non-zero value if either isalpha or isdigit is true for c.
*/ */
PJ_INLINE(int) pj_isalnum(int c) { return isalnum(c); } PJ_INLINE(int) pj_isalnum(unsigned char c) { return isalnum(c); }
/** /**
* Returns a non-zero value if c is a particular representation of an * Returns a non-zero value if c is a particular representation of an
* alphabetic character. * alphabetic character.
* @param c The integer character to test. * @param c The integer character to test.
* @return Non-zero value if c is a particular representation of an * @return Non-zero value if c is a particular representation of an
* alphabetic character. * alphabetic character.
*/ */
PJ_INLINE(int) pj_isalpha(int c) { return isalpha(c); } PJ_INLINE(int) pj_isalpha(unsigned char c) { return isalpha(c); }
/** /**
* Returns a non-zero value if c is a particular representation of an * Returns a non-zero value if c is a particular representation of an
* ASCII character. * ASCII character.
* @param c The integer character to test. * @param c The integer character to test.
* @return Non-zero value if c is a particular representation of * @return Non-zero value if c is a particular representation of
* an ASCII character. * an ASCII character.
*/ */
PJ_INLINE(int) pj_isascii(int c) { return c<128 && c>=0; } PJ_INLINE(int) pj_isascii(unsigned char c) { return c<128; }
/** /**
* Returns a non-zero value if c is a particular representation of * Returns a non-zero value if c is a particular representation of
* a decimal-digit character. * a decimal-digit character.
* @param c The integer character to test. * @param c The integer character to test.
* @return Non-zero value if c is a particular representation of * @return Non-zero value if c is a particular representation of
* a decimal-digit character. * a decimal-digit character.
*/ */
PJ_INLINE(int) pj_isdigit(int c) { return isdigit(c); } PJ_INLINE(int) pj_isdigit(unsigned char c) { return isdigit(c); }
/** /**
* Returns a non-zero value if c is a particular representation of * Returns a non-zero value if c is a particular representation of
* a space character (0x09 - 0x0D or 0x20). * a space character (0x09 - 0x0D or 0x20).
* @param c The integer character to test. * @param c The integer character to test.
* @return Non-zero value if c is a particular representation of * @return Non-zero value if c is a particular representation of
* a space character (0x09 - 0x0D or 0x20). * a space character (0x09 - 0x0D or 0x20).
*/ */
PJ_INLINE(int) pj_isspace(int c) { return isspace(c); } PJ_INLINE(int) pj_isspace(unsigned char c) { return isspace(c); }
/** /**
* Returns a non-zero value if c is a particular representation of * Returns a non-zero value if c is a particular representation of
* a lowercase character. * a lowercase character.
* @param c The integer character to test. * @param c The integer character to test.
* @return Non-zero value if c is a particular representation of * @return Non-zero value if c is a particular representation of
* a lowercase character. * a lowercase character.
*/ */
PJ_INLINE(int) pj_islower(int c) { return islower(c); } PJ_INLINE(int) pj_islower(unsigned char c) { return islower(c); }
/** /**
* Returns a non-zero value if c is a particular representation of * Returns a non-zero value if c is a particular representation of
* a uppercase character. * a uppercase character.
* @param c The integer character to test. * @param c The integer character to test.
* @return Non-zero value if c is a particular representation of * @return Non-zero value if c is a particular representation of
* a uppercase character. * a uppercase character.
*/ */
PJ_INLINE(int) pj_isupper(int c) { return isupper(c); } PJ_INLINE(int) pj_isupper(unsigned char c) { return isupper(c); }
/** /**
* Returns a non-zero value if c is a either a space (' ') or horizontal * Returns a non-zero value if c is a either a space (' ') or horizontal
* tab ('\\t') character. * tab ('\\t') character.
* @param c The integer character to test. * @param c The integer character to test.
* @return Non-zero value if c is a either a space (' ') or horizontal * @return Non-zero value if c is a either a space (' ') or horizontal
* tab ('\\t') character. * tab ('\\t') character.
*/ */
PJ_INLINE(int) pj_isblank(int c) { return isblank(c); } PJ_INLINE(int) pj_isblank(unsigned char c) { return isblank(c); }
/** /**
* Converts character to lowercase. * Converts character to lowercase.
* @param c The integer character to convert. * @param c The integer character to convert.
* @return Lowercase character of c. * @return Lowercase character of c.
*/ */
PJ_INLINE(int) pj_tolower(int c) { return tolower(c); } PJ_INLINE(int) pj_tolower(unsigned char c) { return tolower(c); }
/** /**
* Converts character to uppercase. * Converts character to uppercase.
* @param c The integer character to convert. * @param c The integer character to convert.
* @return Uppercase character of c. * @return Uppercase character of c.
*/ */
PJ_INLINE(int) pj_toupper(int c) { return toupper(c); } PJ_INLINE(int) pj_toupper(unsigned char c) { return toupper(c); }
/** /**
* Returns a non-zero value if c is a particular representation of * Returns a non-zero value if c is a particular representation of
* an hexadecimal digit character. * an hexadecimal digit character.
* @param c The integer character to test. * @param c The integer character to test.
* @return Non-zero value if c is a particular representation of * @return Non-zero value if c is a particular representation of
* an hexadecimal digit character. * an hexadecimal digit character.
*/ */
PJ_INLINE(int) pj_isxdigit(int c){ return isxdigit(c); } PJ_INLINE(int) pj_isxdigit(unsigned char c){ return isxdigit(c); }
/** /**
* Array of hex digits, in lowerspace. * Array of hex digits, in lowerspace.
*/ */
/*extern char pj_hex_digits[];*/ /*extern char pj_hex_digits[];*/
#define pj_hex_digits "0123456789abcdef" #define pj_hex_digits "0123456789abcdef"
/** /**
* Convert a value to hex representation. * Convert a value to hex representation.
* @param value Integral value to convert. * @param value Integral value to convert.
skipping to change at line 158 skipping to change at line 158
{ {
*p++ = pj_hex_digits[ (value & 0xF0) >> 4 ]; *p++ = pj_hex_digits[ (value & 0xF0) >> 4 ];
*p = pj_hex_digits[ (value & 0x0F) ]; *p = pj_hex_digits[ (value & 0x0F) ];
} }
/** /**
* Convert hex digit c to integral value. * Convert hex digit c to integral value.
* @param c The hex digit character. * @param c The hex digit character.
* @return The integral value between 0 and 15. * @return The integral value between 0 and 15.
*/ */
PJ_INLINE(unsigned) pj_hex_digit_to_val(unsigned c) PJ_INLINE(unsigned) pj_hex_digit_to_val(unsigned char c)
{ {
if (c <= '9') if (c <= '9')
return (c-'0') & 0x0F; return (c-'0') & 0x0F;
else if (c <= 'F') else if (c <= 'F')
return (c-'A'+10) & 0x0F; return (c-'A'+10) & 0x0F;
else else
return (c-'a'+10) & 0x0F; return (c-'a'+10) & 0x0F;
} }
/** @} */ /** @} */
 End of changes. 13 change blocks. 
13 lines changed or deleted 13 lines changed or added


 delaybuf.h   delaybuf.h 
/* $Id: delaybuf.h 2039 2008-06-20 22:44:47Z bennylp $ */ /* $Id: delaybuf.h 2116 2008-07-10 15:04:27Z nanang $ */
/* /*
* 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,
* 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 151 skipping to change at line 151
* Destroy delay buffer. * Destroy delay buffer.
* *
* @param b Delay buffer session. * @param b Delay buffer session.
* *
* @return PJ_SUCCESS normally. * @return PJ_SUCCESS normally.
*/ */
PJ_DECL(pj_status_t) pjmedia_delay_buf_destroy(pjmedia_delay_buf *b); PJ_DECL(pj_status_t) pjmedia_delay_buf_destroy(pjmedia_delay_buf *b);
PJ_END_DECL PJ_END_DECL
/**
* @}
*/
#endif /* __PJMEDIA_DELAYBUF_H__ */ #endif /* __PJMEDIA_DELAYBUF_H__ */
 End of changes. 2 change blocks. 
1 lines changed or deleted 5 lines changed or added


 echo.h   echo.h 
/* $Id: echo.h 2039 2008-06-20 22:44:47Z bennylp $ */ /* $Id: echo.h 2198 2008-08-09 05:40:22Z bennylp $ */
/* /*
* 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,
* 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 54 skipping to change at line 54
* Opaque type for PJMEDIA Echo Canceller state. * Opaque type for PJMEDIA Echo Canceller state.
*/ */
typedef struct pjmedia_echo_state pjmedia_echo_state; typedef struct pjmedia_echo_state pjmedia_echo_state;
/** /**
* Echo cancellation options. * Echo cancellation options.
*/ */
typedef enum pjmedia_echo_flag typedef enum pjmedia_echo_flag
{ {
/** /**
* Use any available backend echo canceller algorithm. This is
* the default settings. This setting is mutually exclusive with
* PJMEDIA_ECHO_SIMPLE and PJMEDIA_ECHO_SPEEX.
*/
PJMEDIA_ECHO_DEFAULT= 0,
/**
* Force to use Speex AEC as the backend echo canceller algorithm.
* This setting is mutually exclusive with PJMEDIA_ECHO_SIMPLE.
*/
PJMEDIA_ECHO_SPEEX = 1,
/**
* If PJMEDIA_ECHO_SIMPLE flag is specified during echo canceller * If PJMEDIA_ECHO_SIMPLE flag is specified during echo canceller
* creation, then a simple echo suppressor will be used instead of * creation, then a simple echo suppressor will be used instead of
* an accoustic echo cancellation. * an accoustic echo cancellation. This setting is mutually exclusive
* with PJMEDIA_ECHO_SPEEX.
*/
PJMEDIA_ECHO_SIMPLE = 2,
/**
* For internal use.
*/ */
PJMEDIA_ECHO_SIMPLE = 1, 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 = 2 PJMEDIA_ECHO_NO_LOCK = 16
} 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.
skipping to change at line 97 skipping to change at line 116
*/ */
PJ_DECL(pj_status_t) pjmedia_echo_create(pj_pool_t *pool, PJ_DECL(pj_status_t) pjmedia_echo_create(pj_pool_t *pool,
unsigned clock_rate, unsigned clock_rate,
unsigned samples_per_frame, unsigned samples_per_frame,
unsigned tail_ms, unsigned tail_ms,
unsigned latency_ms, unsigned latency_ms,
unsigned options, unsigned options,
pjmedia_echo_state **p_echo ); pjmedia_echo_state **p_echo );
/** /**
* Create multi-channel the echo canceller.
*
* @param pool Pool to allocate memory.
* @param clock_rate Media clock rate/sampling rate.
* @param channel_count Number of channels.
* @param samples_per_frame Number of samples per frame.
* @param tail_ms Tail length, miliseconds.
* @param latency_ms Total lacency introduced by playback and
* recording device. Set to zero if the latency
* is not known.
* @param options Options. If PJMEDIA_ECHO_SIMPLE is specified,
* then a simple echo suppressor implementation
* will be used instead of an accoustic echo
* cancellation.
* See #pjmedia_echo_flag for other options.
* @param p_echo Pointer to receive the Echo Canceller state.
*
* @return PJ_SUCCESS on success, or the appropriate status
.
*/
PJ_DECL(pj_status_t) pjmedia_echo_create2(pj_pool_t *pool,
unsigned clock_rate,
unsigned channel_count,
unsigned samples_per_frame,
unsigned tail_ms,
unsigned latency_ms,
unsigned options,
pjmedia_echo_state **p_echo );
/**
* Destroy the Echo Canceller. * Destroy the Echo Canceller.
* *
* @param echo The Echo Canceller. * @param echo The Echo Canceller.
* *
* @return PJ_SUCCESS on success. * @return PJ_SUCCESS on success.
*/ */
PJ_DECL(pj_status_t) pjmedia_echo_destroy(pjmedia_echo_state *echo ); PJ_DECL(pj_status_t) pjmedia_echo_destroy(pjmedia_echo_state *echo );
/** /**
* Let the Echo Canceller knows that a frame has been played to the speaker * Reset the echo canceller.
. *
* @param echo The Echo Canceller.
*
* @return PJ_SUCCESS on success.
*/
PJ_DECL(pj_status_t) pjmedia_echo_reset(pjmedia_echo_state *echo );
/**
* Let the Echo Canceller know that a frame has been played to the speaker.
* The Echo Canceller will keep the frame in its internal buffer, to be use d * The Echo Canceller will keep the frame in its internal buffer, to be use d
* when cancelling the echo with #pjmedia_echo_capture(). * when cancelling the echo with #pjmedia_echo_capture().
* *
* @param echo The Echo Canceller. * @param echo The Echo Canceller.
* @param play_frm Sample buffer containing frame to be played * @param play_frm Sample buffer containing frame to be played
* (or has been played) to the playback device. * (or has been played) to the playback device.
* The frame must contain exactly samples_per_frame * The frame must contain exactly samples_per_frame
* number of samples. * number of samples.
* *
* @return PJ_SUCCESS on success. * @return PJ_SUCCESS on success.
*/ */
PJ_DECL(pj_status_t) pjmedia_echo_playback(pjmedia_echo_state *echo, PJ_DECL(pj_status_t) pjmedia_echo_playback(pjmedia_echo_state *echo,
pj_int16_t *play_frm ); pj_int16_t *play_frm );
/** /**
* Let the Echo Canceller knows that a frame has been captured from * Let the Echo Canceller know that a frame has been captured from the
* the microphone. * microphone. The Echo Canceller will cancel the echo from the captured
* The Echo Canceller will cancel the echo from the captured signal, * signal, using the internal buffer (supplied by #pjmedia_echo_playback())
* using the internal buffer (supplied by #pjmedia_echo_playback())
* as the FES (Far End Speech) reference. * as the FES (Far End Speech) reference.
* *
* @param echo The Echo Canceller. * @param echo The Echo Canceller.
* @param rec_frm On input, it contains the input signal (captured * @param rec_frm On input, it contains the input signal (captured
* from microphone) which echo is to be removed. * from microphone) which echo is to be removed.
* Upon returning this function, this buffer contain * Upon returning this function, this buffer contain
* the processed signal with the echo removed. * the processed signal with the echo removed.
* The frame must contain exactly samples_per_frame * The frame must contain exactly samples_per_frame
* number of samples. * number of samples.
* @param options Echo cancellation options, reserved for future use. * @param options Echo cancellation options, reserved for future use.
 End of changes. 8 change blocks. 
10 lines changed or deleted 66 lines changed or added


 evsub.h   evsub.h 
/* $Id: evsub.h 2039 2008-06-20 22:44:47Z bennylp $ */ /* $Id: evsub.h 2149 2008-07-17 13:53:41Z bennylp $ */
/* /*
* 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,
* 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 210 skipping to change at line 210
PJ_DECL_DATA(const pjsip_method) pjsip_subscribe_method; PJ_DECL_DATA(const pjsip_method) pjsip_subscribe_method;
/** /**
* NOTIFY method constant. @see pjsip_get_notify_method() * NOTIFY method constant. @see pjsip_get_notify_method()
*/ */
PJ_DECL_DATA(const pjsip_method) pjsip_notify_method; PJ_DECL_DATA(const pjsip_method) pjsip_notify_method;
/** /**
* SUBSCRIBE method constant. * SUBSCRIBE method constant.
*/ */
PJ_DECL(const pjsip_method*) pjsip_get_subscribe_method(); PJ_DECL(const pjsip_method*) pjsip_get_subscribe_method(void);
/** /**
* NOTIFY method constant. * NOTIFY method constant.
*/ */
PJ_DECL(const pjsip_method*) pjsip_get_notify_method(); PJ_DECL(const pjsip_method*) pjsip_get_notify_method(void);
/** /**
* Initialize the event subscription module and register the module to the * Initialize the event subscription module and register the module to the
* specified endpoint. * specified endpoint.
* *
* @param endpt The endpoint instance. * @param endpt The endpoint instance.
* *
* @return PJ_SUCCESS if module can be created and registered * @return PJ_SUCCESS if module can be created and registered
* successfully. * successfully.
*/ */
skipping to change at line 335 skipping to change at line 335
/** /**
* Get the string representation of the subscription state. * Get the string representation of the subscription state.
* *
* @param sub Event subscription instance. * @param sub Event subscription instance.
* *
* @return NULL terminated string. * @return NULL terminated string.
*/ */
PJ_DECL(const char*) pjsip_evsub_get_state_name(pjsip_evsub *sub); PJ_DECL(const char*) pjsip_evsub_get_state_name(pjsip_evsub *sub);
/** /**
* Get subscription termination reason, if any. If remote did not
* send termination reason, this function will return empty string.
*
* @param sub Event subscription instance.
*
* @return NULL terminated string.
*/
PJ_DECL(const pj_str_t*) pjsip_evsub_get_termination_reason(pjsip_evsub *su
b);
/**
* Call this function to create request to initiate subscription, to * Call this function to create request to initiate subscription, to
* refresh subcription, or to request subscription termination. * refresh subcription, or to request subscription termination.
* *
* @param sub Client subscription instance. * @param sub Client subscription instance.
* @param method The method that establishes the subscription, such a s * @param method The method that establishes the subscription, such a s
* SUBSCRIBE or REFER. If this argument is NULL, then * SUBSCRIBE or REFER. If this argument is NULL, then
* SUBSCRIBE will be used. * SUBSCRIBE will be used.
* @param expires Subscription expiration. If the value is set to zero , * @param expires Subscription expiration. If the value is set to zero ,
* this will request unsubscription. If the value is * this will request unsubscription. If the value is
* negative, default expiration as defined by the packa ge * negative, default expiration as defined by the packa ge
 End of changes. 4 change blocks. 
3 lines changed or deleted 14 lines changed or added


 guid.h   guid.h 
/* $Id: guid.h 2039 2008-06-20 22:44:47Z bennylp $ */ /* $Id: guid.h 2121 2008-07-11 00:56:07Z bennylp $ */
/* /*
* 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,
* 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 61 skipping to change at line 61
* PJ_GUID_MAX_LENGTH characters. * PJ_GUID_MAX_LENGTH characters.
* *
* @see pj_GUID_STRING_LENGTH() * @see pj_GUID_STRING_LENGTH()
* @see PJ_GUID_MAX_LENGTH * @see PJ_GUID_MAX_LENGTH
*/ */
PJ_DECL_DATA(const unsigned) PJ_GUID_STRING_LENGTH; PJ_DECL_DATA(const unsigned) PJ_GUID_STRING_LENGTH;
/** /**
* Get #PJ_GUID_STRING_LENGTH constant. * Get #PJ_GUID_STRING_LENGTH constant.
*/ */
PJ_DECL(unsigned) pj_GUID_STRING_LENGTH(); PJ_DECL(unsigned) pj_GUID_STRING_LENGTH(void);
/** /**
* PJ_GUID_MAX_LENGTH specifies the maximum length of GUID string, * PJ_GUID_MAX_LENGTH specifies the maximum length of GUID string,
* regardless of which algorithm to use. * regardless of which algorithm to use.
*/ */
#define PJ_GUID_MAX_LENGTH 36 #define PJ_GUID_MAX_LENGTH 36
/** /**
* Create a globally unique string, which length is PJ_GUID_STRING_LENGTH * Create a globally unique string, which length is PJ_GUID_STRING_LENGTH
* characters. Caller is responsible for preallocating the storage used * characters. Caller is responsible for preallocating the storage used
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 ioqueue.h   ioqueue.h 
/* $Id: ioqueue.h 2039 2008-06-20 22:44:47Z bennylp $ /* $Id: ioqueue.h 2185 2008-07-29 20:15:15Z bennylp $
*/ */
/* /*
* 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 210 skipping to change at line 210
* Application normally wants to attach it's specific data in the * Application normally wants to attach it's specific data in the
* \c user_data field so that it can keep track of which operation has * \c user_data field so that it can keep track of which operation has
* completed when the callback is called. Alternatively, application can * completed when the callback is called. Alternatively, application can
* also extend this struct to include its data, because the pointer that * also extend this struct to include its data, because the pointer that
* is returned in the completion callback will be exactly the same as * is returned in the completion callback will be exactly the same as
* the pointer supplied when the asynchronous function is called. * the pointer supplied when the asynchronous function is called.
*/ */
typedef struct pj_ioqueue_op_key_t typedef struct pj_ioqueue_op_key_t
{ {
void *internal__[32]; /**< Internal I/O Queue data. */ void *internal__[32]; /**< Internal I/O Queue data. */
void *activesock_data; /**< Active socket data. */
void *user_data; /**< Application data. */ void *user_data; /**< Application data. */
} pj_ioqueue_op_key_t; } pj_ioqueue_op_key_t;
/** /**
* This structure describes the callbacks to be called when I/O operation * This structure describes the callbacks to be called when I/O operation
* completes. * completes.
*/ */
typedef struct pj_ioqueue_callback typedef struct pj_ioqueue_callback
{ {
/** /**
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 jbuf.h   jbuf.h 
/* $Id: jbuf.h 2039 2008-06-20 22:44:47Z bennylp $ */ /* $Id: jbuf.h 2317 2008-09-24 17:27:46Z nanang $ */
/* /*
* 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,
* 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 143 skipping to change at line 143
* *
* @return PJ_SUCCESS on success. * @return PJ_SUCCESS on success.
*/ */
PJ_DECL(pj_status_t) pjmedia_jbuf_set_fixed( pjmedia_jbuf *jb, PJ_DECL(pj_status_t) pjmedia_jbuf_set_fixed( pjmedia_jbuf *jb,
unsigned prefetch); unsigned prefetch);
/** /**
* Set the jitter buffer to adaptive mode. * Set the jitter buffer to adaptive mode.
* *
* @param jb The jitter buffer. * @param jb The jitter buffer.
* @param prefetch The prefetch value to be applied to the jitter * @param prefetch The initial prefetch value to be applied to the
* buffer. * jitter buffer. Setting this to other than 0 will
* activate prefetch buffering, a jitter buffer feature
* that each time it gets empty, it won't return a
* normal frame until its size reaches the number
* specified here.
* @param min_prefetch The minimum delay that must be applied to each * @param min_prefetch The minimum delay that must be applied to each
* incoming packets, in number of frames. The * incoming packets, in number of frames.
* default value is zero.
* @param max_prefetch The maximum allowable value for prefetch delay, * @param max_prefetch The maximum allowable value for prefetch delay,
* in number of frames. The default value is equal * in number of frames.
* to the size of the jitter buffer.
* *
* @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);
/** /**
* Destroy jitter buffer instance. * Destroy jitter buffer instance.
 End of changes. 4 change blocks. 
7 lines changed or deleted 9 lines changed or added


 log.h   log.h 
/* $Id: log.h 2039 2008-06-20 22:44:47Z bennylp $ */ /* $Id: log.h 2181 2008-07-28 21:15:04Z bennylp $ */
/* /*
* 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,
* 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 71 skipping to change at line 71
* For examples, see: * For examples, see:
* - @ref page_pjlib_samples_log_c. * - @ref page_pjlib_samples_log_c.
* *
*/ */
/** /**
* Log decoration flag, to be specified with #pj_log_set_decor(). * Log decoration flag, to be specified with #pj_log_set_decor().
*/ */
enum pj_log_decoration enum pj_log_decoration
{ {
PJ_LOG_HAS_DAY_NAME = 1, /**< Include day name [default: no]. PJ_LOG_HAS_DAY_NAME = 1, /**< Include day name [default: no]
*/ */
PJ_LOG_HAS_YEAR = 2, /**< Include year digit [default: no] PJ_LOG_HAS_YEAR = 2, /**< Include year digit [no]
*/ */
PJ_LOG_HAS_MONTH = 4, /**< Include month [default: no] PJ_LOG_HAS_MONTH = 4, /**< Include month [no]
*/ */
PJ_LOG_HAS_DAY_OF_MON = 8, /**< Include day of month [default: no] PJ_LOG_HAS_DAY_OF_MON = 8, /**< Include day of month [no]
*/ */
PJ_LOG_HAS_TIME = 16, /**< Include time [default: 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_COLOR = 1024, /**< Colorize logs [yes on win32]
*/
PJ_LOG_HAS_LEVEL_TEXT = 2048 /**< Include level text string [no]
*/
}; };
/** /**
* 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 200 skipping to change at line 203
*/ */
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);
/**
* Set color of log messages.
*
* @param level Log level which color will be changed.
* @param color Desired color.
*/
PJ_DECL(void) pj_log_set_color(int level, pj_color_t color);
/**
* Get color of log messages.
*
* @param level Log level which color will be returned.
* @return Log color.
*/
PJ_DECL(pj_color_t) pj_log_get_color(int level);
#else /* #if PJ_LOG_MAX_LEVEL >= 1 */ #else /* #if PJ_LOG_MAX_LEVEL >= 1 */
/** /**
* Change log output function. The front-end logging functions will call * Change log output function. The front-end logging functions will call
* this function to write the actual message to the desired device. * this function to write the actual message to the desired device.
* By default, the front-end functions use pj_log_write() to write * By default, the front-end functions use pj_log_write() to write
* the messages, unless it's changed by calling this function. * the messages, unless it's changed by calling this function.
* *
* @param func The function that will be called to write the log * @param func The function that will be called to write the log
* messages to the desired device. * messages to the desired device.
skipping to change at line 237 skipping to change at line 256
* to output device alongside the actual message. For example, application * to output device alongside the actual message. For example, application
* can specify that date/time information should be displayed with each * can specify that date/time information should be displayed with each
* log message. * log message.
* *
* @param decor Bitmask combination of #pj_log_decoration to con trol * @param decor Bitmask combination of #pj_log_decoration to con trol
* the layout of the log message. * the layout of the log message.
*/ */
# define pj_log_set_decor(decor) # define pj_log_set_decor(decor)
/** /**
* Set color of log messages.
*
* @param level Log level which color will be changed.
* @param color Desired color.
*/
# define pj_log_set_color(level, color)
/**
* Get current maximum log verbositylevel. * Get current maximum log verbositylevel.
* *
* @return Current log maximum level. * @return Current log maximum level.
*/ */
# define pj_log_get_level() 0 # define pj_log_get_level() 0
/** /**
* Get current log decoration flag. * Get current log decoration flag.
* *
* @return Log decoration flag. * @return Log decoration flag.
*/ */
# define pj_log_get_decor() 0 # define pj_log_get_decor() 0
/**
* Get color of log messages.
*
* @param level Log level which color will be returned.
* @return Log color.
*/
# define pj_log_get_color(level) 0
#endif /* #if PJ_LOG_MAX_LEVEL >= 1 */ #endif /* #if PJ_LOG_MAX_LEVEL >= 1 */
/** /**
* @} * @}
*/ */
/* ************************************************************************ **/ /* ************************************************************************ **/
/* /*
* Log functions implementation prototypes. * Log functions implementation prototypes.
* These functions are called by PJ_LOG macros according to verbosity * These functions are called by PJ_LOG macros according to verbosity
 End of changes. 5 change blocks. 
19 lines changed or deleted 57 lines changed or added


 math.h   math.h 
/* $Id: math.h 1960 2008-05-17 14:43:46Z nanang $ */ /* $Id: math.h 2263 2008-09-05 13:35:01Z bennylp $ */
/* /*
* 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,
* 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 170 skipping to change at line 170
/** /**
* Get the standard deviation of specified statistics state. * Get the standard deviation of specified statistics state.
* *
* @param stat Statistic state. * @param stat Statistic state.
* *
* @return The standard deviation. * @return The standard deviation.
*/ */
PJ_INLINE(unsigned) pj_math_stat_get_stddev(pj_math_stat *stat) PJ_INLINE(unsigned) pj_math_stat_get_stddev(pj_math_stat *stat)
{ {
if (stat->n == 0) return 0;
return (pj_isqrt((unsigned)(stat->m2_/stat->n))); return (pj_isqrt((unsigned)(stat->m2_/stat->n)));
} }
/** /**
* Set the standard deviation of statistics state. This is useful when * Set the standard deviation of statistics state. This is useful when
* the statistic state is operated in 'read-only' mode as a storage of * the statistic state is operated in 'read-only' mode as a storage of
* statistical data. * statistical data.
* *
* @param stat Statistic state. * @param stat Statistic state.
* *
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 os_auto.h   os_auto.h 
/* pjlib/include/pj/compat/os_auto.h. Generated by configure. */ /* pjlib/include/pj/compat/os_auto.h. Generated by configure. */
/* $Id: os_auto.h.in 1787 2008-02-08 15:18:20Z bennylp $ */ /* $Id: os_auto.h.in 2331 2008-09-27 13:16:35Z bennylp $ */
/* /*
* Copyright (C)2003-2006 Benny Prijono <benny@prijono.org> * Copyright (C)2003-2006 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,
* 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 54 skipping to change at line 54
/* Headers availability */ /* Headers availability */
#define PJ_HAS_ARPA_INET_H 1 #define PJ_HAS_ARPA_INET_H 1
#define PJ_HAS_ASSERT_H 1 #define PJ_HAS_ASSERT_H 1
#define PJ_HAS_CTYPE_H 1 #define PJ_HAS_CTYPE_H 1
#define PJ_HAS_ERRNO_H 1 #define PJ_HAS_ERRNO_H 1
#define PJ_HAS_FCNTL_H 1 #define PJ_HAS_FCNTL_H 1
#define PJ_HAS_LINUX_SOCKET_H 1 #define PJ_HAS_LINUX_SOCKET_H 1
#define PJ_HAS_MALLOC_H 1 #define PJ_HAS_MALLOC_H 1
#define PJ_HAS_NETDB_H 1 #define PJ_HAS_NETDB_H 1
#define PJ_HAS_NETINET_IN_SYSTM_H 1
#define PJ_HAS_NETINET_IN_H 1 #define PJ_HAS_NETINET_IN_H 1
#define PJ_HAS_NETINET_IP_H 1 #define PJ_HAS_NETINET_IP_H 1
#define PJ_HAS_NET_IF_H 1 #define PJ_HAS_NET_IF_H 1
#define PJ_HAS_IFADDRS_H 1 #define PJ_HAS_IFADDRS_H 1
#define PJ_HAS_SEMAPHORE_H 1 #define PJ_HAS_SEMAPHORE_H 1
#define PJ_HAS_SETJMP_H 1 #define PJ_HAS_SETJMP_H 1
#define PJ_HAS_STDARG_H 1 #define PJ_HAS_STDARG_H 1
#define PJ_HAS_STDDEF_H 1 #define PJ_HAS_STDDEF_H 1
#define PJ_HAS_STDIO_H 1 #define PJ_HAS_STDIO_H 1
#define PJ_HAS_STDINT_H 1 #define PJ_HAS_STDINT_H 1
skipping to change at line 78 skipping to change at line 79
#define PJ_HAS_SYS_SOCKET_H 1 #define PJ_HAS_SYS_SOCKET_H 1
#define PJ_HAS_SYS_TIME_H 1 #define PJ_HAS_SYS_TIME_H 1
#define PJ_HAS_SYS_TIMEB_H 1 #define PJ_HAS_SYS_TIMEB_H 1
#define PJ_HAS_SYS_TYPES_H 1 #define PJ_HAS_SYS_TYPES_H 1
#define PJ_HAS_TIME_H 1 #define PJ_HAS_TIME_H 1
#define PJ_HAS_UNISTD_H 1 #define PJ_HAS_UNISTD_H 1
/* #undef PJ_HAS_MSWSOCK_H */ /* #undef PJ_HAS_MSWSOCK_H */
/* #undef PJ_HAS_WINSOCK_H */ /* #undef PJ_HAS_WINSOCK_H */
/* #undef PJ_HAS_WINSOCK2_H */ /* #undef PJ_HAS_WINSOCK2_H */
/* #undef PJ_HAS_WS2TCPIP_H */
#define PJ_SOCK_HAS_INET_ATON 1 #define PJ_SOCK_HAS_INET_ATON 1
#define PJ_SOCK_HAS_INET_PTON 1 #define PJ_SOCK_HAS_INET_PTON 1
#define PJ_SOCK_HAS_INET_NTOP 1 #define PJ_SOCK_HAS_INET_NTOP 1
#define PJ_SOCK_HAS_GETADDRINFO 1 #define PJ_SOCK_HAS_GETADDRINFO 1
/* On these OSes, semaphore feature depends on semaphore.h */ /* On these OSes, semaphore feature depends on semaphore.h */
#if defined(PJ_HAS_SEMAPHORE_H) && PJ_HAS_SEMAPHORE_H!=0 #if defined(PJ_HAS_SEMAPHORE_H) && PJ_HAS_SEMAPHORE_H!=0
# define PJ_HAS_SEMAPHORE 1 # define PJ_HAS_SEMAPHORE 1
#elif defined(PJ_WIN32) && PJ_WIN32!=0 #elif defined(PJ_WIN32) && PJ_WIN32!=0
skipping to change at line 107 skipping to change at line 109
/* #undef PJ_PTHREAD_MUTEXATTR_T_HAS_RECURSIVE */ /* #undef PJ_PTHREAD_MUTEXATTR_T_HAS_RECURSIVE */
/* Set 1 if native sockaddr_in has sin_len member. /* Set 1 if native sockaddr_in has sin_len member.
* Default: 0 * Default: 0
*/ */
/* #undef PJ_SOCKADDR_HAS_LEN */ /* #undef PJ_SOCKADDR_HAS_LEN */
/* Does the OS have socklen_t? */ /* Does the OS have socklen_t? */
#define PJ_HAS_SOCKLEN_T 1 #define PJ_HAS_SOCKLEN_T 1
#if !defined(PJ_HAS_SOCKLEN_T) || PJ_HAS_SOCKLEN_T==0 #if !defined(socklen_t) && (!defined(PJ_HAS_SOCKLEN_T) || PJ_HAS_SOCKLEN_T= =0)
# define PJ_HAS_SOCKLEN_T 1 # define PJ_HAS_SOCKLEN_T 1
typedef int socklen_t; typedef int socklen_t;
#endif #endif
/** /**
* If this macro is set, it tells select I/O Queue that select() needs to * If this macro is set, it tells select I/O Queue that select() needs to
* 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
 End of changes. 4 change blocks. 
2 lines changed or deleted 4 lines changed or added


 os_auto.h.in   os_auto.h.in 
/* $Id: os_auto.h.in 1787 2008-02-08 15:18:20Z bennylp $ */ /* $Id: os_auto.h.in 2331 2008-09-27 13:16:35Z bennylp $ */
/* /*
* Copyright (C)2003-2006 Benny Prijono <benny@prijono.org> * Copyright (C)2003-2006 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,
* 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 53 skipping to change at line 53
/* Headers availability */ /* Headers availability */
#undef PJ_HAS_ARPA_INET_H #undef PJ_HAS_ARPA_INET_H
#undef PJ_HAS_ASSERT_H #undef PJ_HAS_ASSERT_H
#undef PJ_HAS_CTYPE_H #undef PJ_HAS_CTYPE_H
#undef PJ_HAS_ERRNO_H #undef PJ_HAS_ERRNO_H
#undef PJ_HAS_FCNTL_H #undef PJ_HAS_FCNTL_H
#undef PJ_HAS_LINUX_SOCKET_H #undef PJ_HAS_LINUX_SOCKET_H
#undef PJ_HAS_MALLOC_H #undef PJ_HAS_MALLOC_H
#undef PJ_HAS_NETDB_H #undef PJ_HAS_NETDB_H
#undef PJ_HAS_NETINET_IN_SYSTM_H
#undef PJ_HAS_NETINET_IN_H #undef PJ_HAS_NETINET_IN_H
#undef PJ_HAS_NETINET_IP_H #undef PJ_HAS_NETINET_IP_H
#undef PJ_HAS_NET_IF_H #undef PJ_HAS_NET_IF_H
#undef PJ_HAS_IFADDRS_H #undef PJ_HAS_IFADDRS_H
#undef PJ_HAS_SEMAPHORE_H #undef PJ_HAS_SEMAPHORE_H
#undef PJ_HAS_SETJMP_H #undef PJ_HAS_SETJMP_H
#undef PJ_HAS_STDARG_H #undef PJ_HAS_STDARG_H
#undef PJ_HAS_STDDEF_H #undef PJ_HAS_STDDEF_H
#undef PJ_HAS_STDIO_H #undef PJ_HAS_STDIO_H
#undef PJ_HAS_STDINT_H #undef PJ_HAS_STDINT_H
skipping to change at line 77 skipping to change at line 78
#undef PJ_HAS_SYS_SOCKET_H #undef PJ_HAS_SYS_SOCKET_H
#undef PJ_HAS_SYS_TIME_H #undef PJ_HAS_SYS_TIME_H
#undef PJ_HAS_SYS_TIMEB_H #undef PJ_HAS_SYS_TIMEB_H
#undef PJ_HAS_SYS_TYPES_H #undef PJ_HAS_SYS_TYPES_H
#undef PJ_HAS_TIME_H #undef PJ_HAS_TIME_H
#undef PJ_HAS_UNISTD_H #undef PJ_HAS_UNISTD_H
#undef PJ_HAS_MSWSOCK_H #undef PJ_HAS_MSWSOCK_H
#undef PJ_HAS_WINSOCK_H #undef PJ_HAS_WINSOCK_H
#undef PJ_HAS_WINSOCK2_H #undef PJ_HAS_WINSOCK2_H
#undef PJ_HAS_WS2TCPIP_H
#undef PJ_SOCK_HAS_INET_ATON #undef PJ_SOCK_HAS_INET_ATON
#undef PJ_SOCK_HAS_INET_PTON #undef PJ_SOCK_HAS_INET_PTON
#undef PJ_SOCK_HAS_INET_NTOP #undef PJ_SOCK_HAS_INET_NTOP
#undef PJ_SOCK_HAS_GETADDRINFO #undef PJ_SOCK_HAS_GETADDRINFO
/* On these OSes, semaphore feature depends on semaphore.h */ /* On these OSes, semaphore feature depends on semaphore.h */
#if defined(PJ_HAS_SEMAPHORE_H) && PJ_HAS_SEMAPHORE_H!=0 #if defined(PJ_HAS_SEMAPHORE_H) && PJ_HAS_SEMAPHORE_H!=0
# define PJ_HAS_SEMAPHORE 1 # define PJ_HAS_SEMAPHORE 1
#elif defined(PJ_WIN32) && PJ_WIN32!=0 #elif defined(PJ_WIN32) && PJ_WIN32!=0
skipping to change at line 106 skipping to change at line 108
#undef PJ_PTHREAD_MUTEXATTR_T_HAS_RECURSIVE #undef PJ_PTHREAD_MUTEXATTR_T_HAS_RECURSIVE
/* Set 1 if native sockaddr_in has sin_len member. /* Set 1 if native sockaddr_in has sin_len member.
* Default: 0 * Default: 0
*/ */
#undef PJ_SOCKADDR_HAS_LEN #undef PJ_SOCKADDR_HAS_LEN
/* Does the OS have socklen_t? */ /* Does the OS have socklen_t? */
#undef PJ_HAS_SOCKLEN_T #undef PJ_HAS_SOCKLEN_T
#if !defined(PJ_HAS_SOCKLEN_T) || PJ_HAS_SOCKLEN_T==0 #if !defined(socklen_t) && (!defined(PJ_HAS_SOCKLEN_T) || PJ_HAS_SOCKLEN_T= =0)
# define PJ_HAS_SOCKLEN_T 1 # define PJ_HAS_SOCKLEN_T 1
typedef int socklen_t; typedef int socklen_t;
#endif #endif
/** /**
* If this macro is set, it tells select I/O Queue that select() needs to * If this macro is set, it tells select I/O Queue that select() needs to
* 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
 End of changes. 4 change blocks. 
2 lines changed or deleted 4 lines changed or added


 os_linux.h   os_linux.h 
/* $Id: os_linux.h 2039 2008-06-20 22:44:47Z bennylp $ */ /* $Id: os_linux.h 2289 2008-09-17 12:55:26Z nanang $ */
/* /*
* 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,
* 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 51 skipping to change at line 51
#define PJ_HAS_STDLIB_H 1 #define PJ_HAS_STDLIB_H 1
#define PJ_HAS_STRING_H 1 #define PJ_HAS_STRING_H 1
#define PJ_HAS_SYS_IOCTL_H 1 #define PJ_HAS_SYS_IOCTL_H 1
#define PJ_HAS_SYS_SELECT_H 1 #define PJ_HAS_SYS_SELECT_H 1
#define PJ_HAS_SYS_SOCKET_H 1 #define PJ_HAS_SYS_SOCKET_H 1
#define PJ_HAS_SYS_TIME_H 1 #define PJ_HAS_SYS_TIME_H 1
#define PJ_HAS_SYS_TIMEB_H 1 #define PJ_HAS_SYS_TIMEB_H 1
#define PJ_HAS_SYS_TYPES_H 1 #define PJ_HAS_SYS_TYPES_H 1
#define PJ_HAS_TIME_H 1 #define PJ_HAS_TIME_H 1
#define PJ_HAS_UNISTD_H 1 #define PJ_HAS_UNISTD_H 1
#define PJ_HAS_SEMAPHORE_H 1
#define PJ_HAS_MSWSOCK_H 0 #define PJ_HAS_MSWSOCK_H 0
#define PJ_HAS_WINSOCK_H 0 #define PJ_HAS_WINSOCK_H 0
#define PJ_HAS_WINSOCK2_H 0 #define PJ_HAS_WINSOCK2_H 0
#define PJ_SOCK_HAS_INET_ATON 1 #define PJ_SOCK_HAS_INET_ATON 1
/* Set 1 if native sockaddr_in has sin_len member. /* Set 1 if native sockaddr_in has sin_len member.
* Default: 0 * Default: 0
*/ */
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 os_win32.h   os_win32.h 
/* $Id: os_win32.h 2039 2008-06-20 22:44:47Z bennylp $ */ /* $Id: os_win32.h 2331 2008-09-27 13:16:35Z bennylp $ */
/* /*
* 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,
* 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 62 skipping to change at line 62
#define PJ_HAS_SYS_SOCKET_H 0 #define PJ_HAS_SYS_SOCKET_H 0
#define PJ_HAS_SYS_TIME_H 0 #define PJ_HAS_SYS_TIME_H 0
#define PJ_HAS_SYS_TIMEB_H 1 #define PJ_HAS_SYS_TIMEB_H 1
#define PJ_HAS_SYS_TYPES_H 1 #define PJ_HAS_SYS_TYPES_H 1
#define PJ_HAS_TIME_H 1 #define PJ_HAS_TIME_H 1
#define PJ_HAS_UNISTD_H 0 #define PJ_HAS_UNISTD_H 0
#define PJ_HAS_MSWSOCK_H 1 #define PJ_HAS_MSWSOCK_H 1
#define PJ_HAS_WINSOCK_H 0 #define PJ_HAS_WINSOCK_H 0
#define PJ_HAS_WINSOCK2_H 1 #define PJ_HAS_WINSOCK2_H 1
#define PJ_HAS_WS2TCPIP_H 1
#define PJ_SOCK_HAS_INET_ATON 0 #define PJ_SOCK_HAS_INET_ATON 0
/* Set 1 if native sockaddr_in has sin_len member. /* Set 1 if native sockaddr_in has sin_len member.
* Default: 0 * Default: 0
*/ */
#define PJ_SOCKADDR_HAS_LEN 0 #define PJ_SOCKADDR_HAS_LEN 0
/* Is errno a good way to retrieve OS errors? (No) /* Is errno a good way to retrieve OS errors? (No)
*/ */
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 pjmedia-codec.h   pjmedia-codec.h 
/* $Id: pjmedia-codec.h 2039 2008-06-20 22:44:47Z bennylp $ */ /* $Id: pjmedia-codec.h 2216 2008-08-15 13:17:39Z nanang $ */
/* /*
* 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,
* 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 32 skipping to change at line 32
/** /**
* @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/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/ipp_codecs.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


 pjmedia.h   pjmedia.h 
/* $Id: pjmedia.h 2039 2008-06-20 22:44:47Z bennylp $ */ /* $Id: pjmedia.h 2262 2008-09-04 13:55:33Z bennylp $ */
/* /*
* 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,
* 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 30 skipping to change at line 30
#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/types.h>
#include <pjmedia/alaw_ulaw.h> #include <pjmedia/alaw_ulaw.h>
#include <pjmedia/bidirectional.h> #include <pjmedia/bidirectional.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/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/errno.h>
#include <pjmedia/endpoint.h> #include <pjmedia/endpoint.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/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/tonegen.h> #include <pjmedia/tonegen.h>
#include <pjmedia/transport.h> #include <pjmedia/transport.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_srtp.h> #include <pjmedia/transport_srtp.h>
#include <pjmedia/transport_udp.h> #include <pjmedia/transport_udp.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>
#endif /* __PJMEDIA_H__ */ #endif /* __PJMEDIA_H__ */
 End of changes. 8 change blocks. 
1 lines changed or deleted 8 lines changed or added


 pjsua.h   pjsua.h 
/* $Id: pjsua.h 2039 2008-06-20 22:44:47Z bennylp $ */ /* $Id: pjsua.h 2315 2008-09-24 10:10:15Z bennylp $ */
/* /*
* 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,
* 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 386 skipping to change at line 386
/** File player identification */ /** File player identification */
typedef int pjsua_player_id; typedef int pjsua_player_id;
/** File recorder identification */ /** File recorder identification */
typedef int pjsua_recorder_id; typedef int pjsua_recorder_id;
/** Conference port identification */ /** Conference port identification */
typedef int pjsua_conf_port_id; typedef int pjsua_conf_port_id;
/** Opaque declaration for server side presence subscription */
typedef struct pjsua_srv_pres pjsua_srv_pres;
/** Forward declaration for pjsua_msg_data */
typedef struct pjsua_msg_data pjsua_msg_data;
/** /**
* Maximum proxies in account. * Maximum proxies in account.
*/ */
#ifndef PJSUA_ACC_MAX_PROXIES #ifndef PJSUA_ACC_MAX_PROXIES
# define PJSUA_ACC_MAX_PROXIES 8 # define PJSUA_ACC_MAX_PROXIES 8
#endif #endif
#if defined(PJMEDIA_HAS_SRTP) && (PJMEDIA_HAS_SRTP != 0) #if defined(PJMEDIA_HAS_SRTP) && (PJMEDIA_HAS_SRTP != 0)
/** /**
skipping to change at line 778 skipping to change at line 784
* \code * \code
# acc_id: account ID (integer) # acc_id: account ID (integer)
def on_reg_state(acc_id): def on_reg_state(acc_id):
return return
* \endcode * \endcode
*/ */
void (*on_reg_state)(pjsua_acc_id acc_id); void (*on_reg_state)(pjsua_acc_id acc_id);
/** /**
* Notification when incoming SUBSCRIBE request is received. Applicatio
n
* may use this callback to authorize the incoming subscribe request
* (e.g. ask user permission if the request should be granted).
*
* If this callback is not implemented, all incoming presence subscript
ion
* requests will be accepted.
*
* If this callback is implemented, application has several choices on
* what to do with the incoming request:
* - it may reject the request immediately by specifying non-200 class
* final response in the \a code argument.
* - it may immediately accept the request by specifying 200 as the
* \a code argument. This is the default value if application doesn't
* set any value to the \a code argument. In this case, the library
* will automatically send NOTIFY request upon returning from this
* callback.
* - it may delay the processing of the request, for example to reques
t
* user permission whether to accept or reject the request. In this
* case, the application MUST set the \a code argument to 202, and
* later calls #pjsua_pres_notify() to accept or reject the
* subscription request.
*
* Any \a code other than 200 and 202 will be treated as 200.
*
* Application MUST return from this callback immediately (e.g. it must
* not block in this callback while waiting for user confirmation).
*
* @param srv_pres Server presence subscription instance. If
* application delays the acceptance of the request
,
* it will need to specify this object when calling
* #pjsua_pres_notify().
* @param acc_id Account ID most appropriate for this request.
* @param buddy_id ID of the buddy matching the sender of the
* request, if any, or PJSUA_INVALID_ID if no
* matching buddy is found.
* @param from The From URI of the request.
* @param rdata The incoming request.
* @param code The status code to respond to the request. The
* default value is 200. Application may set this
* to other final status code to accept or reject
* the request.
* @param reason The reason phrase to respond to the request.
* @param msg_data If the application wants to send additional
* headers in the response, it can put it in this
* parameter.
*/
void (*on_incoming_subscribe)(pjsua_acc_id acc_id,
pjsua_srv_pres *srv_pres,
pjsua_buddy_id buddy_id,
const pj_str_t *from,
pjsip_rx_data *rdata,
pjsip_status_code *code,
pj_str_t *reason,
pjsua_msg_data *msg_data);
/**
* Notification when server side subscription state has changed.
* This callback is optional as application normally does not need
* to do anything to maintain server side presence subscription.
*
* @param acc_id The account ID.
* @param srv_pres Server presence subscription object.
* @param remote_uri Remote URI string.
* @param state New subscription state.
* @param event PJSIP event that triggers the state change.
*/
void (*on_srv_subscribe_state)(pjsua_acc_id acc_id,
pjsua_srv_pres *srv_pres,
const pj_str_t *remote_uri,
pjsip_evsub_state state,
pjsip_event *event);
/**
* Notify application when the buddy state has changed. * Notify application when the buddy state has changed.
* Application may then query the buddy into to get the details. * Application may then query the buddy into to get the details.
* *
* @param buddy_id The buddy id. * @param buddy_id The buddy id.
* *
* \par Python Syntax: * \par Python Syntax:
* \code * \code
# buddy_id: integer # buddy_id: integer
def on_buddy_state(buddy_id): def on_buddy_state(buddy_id):
skipping to change at line 818 skipping to change at line 897
* @param body The message content. * @param body The message content.
* *
* \par Python Syntax: * \par Python Syntax:
* \code * \code
# call_id: integer # call_id: integer
# from: string # from: string
# to: string # to: string
# contact: string # contact: string
# mime_type: string # mime_type: string
# body: string # body: string
# acc_id: integer
def on_pager(call_id, from, to, contact, mime_type, body): def on_pager(call_id, from, to, contact, mime_type, body):
return return
* \endcode * \endcode
*/ */
void (*on_pager)(pjsua_call_id call_id, const pj_str_t *from, void (*on_pager)(pjsua_call_id call_id, const pj_str_t *from,
const pj_str_t *to, const pj_str_t *contact, const pj_str_t *to, const pj_str_t *contact,
const pj_str_t *mime_type, const pj_str_t *body); const pj_str_t *mime_type, const pj_str_t *body);
/** /**
skipping to change at line 840 skipping to change at line 920
* *
* @param call_id Containts the ID of the call where the IM was * @param call_id Containts the ID of the call where the IM was
* sent, or PJSUA_INVALID_ID if the IM was sent * sent, or PJSUA_INVALID_ID if the IM was sent
* outside call context. * outside call context.
* @param from URI of the sender. * @param from URI of the sender.
* @param to URI of the destination message. * @param to URI of the destination message.
* @param contact The Contact URI of the sender, if present. * @param contact The Contact URI of the sender, if present.
* @param mime_type MIME type of the message. * @param mime_type MIME type of the message.
* @param body The message content. * @param body The message content.
* @param rdata The incoming MESSAGE request. * @param rdata The incoming MESSAGE request.
* @param acc_id Account ID most suitable for this message.
*/ */
void (*on_pager2)(pjsua_call_id call_id, const pj_str_t *from, void (*on_pager2)(pjsua_call_id call_id, const pj_str_t *from,
const pj_str_t *to, const pj_str_t *contact, const pj_str_t *to, const pj_str_t *contact,
const pj_str_t *mime_type, const pj_str_t *body, const pj_str_t *mime_type, const pj_str_t *body,
pjsip_rx_data *rdata); pjsip_rx_data *rdata, pjsua_acc_id acc_id);
/** /**
* Notify application about the delivery status of outgoing pager * Notify application about the delivery status of outgoing pager
* request. See also on_pager_status2() callback for the version with * request. See also on_pager_status2() callback for the version with
* \a pjsip_rx_data in the argument list. * \a pjsip_rx_data in the argument list.
* *
* @param call_id Containts the ID of the call where the IM was * @param call_id Containts the ID of the call where the IM was
* sent, or PJSUA_INVALID_ID if the IM was sent * sent, or PJSUA_INVALID_ID if the IM was sent
* outside call context. * outside call context.
* @param to Destination URI. * @param to Destination URI.
skipping to change at line 869 skipping to change at line 950
* @param reason Delivery status reason. * @param reason Delivery status reason.
* *
* \par Python Syntax * \par Python Syntax
* \code * \code
# call_id: integer # call_id: integer
# to: string # to: string
# body: string # body: string
# user_data: string # user_data: string
# status: integer # status: integer
# reason: string # reason: string
# acc_id: integer
def on_pager_status(call_id, to, body, user_data, status, reason): def on_pager_status(call_id, to, body, user_data, status, reason):
return return
* \endcode * \endcode
*/ */
void (*on_pager_status)(pjsua_call_id call_id, void (*on_pager_status)(pjsua_call_id call_id,
const pj_str_t *to, const pj_str_t *to,
const pj_str_t *body, const pj_str_t *body,
void *user_data, void *user_data,
pjsip_status_code status, pjsip_status_code status,
skipping to change at line 898 skipping to change at line 980
* @param to Destination URI. * @param to Destination URI.
* @param body Message body. * @param body Message body.
* @param user_data Arbitrary data that was specified when s ending * @param user_data Arbitrary data that was specified when s ending
* IM message. * IM message.
* @param status Delivery status. * @param status Delivery status.
* @param reason Delivery status reason. * @param reason Delivery status reason.
* @param tdata The original MESSAGE request. * @param tdata The original MESSAGE request.
* @param rdata The incoming MESSAGE response, or NULL if the * @param rdata The incoming MESSAGE response, or NULL if the
* message transaction fails because of time out * message transaction fails because of time out
* or transport error. * or transport error.
* @param acc_id Account ID from this the instant message was
* send.
*/ */
void (*on_pager_status2)(pjsua_call_id call_id, void (*on_pager_status2)(pjsua_call_id call_id,
const pj_str_t *to, const pj_str_t *to,
const pj_str_t *body, const pj_str_t *body,
void *user_data, void *user_data,
pjsip_status_code status, pjsip_status_code status,
const pj_str_t *reason, const pj_str_t *reason,
pjsip_tx_data *tdata, pjsip_tx_data *tdata,
pjsip_rx_data *rdata); pjsip_rx_data *rdata,
pjsua_acc_id acc_id);
/** /**
* Notify application about typing indication. * Notify application about typing indication.
* *
* @param call_id Containts the ID of the call where the IM was * @param call_id Containts the ID of the call where the IM was
* sent, or PJSUA_INVALID_ID if the IM was sent * sent, or PJSUA_INVALID_ID if the IM was sent
* outside call context. * outside call context.
* @param from URI of the sender. * @param from URI of the sender.
* @param to URI of the destination message. * @param to URI of the destination message.
* @param contact The Contact URI of the sender, if present. * @param contact The Contact URI of the sender, if present.
skipping to change at line 937 skipping to change at line 1022
def on_typing(call_id, from, to, contact, is_typing): def on_typing(call_id, from, to, contact, is_typing):
return return
* \endcode * \endcode
*/ */
void (*on_typing)(pjsua_call_id call_id, const pj_str_t *from, void (*on_typing)(pjsua_call_id call_id, const pj_str_t *from,
const pj_str_t *to, const pj_str_t *contact, const pj_str_t *to, const pj_str_t *contact,
pj_bool_t is_typing); pj_bool_t is_typing);
/** /**
* Notify application about typing indication.
*
* @param call_id Containts the ID of the call where the IM was
* sent, or PJSUA_INVALID_ID if the IM was sent
* outside call context.
* @param from URI of the sender.
* @param to URI of the destination message.
* @param contact The Contact URI of the sender, if present.
* @param is_typing Non-zero if peer is typing, or zero if p
eer
* has stopped typing a message.
* @param rdata The received request.
* @param acc_id Account ID most suitable for this message.
*/
void (*on_typing2)(pjsua_call_id call_id, const pj_str_t *from,
const pj_str_t *to, const pj_str_t *contact,
pj_bool_t is_typing, pjsip_rx_data *rdata,
pjsua_acc_id acc_id);
/**
* Callback when the library has finished performing NAT type * Callback when the library has finished performing NAT type
* detection. * detection.
* *
* @param res NAT detection result. * @param res NAT detection result.
*/ */
void (*on_nat_detect)(const pj_stun_nat_detect_result *res); void (*on_nat_detect)(const pj_stun_nat_detect_result *res);
} pjsua_callback; } pjsua_callback;
/** /**
skipping to change at line 994 skipping to change at line 1098
unsigned nameserver_count; unsigned nameserver_count;
/** /**
* Array of nameservers to be used by the SIP resolver subsystem. * Array of nameservers to be used by the SIP resolver subsystem.
* The order of the name server specifies the priority (first name * The order of the name server specifies the priority (first name
* server will be used first, unless it is not reachable). * server will be used first, unless it is not reachable).
*/ */
pj_str_t nameserver[4]; pj_str_t nameserver[4];
/** /**
* Force loose-route to be used in all route/proxy URIs (outbound_proxy
* and account's proxy settings). When this setting is enabled, the
* library will check all the route/proxy URIs specified in the setting
s
* and append ";lr" parameter to the URI if the parameter is not presen
t.
*
* Default: 1
*/
pj_bool_t force_lr;
/**
* Number of outbound proxies in the \a outbound_proxy array. * Number of outbound proxies in the \a outbound_proxy array.
*/ */
unsigned outbound_proxy_cnt; unsigned outbound_proxy_cnt;
/** /**
* Specify the URL of outbound proxies to visit for all outgoing reques ts. * Specify the URL of outbound proxies to visit for all outgoing reques ts.
* The outbound proxies will be used for all accounts, and it will * The outbound proxies will be used for all accounts, and it will
* be used to build the route set for outgoing requests. The final * be used to build the route set for outgoing requests. The final
* route set for outgoing requests will consists of the outbound proxie s * route set for outgoing requests will consists of the outbound proxie s
* and the proxy configured in the account. * and the proxy configured in the account.
skipping to change at line 1099 skipping to change at line 1213
* 2: SRTP requires secure end-to-end transport (SIPS) * 2: SRTP requires secure end-to-end transport (SIPS)
* *
* Note that this setting can be further customized in account * Note that this setting can be further customized in account
* configuration (#pjsua_acc_config). * configuration (#pjsua_acc_config).
* *
* Default: #PJSUA_DEFAULT_SRTP_SECURE_SIGNALING * Default: #PJSUA_DEFAULT_SRTP_SECURE_SIGNALING
*/ */
int srtp_secure_signaling; int srtp_secure_signaling;
#endif #endif
/**
* Disconnect other call legs when more than one 2xx responses for
* outgoing INVITE are received due to forking. Currently the library
* is not able to handle simultaneous forked media, so disconnecting
* the other call legs is necessary.
*
* With this setting enabled, the library will handle only one of the
* connected call leg, and the other connected call legs will be
* disconnected.
*
* Default: PJ_TRUE (only disable this setting for testing purposes).
*/
pj_bool_t hangup_forked_call;
} pjsua_config; } pjsua_config;
/** /**
* Use this function to initialize pjsua config. * Use this function to initialize pjsua config.
* *
* @param cfg pjsua config to be initialized. * @param cfg pjsua config to be initialized.
* *
* \par Python Sample Syntax: * \par Python Sample Syntax:
* The corresponding Python function creates an instance of the config and * The corresponding Python function creates an instance of the config and
* initializes it to the default settings: * initializes it to the default settings:
skipping to change at line 1146 skipping to change at line 1274
* Application MUST call #pjsua_msg_data_init() to initialize this * Application MUST call #pjsua_msg_data_init() to initialize this
* structure before setting its values. * structure before setting its values.
* *
* \par Python Syntax * \par Python Syntax
* The data type in Python is <tt>py_pjsua.Msg_Data</tt>. Application is * The data type in Python is <tt>py_pjsua.Msg_Data</tt>. Application is
* recommended to instantiate the structure by using this construct: * recommended to instantiate the structure by using this construct:
* \code * \code
msg_data = py_pjsua.msg_data_init() msg_data = py_pjsua.msg_data_init()
* \endcode * \endcode
*/ */
typedef struct pjsua_msg_data struct pjsua_msg_data
{ {
/** /**
* Additional message headers as linked list. Application can add * Additional message headers as linked list. Application can add
* headers to the list by creating the header, either from the heap/poo l * headers to the list by creating the header, either from the heap/poo l
* or from temporary local variable, and add the header using * or from temporary local variable, and add the header using
* linked list operation. See pjsip_apps.c for some sample codes. * linked list operation. See pjsip_apps.c for some sample codes.
* *
* \par Python: * \par Python:
* This field is implemented as string linked-list in Python, where eac h * This field is implemented as string linked-list in Python, where eac h
* string describes the header. For example: * string describes the header. For example:
skipping to change at line 1174 skipping to change at line 1302
/** /**
* MIME type of optional message body. * MIME type of optional message body.
*/ */
pj_str_t content_type; pj_str_t content_type;
/** /**
* Optional message body. * Optional message body.
*/ */
pj_str_t msg_body; pj_str_t msg_body;
} pjsua_msg_data; };
/** /**
* Initialize message data. * Initialize message data.
* *
* @param msg_data Message data to be initialized. * @param msg_data Message data to be initialized.
* *
* \par Python * \par Python
* The corresponding Python function creates and initializes the structure: * The corresponding Python function creates and initializes the structure:
* \code * \code
msg_data = py_pjsua.msg_data_init() msg_data = py_pjsua.msg_data_init()
skipping to change at line 1837 skipping to change at line 1965
* The data type in Python is <tt>py_pjsua.Acc_Config</tt>, but normally * The data type in Python is <tt>py_pjsua.Acc_Config</tt>, but normally
* application can just use the snippet below to create and initialize * application can just use the snippet below to create and initialize
* the account config: * the account config:
* \code * \code
acc_cfg = py_pjsua.acc_config_default() acc_cfg = py_pjsua.acc_config_default()
* \endcode * \endcode
*/ */
typedef struct pjsua_acc_config typedef struct pjsua_acc_config
{ {
/** /**
* Arbitrary user data to be associated with the newly created account.
* Application may set this later with #pjsua_acc_set_user_data() and
* retrieve it with #pjsua_acc_get_user_data().
*/
void *user_data;
/**
* Account priority, which is used to control the order of matching * Account priority, which is used to control the order of matching
* incoming/outgoing requests. The higher the number means the higher * incoming/outgoing requests. The higher the number means the higher
* the priority is, and the account will be matched first. * the priority is, and the account will be matched first.
*/ */
int priority; int priority;
/** /**
* The full SIP URL for the account. The value can take name address or * The full SIP URL for the account. The value can take name address or
* URL format, and will look something like "sip:account@serviceprovide r". * URL format, and will look something like "sip:account@serviceprovide r".
* *
skipping to change at line 2223 skipping to change at line 2358
* The function returns (status, account_id) tuple: * The function returns (status, account_id) tuple:
* \code * \code
status, account_id = py_pjsua.acc_add_local(tid, is_default) status, account_id = py_pjsua.acc_add_local(tid, is_default)
* \endcode * \endcode
*/ */
PJ_DECL(pj_status_t) pjsua_acc_add_local(pjsua_transport_id tid, PJ_DECL(pj_status_t) pjsua_acc_add_local(pjsua_transport_id tid,
pj_bool_t is_default, pj_bool_t is_default,
pjsua_acc_id *p_acc_id); pjsua_acc_id *p_acc_id);
/** /**
* Set arbitrary data to be associated with the account.
*
* @param acc_id The account ID.
* @param user_data User/application data.
*
* @return PJ_SUCCESS on success, or the appropriate error code
.
*/
PJ_DECL(pj_status_t) pjsua_acc_set_user_data(pjsua_acc_id acc_id,
void *user_data);
/**
* Retrieve arbitrary data associated with the account.
*
* @param acc_id The account ID.
*
* @return The user data. In the case where the account ID is
* not valid, NULL is returned.
*/
PJ_DECL(void*) pjsua_acc_get_user_data(pjsua_acc_id acc_id);
/**
* Delete an account. This will unregister the account from the SIP server, * Delete an account. This will unregister the account from the SIP server,
* if necessary, and terminate server side presence subscriptions associate d * if necessary, and terminate server side presence subscriptions associate d
* with this account. * with this account.
* *
* @param acc_id Id of the account to be deleted. * @param acc_id Id of the account to be deleted.
* *
* @return PJ_SUCCESS on success, or the appropriate error code . * @return PJ_SUCCESS on success, or the appropriate error code .
* *
* \par Python: * \par Python:
* \code * \code
skipping to change at line 2709 skipping to change at line 2865
* @return Non-zero if yes. * @return Non-zero if yes.
* *
* \par Python: * \par Python:
* \code * \code
bool = py_pjsua.call_has_media(call_id) bool = py_pjsua.call_has_media(call_id)
* \endcode * \endcode
*/ */
PJ_DECL(pj_bool_t) pjsua_call_has_media(pjsua_call_id call_id); PJ_DECL(pj_bool_t) pjsua_call_has_media(pjsua_call_id call_id);
/** /**
* Retrieve the media session associated with this call. Note that the medi
a
* session may not be available depending on the current call's media statu
s
* (the pjsua_call_media_status information in pjsua_call_info). Applicatio
n
* may use the media session to retrieve more detailed information about th
e
* call's media.
*
* @param call_id Call identification.
*
* @return Call media session.
*/
PJ_DECL(pjmedia_session*) pjsua_call_get_media_session(pjsua_call_id call_i
d);
/**
* Retrieve the media transport instance that is used for this call.
* Application may use the media transport to query more detailed informati
on
* about the media transport.
*
* @param cid Call identification (the call_id).
*
* @return Call media transport.
*/
PJ_DECL(pjmedia_transport*) pjsua_call_get_media_transport(pjsua_call_id ci
d);
/**
* Get the conference port identification associated with the call. * Get the conference port identification associated with the call.
* *
* @param call_id Call identification. * @param call_id Call identification.
* *
* @return Conference port ID, or PJSUA_INVALID_ID when the * @return Conference port ID, or PJSUA_INVALID_ID when the
* media has not been established or is not active. * media has not been established or is not active.
* *
* \par Python: * \par Python:
* \code * \code
slot = py_pjsua.call_get_conf_port(call_id) slot = py_pjsua.call_get_conf_port(call_id)
skipping to change at line 3151 skipping to change at line 3331
/** /**
* Buddy URL or name address. * Buddy URL or name address.
*/ */
pj_str_t uri; pj_str_t uri;
/** /**
* Specify whether presence subscription should start immediately. * Specify whether presence subscription should start immediately.
*/ */
pj_bool_t subscribe; pj_bool_t subscribe;
/**
* Specify arbitrary application data to be associated with with
* the buddy object.
*/
void *user_data;
} pjsua_buddy_config; } pjsua_buddy_config;
/** /**
* This enumeration describes basic buddy's online status. * This enumeration describes basic buddy's online status.
*/ */
typedef enum pjsua_buddy_status typedef enum pjsua_buddy_status
{ {
/** /**
* Online status is unknown (possibly because no presence subscription * Online status is unknown (possibly because no presence subscription
* has been established). * has been established).
skipping to change at line 3218 skipping to change at line 3404
*/ */
pj_str_t status_text; pj_str_t status_text;
/** /**
* Flag to indicate that we should monitor the presence information for * Flag to indicate that we should monitor the presence information for
* this buddy (normally yes, unless explicitly disabled). * this buddy (normally yes, unless explicitly disabled).
*/ */
pj_bool_t monitor_pres; pj_bool_t monitor_pres;
/** /**
* If \a monitor_pres is enabled, this specifies the last state of the
* presence subscription. If presence subscription session is currently
* active, the value will be PJSIP_EVSUB_STATE_ACTIVE. If presence
* subscription request has been rejected, the value will be
* PJSIP_EVSUB_STATE_TERMINATED, and the termination reason will be
* specified in \a sub_term_reason.
*/
pjsip_evsub_state sub_state;
/**
* Specifies the last presence subscription terminatino reason. If
* presence subscription is currently active, the value will be empty.
*/
pj_str_t sub_term_reason;
/**
* Extended RPID information about the person. * Extended RPID information about the person.
*/ */
pjrpid_element rpid; pjrpid_element rpid;
/** /**
* Internal buffer. * Internal buffer.
*/ */
char buf_[512]; char buf_[512];
} pjsua_buddy_info; } pjsua_buddy_info;
skipping to change at line 3287 skipping to change at line 3489
* \par Python: * \par Python:
* The Python function takes no argument and returns list of buddy IDs: * The Python function takes no argument and returns list of buddy IDs:
* \code * \code
[buddy_ids] = py_pjsua.enum_buddies() [buddy_ids] = py_pjsua.enum_buddies()
* \endcode * \endcode
*/ */
PJ_DECL(pj_status_t) pjsua_enum_buddies(pjsua_buddy_id ids[], PJ_DECL(pj_status_t) pjsua_enum_buddies(pjsua_buddy_id ids[],
unsigned *count); unsigned *count);
/** /**
* Find the buddy ID with the specified URI.
*
* @param uri The buddy URI.
*
* @return The buddy ID, or PJSUA_INVALID_ID if not found.
*/
PJ_DECL(pjsua_buddy_id) pjsua_buddy_find(const pj_str_t *uri);
/**
* Get detailed buddy info. * Get detailed buddy info.
* *
* @param buddy_id The buddy identification. * @param buddy_id The buddy identification.
* @param info Pointer to receive information about buddy. * @param info Pointer to receive information about buddy.
* *
* @return PJ_SUCCESS on success, or the appropriate error code . * @return PJ_SUCCESS on success, or the appropriate error code .
* *
* \par Python: * \par Python:
* \code * \code
buddy_info = py_pjsua.buddy_get_info(buddy_id) buddy_info = py_pjsua.buddy_get_info(buddy_id)
* \endcode * \endcode
* The function returns None if buddy_id is not valid. * The function returns None if buddy_id is not valid.
*/ */
PJ_DECL(pj_status_t) pjsua_buddy_get_info(pjsua_buddy_id buddy_id, PJ_DECL(pj_status_t) pjsua_buddy_get_info(pjsua_buddy_id buddy_id,
pjsua_buddy_info *info); pjsua_buddy_info *info);
/** /**
* Set the user data associated with the buddy object.
*
* @param buddy_id The buddy identification.
* @param user_data Arbitrary application data to be associated with
* the buddy object.
*
* @return PJ_SUCCESS on success, or the appropriate error code
.
*/
PJ_DECL(pj_status_t) pjsua_buddy_set_user_data(pjsua_buddy_id buddy_id,
void *user_data);
/**
* Get the user data associated with the budy object.
*
* @param buddy_id The buddy identification.
*
* @return The application data.
*/
PJ_DECL(void*) pjsua_buddy_get_user_data(pjsua_buddy_id buddy_id);
/**
* Add new buddy to the buddy list. If presence subscription is enabled * Add new buddy to the buddy list. If presence subscription is enabled
* for this buddy, this function will also start the presence subscription * for this buddy, this function will also start the presence subscription
* session immediately. * session immediately.
* *
* @param buddy_cfg Buddy configuration. * @param buddy_cfg Buddy configuration.
* @param p_buddy_id Pointer to receive buddy ID. * @param p_buddy_id Pointer to receive buddy ID.
* *
* @return PJ_SUCCESS on success, or the appropriate error code . * @return PJ_SUCCESS on success, or the appropriate error code .
* *
* \par Python: * \par Python:
skipping to change at line 3379 skipping to change at line 3611
* application will be notified about the buddy's presence status in the * application will be notified about the buddy's presence status in the
* on_buddy_state() callback. * on_buddy_state() callback.
* *
* @param buddy_id Buddy identification. * @param buddy_id Buddy identification.
* *
* @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) pjsua_buddy_update_pres(pjsua_buddy_id buddy_id); PJ_DECL(pj_status_t) pjsua_buddy_update_pres(pjsua_buddy_id buddy_id);
/** /**
* Send NOTIFY to inform account presence status or to terminate server
* side presence subscription. If application wants to reject the incoming
* request, it should set the \a state to PJSIP_EVSUB_STATE_TERMINATED.
*
* @param acc_id Account ID.
* @param srv_pres Server presence subscription instance.
* @param state New state to set.
* @param state_str Optionally specify the state string name, if state
* is not "active", "pending", or "terminated".
* @param reason If the new state is PJSIP_EVSUB_STATE_TERMINATED,
* optionally specify the termination reason.
* @param with_body If the new state is PJSIP_EVSUB_STATE_TERMINATED,
* this specifies whether the NOTIFY request should
* contain message body containing account's presence
* information.
* @param msg_data Optional list of headers to be sent with the NOTIFY
* request.
*
* @return PJ_SUCCESS on success.
*/
PJ_DECL(pj_status_t) pjsua_pres_notify(pjsua_acc_id acc_id,
pjsua_srv_pres *srv_pres,
pjsip_evsub_state state,
const pj_str_t *state_str,
const pj_str_t *reason,
pj_bool_t with_body,
const pjsua_msg_data *msg_data);
/**
* Dump presence subscriptions to log. * Dump presence subscriptions to log.
* *
* @param verbose Yes or no. * @param verbose Yes or no.
* *
* \par Python: * \par Python:
* \code * \code
py_pjsua.pres_dump() py_pjsua.pres_dump()
* \endcode * \endcode
*/ */
PJ_DECL(void) pjsua_pres_dump(pj_bool_t verbose); PJ_DECL(void) pjsua_pres_dump(pj_bool_t verbose);
skipping to change at line 3756 skipping to change at line 4017
* Enable ICE * Enable ICE
*/ */
pj_bool_t enable_ice; pj_bool_t enable_ice;
/** /**
* Disable ICE host candidates. * Disable ICE host candidates.
*/ */
pj_bool_t ice_no_host_cands; pj_bool_t ice_no_host_cands;
/** /**
* Disable RTCP component.
*
* Default: no
*/
pj_bool_t ice_no_rtcp;
/**
* Enable TURN relay candidate in ICE. * Enable TURN relay candidate in ICE.
*/ */
pj_bool_t enable_turn; pj_bool_t enable_turn;
/** /**
* Specify TURN domain name or host name, in in "DOMAIN:PORT" or * Specify TURN domain name or host name, in in "DOMAIN:PORT" or
* "HOST:PORT" format. * "HOST:PORT" format.
*/ */
pj_str_t turn_server; pj_str_t turn_server;
 End of changes. 23 change blocks. 
5 lines changed or deleted 289 lines changed or added


 pjsua_internal.h   pjsua_internal.h 
/* $Id: pjsua_internal.h 2079 2008-06-27 21:19:44Z bennylp $ */ /* $Id: pjsua_internal.h 2315 2008-09-24 10:10:15Z bennylp $ */
/* /*
* 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,
* 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 63 skipping to change at line 63
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. */
pj_bool_t local_hold;/**< Flag for call-hold by local. */
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_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
*/
int conf_slot; /**< Slot # in conference bridge . */ 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. */ pjmedia_transport *med_tp; /**< Current media transport. */
pj_status_t med_tp_ready;/**< Media transport status. */ pj_status_t med_tp_ready;/**< Media transport status. */
pjmedia_transport *med_orig; /**< Original media transport */ 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 */ pjsua_med_tp_st med_tp_st; /**< Media transport state */
pj_timer_entry refresh_tm;/**< Timer to send re-INVITE. */ pj_timer_entry refresh_tm;/**< Timer to send re-INVITE. */
pj_timer_entry hangup_tm; /**< Timer to hangup call. */ pj_timer_entry hangup_tm; /**< Timer to hangup call. */
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. */ 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. */
} pjsua_call; } pjsua_call;
/** /**
* Server presence subscription list head. * Server presence subscription list head.
*/ */
typedef 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; pjsip_evsub *sub; /**< The evsub.
char *remote; */
} pjsua_srv_pres; char *remote; /**< Remote URI.
*/
int acc_id; /**< Account ID.
*/
pjsip_dialog *dlg; /**< Dialog.
*/
int expires; /**< "expires" value in the requ
est. */
};
/** /**
* Account * Account
*/ */
typedef struct pjsua_acc typedef struct pjsua_acc
{ {
pj_pool_t *pool; /**< Pool for this account. */
pjsua_acc_config cfg; /**< Account configuration. */ pjsua_acc_config cfg; /**< Account configuration. */
pj_bool_t valid; /**< Is this account valid? */ pj_bool_t valid; /**< Is this account valid? */
int index; /**< Index in accounts array. */ int index; /**< Index in accounts array. */
pj_str_t display; /**< Display name, if any. */ pj_str_t display; /**< Display name, if any. */
pj_str_t user_part; /**< User part of local URI. */ pj_str_t user_part; /**< User part of local URI. */
pj_str_t contact; /**< Our Contact URI for REGISTER */ pj_str_t contact; /**< Our Contact URI for REGISTER */
pj_str_t srv_domain; /**< Host part of reg server. */ pj_str_t srv_domain; /**< Host part of reg server. */
int srv_port; /**< Port number of reg server. */ int srv_port; /**< Port number of reg server. */
skipping to change at line 149 skipping to change at line 162
pjsip_host_port local_name; pjsip_host_port local_name;
union { union {
pjsip_transport *tp; pjsip_transport *tp;
pjsip_tpfactory *factory; pjsip_tpfactory *factory;
void *ptr; void *ptr;
} data; } data;
} pjsua_transport_data; } pjsua_transport_data;
/** Maximum length of subscription termination reason. */
#define PJSUA_BUDDY_SUB_TERM_REASON_LEN 32
/** /**
* Buddy data. * Buddy data.
*/ */
typedef struct pjsua_buddy typedef struct pjsua_buddy
{ {
pj_pool_t *pool; /**< Pool for this buddy. */
unsigned index; /**< Buddy index. */ unsigned index; /**< Buddy index. */
void *user_data; /**< Application data. */
pj_str_t uri; /**< Buddy URI. */ pj_str_t uri; /**< Buddy URI. */
pj_str_t contact; /**< Contact learned from subscrp. */ pj_str_t contact; /**< Contact learned from subscrp. */
pj_str_t name; /**< Buddy name. */ pj_str_t name; /**< Buddy name. */
pj_str_t display; /**< Buddy display name. */ pj_str_t display; /**< Buddy display name. */
pj_str_t host; /**< Buddy host. */ pj_str_t host; /**< Buddy host. */
unsigned port; /**< Buddy port. */ unsigned port; /**< Buddy port. */
pj_bool_t monitor; /**< Should we monitor? */ pj_bool_t monitor; /**< Should we monitor? */
pjsip_dialog *dlg; /**< The underlying dialog. */ pjsip_dialog *dlg; /**< The underlying dialog. */
pjsip_evsub *sub; /**< Buddy presence subscription */ pjsip_evsub *sub; /**< Buddy presence subscription */
pj_str_t term_reason;/**< Subscription termination reason */
pjsip_pres_status status; /**< Buddy presence status. */ pjsip_pres_status status; /**< Buddy presence status. */
} pjsua_buddy; } pjsua_buddy;
/** /**
* File player/recorder data. * File player/recorder data.
*/ */
typedef struct pjsua_file_data typedef struct pjsua_file_data
{ {
pj_bool_t type; /* 0=player, 1=playlist */ pj_bool_t type; /* 0=player, 1=playlist */
skipping to change at line 314 skipping to change at line 333
#define PJSUA_LOCK() pj_mutex_lock(pjsua_var.mutex) #define PJSUA_LOCK() pj_mutex_lock(pjsua_var.mutex)
#define PJSUA_TRY_LOCK() pj_mutex_trylock(pjsua_var.mutex) #define PJSUA_TRY_LOCK() pj_mutex_trylock(pjsua_var.mutex)
#define PJSUA_UNLOCK() pj_mutex_unlock(pjsua_var.mutex) #define PJSUA_UNLOCK() pj_mutex_unlock(pjsua_var.mutex)
#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()
#endif #endif
/** /**
* Normalize route URI (check for ";lr" and append one if it doesn't
* exist and pjsua_config.force_lr is set.
*/
pj_status_t normalize_route_uri(pj_pool_t *pool, pj_str_t *uri);
/**
* Resolve STUN server. * Resolve STUN server.
*/ */
pj_status_t pjsua_resolve_stun_server(pj_bool_t wait); pj_status_t pjsua_resolve_stun_server(pj_bool_t wait);
/** /**
* Handle incoming invite request. * Handle incoming invite request.
*/ */
pj_bool_t pjsua_call_on_incoming(pjsip_rx_data *rdata); pj_bool_t pjsua_call_on_incoming(pjsip_rx_data *rdata);
/* /*
skipping to change at line 458 skipping to change at line 483
void pjsua_parse_media_type( pj_pool_t *pool, void pjsua_parse_media_type( pj_pool_t *pool,
const pj_str_t *mime, const pj_str_t *mime,
pjsip_media_type *media_type); pjsip_media_type *media_type);
/* /*
* Internal function to init transport selector from transport id. * Internal function to init transport selector from transport id.
*/ */
void pjsua_init_tpselector(pjsua_transport_id tp_id, void pjsua_init_tpselector(pjsua_transport_id tp_id,
pjsip_tpselector *sel); pjsip_tpselector *sel);
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);
PJ_END_DECL PJ_END_DECL
 End of changes. 13 change blocks. 
5 lines changed or deleted 41 lines changed or added


 pool.h   pool.h 
/* $Id: pool.h 2039 2008-06-20 22:44:47Z bennylp $ */ /* $Id: pool.h 2121 2008-07-11 00:56:07Z bennylp $ */
/* /*
* 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,
* 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 616 skipping to change at line 616
* This constant denotes the exception number that will be thrown by defaul t * This constant denotes the exception number that will be thrown by defaul t
* memory factory policy when memory allocation fails. * memory factory policy when memory allocation fails.
* *
* @see pj_NO_MEMORY_EXCEPTION() * @see pj_NO_MEMORY_EXCEPTION()
*/ */
PJ_DECL_DATA(int) PJ_NO_MEMORY_EXCEPTION; PJ_DECL_DATA(int) PJ_NO_MEMORY_EXCEPTION;
/** /**
* Get #PJ_NO_MEMORY_EXCEPTION constant. * Get #PJ_NO_MEMORY_EXCEPTION constant.
*/ */
PJ_DECL(int) pj_NO_MEMORY_EXCEPTION(); PJ_DECL(int) pj_NO_MEMORY_EXCEPTION(void);
/** /**
* This global variable points to default memory pool factory policy. * This global variable points to default memory pool factory policy.
* The behaviour of the default policy is: * The behaviour of the default policy is:
* - block allocation and deallocation use malloc() and free(). * - block allocation and deallocation use malloc() and free().
* - callback will raise PJ_NO_MEMORY_EXCEPTION exception. * - callback will raise PJ_NO_MEMORY_EXCEPTION exception.
* - access to pool factory is not serialized (i.e. not thread safe). * - access to pool factory is not serialized (i.e. not thread safe).
* *
* @see pj_pool_factory_get_default_policy * @see pj_pool_factory_get_default_policy
*/ */
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 pool_alt.h   pool_alt.h 
/* $Id: pool_alt.h 2039 2008-06-20 22:44:47Z bennylp $ */ /* $Id: pool_alt.h 2341 2008-10-02 22:13:01Z bennylp $ */
/* /*
* 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,
* 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 24 skipping to change at line 24
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* 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 __PJ_POOL_ALT_H__ #ifndef __PJ_POOL_ALT_H__
#define __PJ_POOL_ALT_H__ #define __PJ_POOL_ALT_H__
#define __PJ_POOL_H__ #define __PJ_POOL_H__
typedef struct pj_pool_t pj_pool_t;
/** /**
* The type for function to receive callback from the pool when it is unabl e * The type for function to receive callback from the pool when it is unabl e
* to allocate memory. The elegant way to handle this condition is to throw * to allocate memory. The elegant way to handle this condition is to throw
* exception, and this is what is expected by most of this library * exception, and this is what is expected by most of this library
* components. * components.
*/ */
typedef void pj_pool_callback(pj_pool_t *pool, pj_size_t size); typedef void pj_pool_callback(pj_pool_t *pool, pj_size_t size);
struct pj_pool_mem
{
struct pj_pool_mem *next;
/* data follows immediately */
};
struct pj_pool_t
{
struct pj_pool_mem *first_mem;
pj_pool_factory *factory;
char obj_name[32];
pj_size_t used_size;
pj_pool_callback *cb;
};
#define PJ_POOL_SIZE (sizeof(struct pj_pool_t))
/** /**
* This constant denotes the exception number that will be thrown by defaul t * This constant denotes the exception number that will be thrown by defaul t
* memory factory policy when memory allocation fails. * memory factory policy when memory allocation fails.
*/ */
extern int PJ_NO_MEMORY_EXCEPTION; extern int PJ_NO_MEMORY_EXCEPTION;
/* /*
* Declare all pool API as macro that calls the implementation * Declare all pool API as macro that calls the implementation
* function. * function.
*/ */
skipping to change at line 101 skipping to change at line 117
/* Allocate memory from the pool and zero the memory */ /* Allocate memory from the pool and zero the memory */
PJ_DECL(void*) pj_pool_calloc_imp(const char *file, int line, PJ_DECL(void*) pj_pool_calloc_imp(const char *file, int line,
pj_pool_t *pool, unsigned cnt, pj_pool_t *pool, unsigned cnt,
unsigned elemsz); unsigned elemsz);
/* Allocate memory from the pool and zero the memory */ /* Allocate memory from the pool and zero the memory */
PJ_DECL(void*) pj_pool_zalloc_imp(const char *file, int line, PJ_DECL(void*) pj_pool_zalloc_imp(const char *file, int line,
pj_pool_t *pool, pj_size_t sz); pj_pool_t *pool, pj_size_t sz);
typedef struct pj_pool_factory #define PJ_POOL_ZALLOC_T(pool,type) \
((type*)pj_pool_zalloc(pool, sizeof(type)))
#define PJ_POOL_ALLOC_T(pool,type) \
((type*)pj_pool_alloc(pool, sizeof(type)))
#ifndef PJ_POOL_ALIGNMENT
# define PJ_POOL_ALIGNMENT 4
#endif
/**
* This structure declares pool factory interface.
*/
typedef struct pj_pool_factory_policy
{
/**
* Allocate memory block (for use by pool). This function is called
* by memory pool to allocate memory block.
*
* @param factory Pool factory.
* @param size The size of memory block to allocate.
*
* @return Memory block.
*/
void* (*block_alloc)(pj_pool_factory *factory, pj_size_t size);
/**
* Free memory block.
*
* @param factory Pool factory.
* @param mem Memory block previously allocated by block_alloc().
* @param size The size of memory block.
*/
void (*block_free)(pj_pool_factory *factory, void *mem, pj_size_t size)
;
/**
* Default callback to be called when memory allocation fails.
*/
pj_pool_callback *callback;
/**
* Option flags.
*/
unsigned flags;
} pj_pool_factory_policy;
struct pj_pool_factory
{ {
pj_pool_factory_policy policy;
int dummy; int dummy;
} pj_pool_factory; };
typedef struct pj_caching_pool struct pj_caching_pool
{ {
pj_pool_factory factory; pj_pool_factory factory;
} pj_caching_pool;
/* just to make it compilable */
unsigned used_count;
unsigned used_size;
unsigned peak_used_size;
};
/* just to make it compilable */
typedef struct pj_pool_block
{
int dummy;
} pj_pool_block;
#define pj_caching_pool_init( cp, pol, mac) #define pj_caching_pool_init( cp, pol, mac)
#define pj_caching_pool_destroy(cp) #define pj_caching_pool_destroy(cp)
#define pj_pool_factory_dump(pf, detail) #define pj_pool_factory_dump(pf, detail)
#endif /* __PJ_POOL_ALT_H__ */ #endif /* __PJ_POOL_ALT_H__ */
 End of changes. 8 change blocks. 
7 lines changed or deleted 81 lines changed or added


 rtcp.h   rtcp.h 
/* $Id: rtcp.h 2039 2008-06-20 22:44:47Z bennylp $ */ /* $Id: rtcp.h 2241 2008-08-26 16:51:28Z nanang $ */
/* /*
* 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,
* 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 204 skipping to change at line 204
* Bidirectional RTP stream statistics. * Bidirectional RTP stream statistics.
*/ */
struct pjmedia_rtcp_stat struct pjmedia_rtcp_stat
{ {
pj_time_val start; /**< Time when session was creat ed */ pj_time_val start; /**< Time when session was creat ed */
pjmedia_rtcp_stream_stat tx; /**< Encoder stream statistics. */ pjmedia_rtcp_stream_stat tx; /**< Encoder stream statistics. */
pjmedia_rtcp_stream_stat rx; /**< Decoder stream statistics. */ pjmedia_rtcp_stream_stat rx; /**< Decoder stream statistics. */
pj_math_stat rtt; /**< Round trip delay statistic(in usec) */ pj_math_stat rtt; /**< Round trip delay statistic(in usec) */
pj_uint32_t rtp_tx_last_ts; /**< Last TX RTP timest
amp. */
pj_uint16_t rtp_tx_last_seq;/**< Last TX RTP sequen
ce. */
}; };
/** /**
* @see pjmedia_rtcp_stat * @see pjmedia_rtcp_stat
*/ */
typedef struct pjmedia_rtcp_stat pjmedia_rtcp_stat; typedef struct pjmedia_rtcp_stat pjmedia_rtcp_stat;
/** /**
* RTCP session is used to monitor the RTP session of one endpoint. There * RTCP session is used to monitor the RTP session of one endpoint. There
* should only be one RTCP session for a bidirectional RTP streams. * should only be one RTCP session for a bidirectional RTP streams.
 End of changes. 2 change blocks. 
1 lines changed or deleted 6 lines changed or added


 session.h   session.h 
/* $Id: session.h 2039 2008-06-20 22:44:47Z bennylp $ */ /* $Id: session.h 2152 2008-07-17 14:54:03Z nanang $ */
/* /*
* 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,
* 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 271 skipping to change at line 271
* @param session The media session. * @param session The media session.
* @param index Stream index. * @param index Stream index.
* @param stat Stream statistic. * @param stat Stream statistic.
* *
* @return PJ_SUCCESS on success. * @return PJ_SUCCESS on success.
*/ */
PJ_DECL(pj_status_t) pjmedia_session_get_stream_stat(pjmedia_session *sessi on, PJ_DECL(pj_status_t) pjmedia_session_get_stream_stat(pjmedia_session *sessi on,
unsigned index, unsigned index,
pjmedia_rtcp_stat *stat ); pjmedia_rtcp_stat *stat );
#if defined(PJMEDIA_HAS_RTCP_XR) && (PJMEDIA_HAS_RTCP_XR != 0)
/**
* Get extended session statistics. The extended statistic shows reports
* from RTCP XR, such as per interval statistics summary (packet count,
* packet lost, jitter, etc), VoIP metrics (delay, quality, etc)
*
* @param session The media session.
* @param index Stream index.
* @param stat_xr Stream extended statistics.
*
* @return PJ_SUCCESS on success.
*/
PJ_DECL(pj_status_t) pjmedia_session_get_stream_stat_xr(
pjmedia_session *session,
unsigned index,
pjmedia_rtcp_xr_stat *stat_xr);
#endif
/** /**
* Dial DTMF digit to the stream, using RFC 2833 mechanism. * Dial DTMF digit to the stream, using RFC 2833 mechanism.
* *
* @param session The media session. * @param session The media session.
* @param index The stream index. * @param index The stream index.
* @param ascii_digits String of ASCII digits (i.e. 0-9*##A-B). * @param ascii_digits String of ASCII digits (i.e. 0-9*##A-B).
* *
* @return PJ_SUCCESS on success. * @return PJ_SUCCESS on success.
*/ */
PJ_DECL(pj_status_t) pjmedia_session_dial_dtmf( pjmedia_session *session, PJ_DECL(pj_status_t) pjmedia_session_dial_dtmf( pjmedia_session *session,
 End of changes. 2 change blocks. 
1 lines changed or deleted 19 lines changed or added


 silencedet.h   silencedet.h 
/* $Id: silencedet.h 2039 2008-06-20 22:44:47Z bennylp $ */ /* $Id: silencedet.h 2222 2008-08-19 11:04:32Z nanang $ */
/* /*
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2007 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,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
skipping to change at line 103 skipping to change at line 103
* *
* @return PJ_SUCCESS on success. * @return PJ_SUCCESS on success.
*/ */
PJ_DECL(pj_status_t) pjmedia_silence_det_set_adaptive(pjmedia_silence_det * sd, PJ_DECL(pj_status_t) pjmedia_silence_det_set_adaptive(pjmedia_silence_det * sd,
int threshold); int threshold);
/** /**
* Set other silence detector parameters. * Set other silence detector parameters.
* *
* @param sd The silence detector * @param sd The silence detector
* @param min_silence Minimum duration of silence (in msec) before * @param before_silence Minimum duration of silence (in msec) before
* silence is reported. If -1 is specified, then * silence is reported. If -1 is specified, then
* the default value will be used. The default is * the default value will be used. The default is
* 400 msec. * 400 msec.
* @param min_signal Minimum duration of signal (in msec) before * @param recalc_time1 The interval (in msec) to recalculate threshold
* signal is reported. If -1 is specified, then * in non-silence condition when adaptive silence
* the default value will be used. The default is * detection is set. If -1 is specified, then the
* equal to one frame. * default value will be used. The default is 4000
* @param recalc_time The interval to recalculate signal and silence * (msec).
* proportion and to readjust the silence threshold * @param recalc_time2 The interval (in msec) to recalculate threshold
* when adaptive silence detection is set. If -1 * in silence condition when adaptive silence detec
* is specified, then the default value will be use tion
d. * is set. If -1 is specified, then the default val
* The default value is 5000 (msec). ue
* will be used. The default value is 2000 (msec).
* *
* @return PJ_SUCCESS on success. * @return PJ_SUCCESS on success.
*/ */
PJ_DECL(pj_status_t) pjmedia_silence_det_set_params( pjmedia_silence_det *s d, PJ_DECL(pj_status_t) pjmedia_silence_det_set_params( pjmedia_silence_det *s d,
int min_silence, int before_silence,
int min_signal, int recalc_time1,
int recalc_time); int recalc_time2);
/** /**
* Disable the silence detector. * Disable the silence detector.
* *
* @param sd The silence detector * @param sd The silence detector
* *
* @return PJ_SUCCESS on success. * @return PJ_SUCCESS on success.
*/ */
PJ_DECL(pj_status_t) pjmedia_silence_det_disable( pjmedia_silence_det *sd ) ; PJ_DECL(pj_status_t) pjmedia_silence_det_disable( pjmedia_silence_det *sd ) ;
 End of changes. 5 change blocks. 
16 lines changed or deleted 17 lines changed or added


 sip_config.h   sip_config.h 
/* $Id: sip_config.h 2039 2008-06-20 22:44:47Z bennylp $ */ /* $Id: sip_config.h 2131 2008-07-13 13:12:36Z bennylp $ */
/* /*
* 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,
* 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 158 skipping to change at line 158
*/ */
PJ_INLINE(pjsip_cfg_t*) pjsip_cfg(void) PJ_INLINE(pjsip_cfg_t*) pjsip_cfg(void)
{ {
return &pjsip_sip_cfg_var; return &pjsip_sip_cfg_var;
} }
#endif /* PJ_DLL */ #endif /* PJ_DLL */
/** /**
* Specify maximum transaction count in transaction hash table. * Specify maximum transaction count in transaction hash table.
* Default value is 16*1024 * For efficiency, the value should be 2^n-1 since it will be
* rounded up to 2^n.
*
* Default value is 1023
*/ */
#ifndef PJSIP_MAX_TSX_COUNT #ifndef PJSIP_MAX_TSX_COUNT
# define PJSIP_MAX_TSX_COUNT (16*1024) # define PJSIP_MAX_TSX_COUNT (1024-1)
#endif #endif
/** /**
* Specify maximum number of dialogs in the dialog hash table. * Specify maximum number of dialogs in the dialog hash table.
* Default value is 16*1024. * For efficiency, the value should be 2^n-1 since it will be
* rounded up to 2^n.
*
* Default value is 511.
*/ */
#ifndef PJSIP_MAX_DIALOG_COUNT #ifndef PJSIP_MAX_DIALOG_COUNT
# define PJSIP_MAX_DIALOG_COUNT (16*1024) # define PJSIP_MAX_DIALOG_COUNT (512-1)
#endif #endif
/** /**
* Specify maximum number of transports. * Specify maximum number of transports.
* Default value is equal to maximum number of handles in ioqueue. * Default value is equal to maximum number of handles in ioqueue.
* See also PJSIP_TPMGR_HTABLE_SIZE. * See also PJSIP_TPMGR_HTABLE_SIZE.
*/ */
#ifndef PJSIP_MAX_TRANSPORTS #ifndef PJSIP_MAX_TRANSPORTS
# define PJSIP_MAX_TRANSPORTS (PJ_IOQUEUE_MAX_HANDLES) # define PJSIP_MAX_TRANSPORTS (PJ_IOQUEUE_MAX_HANDLES)
#endif #endif
skipping to change at line 528 skipping to change at line 534
* Memory increment for tdata. * Memory increment for tdata.
*/ */
#ifndef PJSIP_POOL_INC_TDATA #ifndef PJSIP_POOL_INC_TDATA
# define PJSIP_POOL_INC_TDATA 4000 # define PJSIP_POOL_INC_TDATA 4000
#endif #endif
/** /**
* Initial memory size for UA layer * Initial memory size for UA layer
*/ */
#ifndef PJSIP_POOL_LEN_UA #ifndef PJSIP_POOL_LEN_UA
# define PJSIP_POOL_LEN_UA 4000 # define PJSIP_POOL_LEN_UA 512
#endif #endif
/** /**
* Memory increment for UA layer. * Memory increment for UA layer.
*/ */
#ifndef PJSIP_POOL_INC_UA #ifndef PJSIP_POOL_INC_UA
# define PJSIP_POOL_INC_UA 4000 # define PJSIP_POOL_INC_UA 512
#endif #endif
#define PJSIP_MAX_FORWARDS_VALUE 70 #define PJSIP_MAX_FORWARDS_VALUE 70
#define PJSIP_RFC3261_BRANCH_ID "z9hG4bK" #define PJSIP_RFC3261_BRANCH_ID "z9hG4bK"
#define PJSIP_RFC3261_BRANCH_LEN 7 #define PJSIP_RFC3261_BRANCH_LEN 7
/* Transaction related constants. */ /* Transaction related constants. */
/** /**
* Initial memory size for transaction layer * Initial memory size for transaction layer. The bulk of pool usage
* for transaction layer will be used to create the hash table, so
* setting this value too high will not help too much with reducing
* fragmentation and the memory will most likely be wasted.
*/ */
#ifndef PJSIP_POOL_TSX_LAYER_LEN #ifndef PJSIP_POOL_TSX_LAYER_LEN
# define PJSIP_POOL_TSX_LAYER_LEN 4000 # define PJSIP_POOL_TSX_LAYER_LEN 512
#endif #endif
/** /**
* Memory increment for transaction layer. * Memory increment for transaction layer. The bulk of pool usage
* for transaction layer will be used to create the hash table, so
* setting this value too high will not help too much with reducing
* fragmentation and the memory will most likely be wasted.
*/ */
#ifndef PJSIP_POOL_TSX_LAYER_INC #ifndef PJSIP_POOL_TSX_LAYER_INC
# define PJSIP_POOL_TSX_LAYER_INC 4000 # define PJSIP_POOL_TSX_LAYER_INC 512
#endif #endif
/** /**
* Initial memory size for a SIP transaction object. * Initial memory size for a SIP transaction object.
*/ */
#ifndef PJSIP_POOL_TSX_LEN #ifndef PJSIP_POOL_TSX_LEN
# define PJSIP_POOL_TSX_LEN 1536 /* 768 */ # define PJSIP_POOL_TSX_LEN 1536 /* 768 */
#endif #endif
/** /**
 End of changes. 11 change blocks. 
11 lines changed or deleted 23 lines changed or added


 sip_msg.h   sip_msg.h 
/* $Id: sip_msg.h 2039 2008-06-20 22:44:47Z bennylp $ */ /* $Id: sip_msg.h 2146 2008-07-16 12:31:57Z bennylp $ */
/* /*
* 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,
* 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 773 skipping to change at line 773
* specified header. * specified header.
* *
* @return The header field, or NULL if no header with the specifie d * @return The header field, or NULL if no header with the specifie d
* type is found. * type is found.
*/ */
PJ_DECL(void*) pjsip_msg_find_hdr_by_name( const pjsip_msg *msg, PJ_DECL(void*) pjsip_msg_find_hdr_by_name( const pjsip_msg *msg,
const pj_str_t *name, const pj_str_t *name,
const void *start); const void *start);
/** /**
* Find a header in the message by its name and short name version.
*
* @param msg The message.
* @param name The header name to find.
* @param sname The short name version of the header name.
* @param start The first header field where the search should b
egin.
* If NULL is specified, then the search will begin from th
e
* first header, otherwise the search will begin at the
* specified header.
*
* @return The header field, or NULL if no header with the specifie
d
* type is found.
*/
PJ_DECL(void*) pjsip_msg_find_hdr_by_names(const pjsip_msg *msg,
const pj_str_t *name,
const pj_str_t *sname,
const void *start);
/**
* Find and remove a header in the message. * Find and remove a header in the message.
* *
* @param msg The message. * @param msg The message.
* @param hdr The header type to find. * @param hdr The header type to find.
* @param start The first header field where the search should b egin, * @param start The first header field where the search should b egin,
* or NULL to search from the first header in the message. * or NULL to search from the first header in the message.
* *
* @return The header field, or NULL if not found. * @return The header field, or NULL if not found.
*/ */
PJ_DECL(void*) pjsip_msg_find_remove_hdr( pjsip_msg *msg, PJ_DECL(void*) pjsip_msg_find_remove_hdr( pjsip_msg *msg,
 End of changes. 2 change blocks. 
1 lines changed or deleted 23 lines changed or added


 sip_parser.h   sip_parser.h 
/* $Id: sip_parser.h 2039 2008-06-20 22:44:47Z bennylp $ */ /* $Id: sip_parser.h 2193 2008-08-05 19:28:17Z bennylp $ */
/* /*
* 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,
* 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 355 skipping to change at line 355
pj_cis_t pjsip_USER_SPEC_ESC; /**< Variant without the escape ('%' ) pj_cis_t pjsip_USER_SPEC_ESC; /**< Variant without the escape ('%' )
char */ char */
pj_cis_t pjsip_USER_SPEC_LENIENT; /**< User, with additional '#' char */ pj_cis_t pjsip_USER_SPEC_LENIENT; /**< User, with additional '#' char */
pj_cis_t pjsip_USER_SPEC_LENIENT_ESC;/**< pjsip_USER_SPEC_ESC with '#' */ pj_cis_t pjsip_USER_SPEC_LENIENT_ESC;/**< pjsip_USER_SPEC_ESC with '#' */
pj_cis_t pjsip_NOT_NEWLINE; /**< For eating up header, b asically pj_cis_t pjsip_NOT_NEWLINE; /**< For eating up header, b asically
any chars except newlines or any chars except newlines or
zero. */ zero. */
pj_cis_t pjsip_NOT_COMMA_OR_NEWLINE;/**< Array elements. */ pj_cis_t pjsip_NOT_COMMA_OR_NEWLINE;/**< Array elements. */
pj_cis_t pjsip_DISPLAY_SPEC; /**< Used when searching for display pj_cis_t pjsip_DISPLAY_SPEC; /**< Used when searching for display
name. */ name. */
pj_cis_t pjsip_OTHER_URI_CONTENT; /**< Generic URI content. */
} pjsip_parser_const_t; } pjsip_parser_const_t;
/** /**
* Get parser constants. * Get parser constants.
*/ */
PJ_DECL(const pjsip_parser_const_t*) pjsip_parser_const(void); PJ_DECL(const pjsip_parser_const_t*) pjsip_parser_const(void);
/* /*
* Parser utilities. * Parser utilities.
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 sip_transport.h   sip_transport.h 
/* $Id: sip_transport.h 2039 2008-06-20 22:44:47Z bennylp $ */ /* $Id: sip_transport.h 2326 2008-09-27 08:55:16Z bennylp $ */
/* /*
* 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,
* 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 542 skipping to change at line 542
* Create a new, blank transmit buffer. The reference count is initialized * Create a new, blank transmit buffer. The reference count is initialized
* to zero. * to zero.
* *
* @param mgr The transport manager. * @param mgr The transport manager.
* @param tdata Pointer to receive transmit data. * @param tdata Pointer to receive transmit data.
* *
* @return PJ_SUCCESS, or the appropriate error code. * @return PJ_SUCCESS, or the appropriate error code.
* *
* @see pjsip_endpt_create_tdata * @see pjsip_endpt_create_tdata
*/ */
pj_status_t pjsip_tx_data_create( pjsip_tpmgr *mgr, PJ_DECL(pj_status_t) pjsip_tx_data_create( pjsip_tpmgr *mgr,
pjsip_tx_data **tdata ); pjsip_tx_data **tdata );
/** /**
* Add reference counter to the transmit buffer. The reference counter cont rols * Add reference counter to the transmit buffer. The reference counter cont rols
* the life time of the buffer, ie. when the counter reaches zero, then it * the life time of the buffer, ie. when the counter reaches zero, then it
* will be destroyed. * will be destroyed.
* *
* @param tdata The transmit buffer. * @param tdata The transmit buffer.
*/ */
PJ_DECL(void) pjsip_tx_data_add_ref( pjsip_tx_data *tdata ); PJ_DECL(void) pjsip_tx_data_add_ref( pjsip_tx_data *tdata );
 End of changes. 2 change blocks. 
3 lines changed or deleted 3 lines changed or added


 sip_transport_tls.h   sip_transport_tls.h 
/* $Id: sip_transport_tls.h 2039 2008-06-20 22:44:47Z bennylp $ */ /* $Id: sip_transport_tls.h 2094 2008-07-01 15:31:59Z bennylp $ */
/* /*
* 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,
* 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 108 skipping to change at line 108
*/ */
int method; int method;
/** /**
* TLS cipher list string in OpenSSL format. If empty, then default * TLS cipher list string in OpenSSL format. If empty, then default
* cipher list of the backend will be used. * cipher list of the backend will be used.
*/ */
pj_str_t ciphers; pj_str_t ciphers;
/** /**
* Optionally specify the server name instance to be contacted when
* making outgoing TLS connection. This setting is useful when the
* server is hosting multiple domains for the same TLS listening
* socket.
*
* Default: empty.
*/
pj_str_t server_name;
/**
* When PJSIP is acting as a client (outgoing TLS connections), * When PJSIP is acting as a client (outgoing TLS connections),
* it will always receive a certificate from the peer. * it will always receive a certificate from the peer.
* If \a verify_server is disabled (set to zero), PJSIP will not * If \a verify_server is disabled (set to zero), PJSIP will not
* verifiy the certificate and allows TLS connections to servers * verifiy the certificate and allows TLS connections to servers
* which do not present a valid certificate. * which do not present a valid certificate.
* If \a tls_verify_server is non-zero, PJSIP verifies the server * If \a tls_verify_server is non-zero, PJSIP verifies the server
* certificate and will close the TLS connection if the server * certificate and will close the TLS connection if the server
* certificate is not valid. * certificate is not valid.
* *
* This setting corresponds to OpenSSL SSL_VERIFY_PEER flag. * This setting corresponds to OpenSSL SSL_VERIFY_PEER flag.
 End of changes. 2 change blocks. 
1 lines changed or deleted 11 lines changed or added


 sip_uri.h   sip_uri.h 
/* $Id: sip_uri.h 2039 2008-06-20 22:44:47Z bennylp $ */ /* $Id: sip_uri.h 2193 2008-08-05 19:28:17Z bennylp $ */
/* /*
* 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,
* 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 252 skipping to change at line 252
return (*((pjsip_uri*)uri)->vptr->p_get_scheme)(uri); return (*((pjsip_uri*)uri)->vptr->p_get_scheme)(uri);
} }
/** /**
* Generic function to get the URI object contained by this URI, or the URI * Generic function to get the URI object contained by this URI, or the URI
* itself if it doesn't contain another URI. * itself if it doesn't contain another URI.
* *
* @param uri the URI. * @param uri the URI.
* @return the URI. * @return the URI.
*/ */
PJ_INLINE(void*) pjsip_uri_get_uri(void *uri) PJ_INLINE(void*) pjsip_uri_get_uri(const void *uri)
{ {
return (*((pjsip_uri*)uri)->vptr->p_get_uri)(uri); return (*((pjsip_uri*)uri)->vptr->p_get_uri)((void*)uri);
} }
/** /**
* Generic function to compare two URIs. * Generic function to compare two URIs.
* *
* @param context Comparison context. * @param context Comparison context.
* @param uri1 The first URI. * @param uri1 The first URI.
* @param uri2 The second URI. * @param uri2 The second URI.
* @return PJ_SUCCESS if equal, or otherwise the error status which * @return PJ_SUCCESS if equal, or otherwise the error status which
* should point to the mismatch part. * should point to the mismatch part.
skipping to change at line 410 skipping to change at line 410
* @param rhs The source name address. * @param rhs The source name address.
*/ */
PJ_DECL(void) pjsip_name_addr_assign(pj_pool_t *pool, PJ_DECL(void) pjsip_name_addr_assign(pj_pool_t *pool,
pjsip_name_addr *addr, pjsip_name_addr *addr,
const pjsip_name_addr *rhs); const pjsip_name_addr *rhs);
/** /**
* @} * @}
*/ */
/**
* @defgroup PJSIP_OTHER_URI Other URI schemes
* @ingroup PJSIP_URI
* @brief Container for non SIP/tel URI scheme (e.g. "http:", "mailto:")
* @{
*/
/**
* Generic URI container for non SIP/tel URI scheme.
*/
typedef struct pjsip_other_uri
{
pjsip_uri_vptr *vptr; /**< Pointer to virtual function table. */
pj_str_t scheme; /**< The URI scheme (e.g. "mailto") */
pj_str_t content; /**< The whole URI content */
} pjsip_other_uri;
/**
* Create a generic URI object.
*
* @param pool The pool to allocate memory from.
*
* @return The URI instance.
*/
PJ_DECL(pjsip_other_uri*) pjsip_other_uri_create(pj_pool_t *pool);
/**
* @}
*/
PJ_END_DECL PJ_END_DECL
#endif /* __PJSIP_URL_H__ */ #endif /* __PJSIP_URL_H__ */
 End of changes. 4 change blocks. 
3 lines changed or deleted 33 lines changed or added


 sip_xfer.h   sip_xfer.h 
/* $Id: sip_xfer.h 2039 2008-06-20 22:44:47Z bennylp $ */ /* $Id: sip_xfer.h 2121 2008-07-11 00:56:07Z bennylp $ */
/* /*
* 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,
* 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 64 skipping to change at line 64
* Initiation Protocol (SIP) Refer Method</A> * Initiation Protocol (SIP) Refer Method</A>
* - @ref PJSIP_EVENT_NOT * - @ref PJSIP_EVENT_NOT
*/ */
PJ_BEGIN_DECL PJ_BEGIN_DECL
/** Declaration for REFER method constant. */ /** Declaration for REFER method constant. */
PJ_DECL_DATA(const pjsip_method) pjsip_refer_method; PJ_DECL_DATA(const pjsip_method) pjsip_refer_method;
/** Get REFER method constant */ /** Get REFER method constant */
PJ_DECL(const pjsip_method*) pjsip_get_refer_method(); PJ_DECL(const pjsip_method*) pjsip_get_refer_method(void);
/** /**
* Initialize the REFER subsystem. * Initialize the REFER subsystem.
* This currently does very little (only register REFER as supported method ). * This currently does very little (only register REFER as supported method ).
*/ */
PJ_DECL(pj_status_t) pjsip_xfer_init_module(pjsip_endpoint *endpt); PJ_DECL(pj_status_t) pjsip_xfer_init_module(pjsip_endpoint *endpt);
/** /**
* Create transferer (sender of REFER request). * Create transferer (sender of REFER request).
* *
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 sock.h   sock.h 
/* $Id: sock.h 2039 2008-06-20 22:44:47Z bennylp $ */ /* $Id: sock.h 2283 2008-09-16 16:11:44Z nanang $ */
/* /*
* 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,
* 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 284 skipping to change at line 284
/** Socket type. @see pj_SO_TYPE() */ /** Socket type. @see pj_SO_TYPE() */
extern const pj_uint16_t PJ_SO_TYPE; extern const pj_uint16_t PJ_SO_TYPE;
/** Buffer size for receive. @see pj_SO_RCVBUF() */ /** Buffer size for receive. @see pj_SO_RCVBUF() */
extern const pj_uint16_t PJ_SO_RCVBUF; extern const pj_uint16_t PJ_SO_RCVBUF;
/** Buffer size for send. @see pj_SO_SNDBUF() */ /** Buffer size for send. @see pj_SO_SNDBUF() */
extern const pj_uint16_t PJ_SO_SNDBUF; extern const pj_uint16_t PJ_SO_SNDBUF;
/** IP multicast interface. @see pj_IP_MULTICAST_IF() */
extern const pj_uint16_t PJ_IP_MULTICAST_IF;
/** IP multicast ttl. @see pj_IP_MULTICAST_TTL() */
extern const pj_uint16_t PJ_IP_MULTICAST_TTL;
/** IP multicast loopback. @see pj_IP_MULTICAST_LOOP() */
extern const pj_uint16_t PJ_IP_MULTICAST_LOOP;
/** Add an IP group membership. @see pj_IP_ADD_MEMBERSHIP() */
extern const pj_uint16_t PJ_IP_ADD_MEMBERSHIP;
/** Drop an IP group membership. @see pj_IP_DROP_MEMBERSHIP() */
extern const pj_uint16_t PJ_IP_DROP_MEMBERSHIP;
#if defined(PJ_DLL) #if defined(PJ_DLL)
/** Get #PJ_SO_TYPE constant */ /** Get #PJ_SO_TYPE constant */
PJ_DECL(pj_uint16_t) pj_SO_TYPE(void); PJ_DECL(pj_uint16_t) pj_SO_TYPE(void);
/** Get #PJ_SO_RCVBUF constant */ /** Get #PJ_SO_RCVBUF constant */
PJ_DECL(pj_uint16_t) pj_SO_RCVBUF(void); PJ_DECL(pj_uint16_t) pj_SO_RCVBUF(void);
/** Get #PJ_SO_SNDBUF constant */ /** Get #PJ_SO_SNDBUF constant */
PJ_DECL(pj_uint16_t) pj_SO_SNDBUF(void); PJ_DECL(pj_uint16_t) pj_SO_SNDBUF(void);
/** Get #PJ_IP_MULTICAST_IF constant */
PJ_DECL(pj_uint16_t) pj_IP_MULTICAST_IF(void);
/** Get #PJ_IP_MULTICAST_TTL constant */
PJ_DECL(pj_uint16_t) pj_IP_MULTICAST_TTL(void);
/** Get #PJ_IP_MULTICAST_LOOP constant */
PJ_DECL(pj_uint16_t) pj_IP_MULTICAST_LOOP(void);
/** Get #PJ_IP_ADD_MEMBERSHIP constant */
PJ_DECL(pj_uint16_t) pj_IP_ADD_MEMBERSHIP(void);
/** Get #PJ_IP_DROP_MEMBERSHIP constant */
PJ_DECL(pj_uint16_t) pj_IP_DROP_MEMBERSHIP(void);
#else #else
/** Get #PJ_SO_TYPE constant */ /** Get #PJ_SO_TYPE constant */
# define pj_SO_TYPE() PJ_SO_TYPE # define pj_SO_TYPE() PJ_SO_TYPE
/** Get #PJ_SO_RCVBUF constant */ /** Get #PJ_SO_RCVBUF constant */
# define pj_SO_RCVBUF() PJ_SO_RCVBUF # define pj_SO_RCVBUF() PJ_SO_RCVBUF
/** Get #PJ_SO_SNDBUF constant */ /** Get #PJ_SO_SNDBUF constant */
# define pj_SO_SNDBUF() PJ_SO_SNDBUF # define pj_SO_SNDBUF() PJ_SO_SNDBUF
/** Get #PJ_IP_MULTICAST_IF constant */
# define pj_IP_MULTICAST_IF() PJ_IP_MULTICAST_IF
/** Get #PJ_IP_MULTICAST_TTL constant */
# define pj_IP_MULTICAST_TTL() PJ_IP_MULTICAST_TTL
/** Get #PJ_IP_MULTICAST_LOOP constant */
# define pj_IP_MULTICAST_LOOP() PJ_IP_MULTICAST_LOOP
/** Get #PJ_IP_ADD_MEMBERSHIP constant */
# define pj_IP_ADD_MEMBERSHIP() PJ_IP_ADD_MEMBERSHIP
/** Get #PJ_IP_DROP_MEMBERSHIP constant */
# define pj_IP_DROP_MEMBERSHIP() PJ_IP_DROP_MEMBERSHIP
#endif #endif
/* /*
* Flags to be specified in #pj_sock_recv, #pj_sock_send, etc. * Flags to be specified in #pj_sock_recv, #pj_sock_send, etc.
*/ */
/** Out-of-band messages. @see pj_MSG_OOB() */ /** Out-of-band messages. @see pj_MSG_OOB() */
extern const int PJ_MSG_OOB; extern const int PJ_MSG_OOB;
/** Peek, don't remove from buffer. @see pj_MSG_PEEK() */ /** Peek, don't remove from buffer. @see pj_MSG_PEEK() */
skipping to change at line 495 skipping to change at line 540
/** /**
* This union describes a generic socket address. * This union describes a generic socket address.
*/ */
typedef union pj_sockaddr typedef union pj_sockaddr
{ {
pj_addr_hdr addr; /**< Generic transport address. */ pj_addr_hdr addr; /**< Generic transport address. */
pj_sockaddr_in ipv4; /**< IPv4 transport address. */ pj_sockaddr_in ipv4; /**< IPv4 transport address. */
pj_sockaddr_in6 ipv6; /**< IPv6 transport address. */ pj_sockaddr_in6 ipv6; /**< IPv6 transport address. */
} pj_sockaddr; } pj_sockaddr;
/**
* This structure provides multicast group information for IPv4 addresses.
*/
typedef struct pj_ip_mreq {
pj_in_addr imr_multiaddr; /**< IP multicast address of group. */
pj_in_addr imr_interface; /**< local IP address of interface. */
} pj_ip_mreq;
/************************************************************************** *** /************************************************************************** ***
* *
* SOCKET ADDRESS MANIPULATION. * SOCKET ADDRESS MANIPULATION.
* *
************************************************************************** *** ************************************************************************** ***
*/ */
/** /**
* Convert 16-bit value from network byte order to host byte order. * Convert 16-bit value from network byte order to host byte order.
* *
 End of changes. 5 change blocks. 
1 lines changed or deleted 54 lines changed or added


 socket.h   socket.h 
/* $Id: socket.h 2039 2008-06-20 22:44:47Z bennylp $ */ /* $Id: socket.h 2331 2008-09-27 13:16:35Z bennylp $ */
/* /*
* 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,
* 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 35 skipping to change at line 35
*/ */
#if defined(PJ_HAS_WINSOCK2_H) && PJ_HAS_WINSOCK2_H != 0 #if defined(PJ_HAS_WINSOCK2_H) && PJ_HAS_WINSOCK2_H != 0
# include <winsock2.h> # include <winsock2.h>
#endif #endif
#if defined(PJ_HAS_WINSOCK_H) && PJ_HAS_WINSOCK_H != 0 #if defined(PJ_HAS_WINSOCK_H) && PJ_HAS_WINSOCK_H != 0
# include <winsock.h> # include <winsock.h>
#endif #endif
#if defined(PJ_HAS_WS2TCPIP_H) && PJ_HAS_WS2TCPIP_H != 0
# include <ws2tcpip.h>
#endif
/* /*
* IPv6 for Visual Studio's * IPv6 for Visual Studio's
* *
* = Visual Studio 6 = * = Visual Studio 6 =
* *
* Visual Studio 6 does not ship with IPv6 support, so you MUST * Visual Studio 6 does not ship with IPv6 support, so you MUST
* download and install IPv6 Tehnology Preview (IPv6Kit) from: * download and install IPv6 Tehnology Preview (IPv6Kit) from:
* http://msdn.microsoft.com/downloads/sdks/platform/tpipv6/ReadMe.asp * http://msdn.microsoft.com/downloads/sdks/platform/tpipv6/ReadMe.asp
* Then put IPv6Kit\inc in your Visual Studio include path. * Then put IPv6Kit\inc in your Visual Studio include path.
* *
skipping to change at line 61 skipping to change at line 65
* = Visual Studio 2003, 2005 (including Express) = * = Visual Studio 2003, 2005 (including Express) =
* *
* These VS uses Microsoft Platform SDK for Windows Server 2003 SP1, and * These VS uses Microsoft Platform SDK for Windows Server 2003 SP1, and
* it has built-in IPv6 support. * it has built-in IPv6 support.
*/ */
#if defined(_MSC_VER) && defined(PJ_HAS_IPV6) && PJ_HAS_IPV6!=0 #if defined(_MSC_VER) && defined(PJ_HAS_IPV6) && PJ_HAS_IPV6!=0
# ifndef s_addr # ifndef s_addr
# define s_addr S_un.S_addr # define s_addr S_un.S_addr
# endif # endif
# include <ws2tcpip.h> # if !defined(IPPROTO_IPV6)
# ifndef IPPROTO_IPV6
/* Need to download and install IPv6Kit for this platform. /* Need to download and install IPv6Kit for this platform.
* Please see the comments above about Visual Studio 6. * Please see the comments above about Visual Studio 6.
*/ */
# include <tpipv6.h> # include <tpipv6.h>
# endif # endif
# define PJ_SOCK_HAS_GETADDRINFO 1 # define PJ_SOCK_HAS_GETADDRINFO 1
#endif /* _MSC_VER */ #endif /* _MSC_VER */
#if defined(PJ_HAS_SYS_TYPES_H) && PJ_HAS_SYS_TYPES_H != 0 #if defined(PJ_HAS_SYS_TYPES_H) && PJ_HAS_SYS_TYPES_H != 0
skipping to change at line 93 skipping to change at line 95
#endif #endif
#if defined(PJ_HAS_SYS_SELECT_H) && PJ_HAS_SYS_SELECT_H != 0 #if defined(PJ_HAS_SYS_SELECT_H) && PJ_HAS_SYS_SELECT_H != 0
# include <sys/select.h> # include <sys/select.h>
#endif #endif
#if defined(PJ_HAS_NETINET_IN_H) && PJ_HAS_NETINET_IN_H != 0 #if defined(PJ_HAS_NETINET_IN_H) && PJ_HAS_NETINET_IN_H != 0
# include <netinet/in.h> # include <netinet/in.h>
#endif #endif
#if defined(PJ_HAS_NETINET_IN_SYSTM_H) && PJ_HAS_NETINET_IN_SYSTM_H != 0
/* Required to include netinet/ip.h in FreeBSD 7.0 */
# include <netinet/in_systm.h>
#endif
#if defined(PJ_HAS_NETINET_IP_H) && PJ_HAS_NETINET_IP_H != 0 #if defined(PJ_HAS_NETINET_IP_H) && PJ_HAS_NETINET_IP_H != 0
/* To pull in IPTOS_* constants */ /* To pull in IPTOS_* constants */
# include <netinet/ip.h> # include <netinet/ip.h>
#endif #endif
#if defined(PJ_HAS_NET_IF_H) && PJ_HAS_NET_IF_H != 0 #if defined(PJ_HAS_NET_IF_H) && PJ_HAS_NET_IF_H != 0
/* For interface enumeration in ip_helper */ /* For interface enumeration in ip_helper */
# include <net/if.h> # include <net/if.h>
#endif #endif
 End of changes. 4 change blocks. 
4 lines changed or deleted 11 lines changed or added


 sound_port.h   sound_port.h 
/* $Id: sound_port.h 2039 2008-06-20 22:44:47Z bennylp $ */ /* $Id: sound_port.h 2166 2008-07-22 10:36:38Z bennylp $ */
/* /*
* 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,
* 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 218 skipping to change at line 218
* *
* @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);
/** /**
* Enable or disable echo canceller. By default the EC is enabled after it
* was created, so there is no need to enable the EC after creating it.
* This function is only useful to disable the echo canceller temporarily,
* for example during idle period, to prevent EC from using
*/
/**
* 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. 2 change blocks. 
8 lines changed or deleted 1 lines changed or added


 stream.h   stream.h 
/* $Id: stream.h 2039 2008-06-20 22:44:47Z bennylp $ */ /* $Id: stream.h 2241 2008-08-26 16:51:28Z nanang $ */
/* /*
* 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,
* 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 109 skipping to change at line 109
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 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_uint16_t rtp_seq; /**< Initial RTP sequence number
. */
pj_uint8_t rtp_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
*/
int jb_init; /**< Jitter buffer init delay in msec. int jb_init; /**< Jitter buffer init delay in msec.
(-1 for default). */ (-1 for default). */
int jb_min_pre; /**< Jitter buffer minimum prefe tch int jb_min_pre; /**< Jitter buffer minimum prefe tch
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. */
}; };
/** /**
 End of changes. 3 change blocks. 
1 lines changed or deleted 14 lines changed or added


 string.h   string.h 
/* $Id: string.h 2039 2008-06-20 22:44:47Z bennylp $ */ /* $Id: string.h 2169 2008-07-23 13:26:33Z bennylp $ */
/* /*
* 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,
* 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 534 skipping to change at line 534
* generated string is not NULL terminated. * generated string is not NULL terminated.
* *
* @param str the string to store the result. * @param str the string to store the result.
* @param length the length of the random string to generate. * @param length the length of the random string to generate.
* *
* @return the string. * @return the string.
*/ */
PJ_DECL(char*) pj_create_random_string(char *str, pj_size_t length); PJ_DECL(char*) pj_create_random_string(char *str, pj_size_t length);
/** /**
* Convert string to unsigned integer. * Convert string to unsigned integer. The conversion will stop as
* soon as non-digit character is found or all the characters have
* been processed.
* *
* @param str the string. * @param str the string.
* *
* @return the unsigned integer. * @return the unsigned integer.
*/ */
PJ_DECL(unsigned long) pj_strtoul(const pj_str_t *str); PJ_DECL(unsigned long) pj_strtoul(const pj_str_t *str);
/** /**
* Convert strings to an unsigned long-integer value. * Convert strings to an unsigned long-integer value.
* This function stops reading the string input either when the number * This function stops reading the string input either when the number
 End of changes. 2 change blocks. 
2 lines changed or deleted 4 lines changed or added


 stun_msg.h   stun_msg.h 
/* $Id: stun_msg.h 2044 2008-06-21 17:51:31Z bennylp $ */ /* $Id: stun_msg.h 2234 2008-08-22 17:46:33Z bennylp $ */
/* /*
* Copyright (C) 2003-2007 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2007 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,
* 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 274 skipping to change at line 274
PJ_STUN_ATTR_CHANGED_ADDR = 0x0005,/**< CHANGED-ADDRESS (deprecatd )*/ PJ_STUN_ATTR_CHANGED_ADDR = 0x0005,/**< CHANGED-ADDRESS (deprecatd )*/
PJ_STUN_ATTR_USERNAME = 0x0006,/**< USERNAME attribute. */ PJ_STUN_ATTR_USERNAME = 0x0006,/**< USERNAME attribute. */
PJ_STUN_ATTR_PASSWORD = 0x0007,/**< was PASSWORD attribute. */ PJ_STUN_ATTR_PASSWORD = 0x0007,/**< was PASSWORD attribute. */
PJ_STUN_ATTR_MESSAGE_INTEGRITY = 0x0008,/**< MESSAGE-INTEGRITY. */ PJ_STUN_ATTR_MESSAGE_INTEGRITY = 0x0008,/**< MESSAGE-INTEGRITY. */
PJ_STUN_ATTR_ERROR_CODE = 0x0009,/**< ERROR-CODE. */ PJ_STUN_ATTR_ERROR_CODE = 0x0009,/**< ERROR-CODE. */
PJ_STUN_ATTR_UNKNOWN_ATTRIBUTES = 0x000A,/**< UNKNOWN-ATTRIBUTES. */ PJ_STUN_ATTR_UNKNOWN_ATTRIBUTES = 0x000A,/**< UNKNOWN-ATTRIBUTES. */
PJ_STUN_ATTR_REFLECTED_FROM = 0x000B,/**< REFLECTED-FROM (de precatd)*/ PJ_STUN_ATTR_REFLECTED_FROM = 0x000B,/**< REFLECTED-FROM (de precatd)*/
PJ_STUN_ATTR_CHANNEL_NUMBER = 0x000C,/**< TURN CHANNEL-NUMBE R */ PJ_STUN_ATTR_CHANNEL_NUMBER = 0x000C,/**< TURN CHANNEL-NUMBE R */
PJ_STUN_ATTR_LIFETIME = 0x000D,/**< TURN LIFETIME attr. */ PJ_STUN_ATTR_LIFETIME = 0x000D,/**< TURN LIFETIME attr. */
PJ_STUN_ATTR_MAGIC_COOKIE = 0x000F,/**< MAGIC-COOKIE attr (deprec) */ PJ_STUN_ATTR_MAGIC_COOKIE = 0x000F,/**< MAGIC-COOKIE attr (deprec) */
PJ_STUN_ATTR_BANDWIDTH = 0x0010,/**< TURN BANDWIDTH attr. */ PJ_STUN_ATTR_BANDWIDTH = 0x0010,/**< TURN BANDWIDTH (deprec) */
PJ_STUN_ATTR_PEER_ADDR = 0x0012,/**< TURN PEER-ADDRESS attr. */ PJ_STUN_ATTR_PEER_ADDR = 0x0012,/**< TURN PEER-ADDRESS attr. */
PJ_STUN_ATTR_DATA = 0x0013,/**< DATA attribute. */ PJ_STUN_ATTR_DATA = 0x0013,/**< DATA attribute. */
PJ_STUN_ATTR_REALM = 0x0014,/**< REALM attribute. */ PJ_STUN_ATTR_REALM = 0x0014,/**< REALM attribute. */
PJ_STUN_ATTR_NONCE = 0x0015,/**< NONCE attribute. */ PJ_STUN_ATTR_NONCE = 0x0015,/**< NONCE attribute. */
PJ_STUN_ATTR_RELAY_ADDR = 0x0016,/**< RELAY-ADDRESS attribute. */ PJ_STUN_ATTR_RELAYED_ADDR = 0x0016,/**< RELAYED-ADDRESS attribute. */
PJ_STUN_ATTR_REQ_ADDR_TYPE = 0x0017,/**< REQUESTED-ADDRESS-TYPE */ PJ_STUN_ATTR_REQ_ADDR_TYPE = 0x0017,/**< REQUESTED-ADDRESS-TYPE */
PJ_STUN_ATTR_REQ_PROPS = 0x0018,/**< REQUESTED-PROPS */ PJ_STUN_ATTR_REQ_PROPS = 0x0018,/**< REQUESTED-PROPS */
PJ_STUN_ATTR_REQ_TRANSPORT = 0x0019,/**< REQUESTED-TRANSPORT */ PJ_STUN_ATTR_REQ_TRANSPORT = 0x0019,/**< REQUESTED-TRANSPORT */
PJ_STUN_ATTR_XOR_MAPPED_ADDR = 0x0020,/**< XOR-MAPPED-ADDRESS */ PJ_STUN_ATTR_XOR_MAPPED_ADDR = 0x0020,/**< XOR-MAPPED-ADDRESS */
PJ_STUN_ATTR_TIMER_VAL = 0x0021,/**< TIMER-VAL attribute. */ PJ_STUN_ATTR_TIMER_VAL = 0x0021,/**< TIMER-VAL attribute. */
PJ_STUN_ATTR_RESERVATION_TOKEN = 0x0022,/**< TURN RESERVATION-TOKEN */ PJ_STUN_ATTR_RESERVATION_TOKEN = 0x0022,/**< TURN RESERVATION-TOKEN */
PJ_STUN_ATTR_XOR_REFLECTED_FROM = 0x0023,/**< XOR-REFLECTED-FROM */ PJ_STUN_ATTR_XOR_REFLECTED_FROM = 0x0023,/**< XOR-REFLECTED-FROM */
PJ_STUN_ATTR_PRIORITY = 0x0024,/**< PRIORITY */ PJ_STUN_ATTR_PRIORITY = 0x0024,/**< PRIORITY */
PJ_STUN_ATTR_USE_CANDIDATE = 0x0025,/**< USE-CANDIDATE */ PJ_STUN_ATTR_USE_CANDIDATE = 0x0025,/**< USE-CANDIDATE */
PJ_STUN_ATTR_XOR_INTERNAL_ADDR = 0x0026,/**< XOR-INTERNAL-ADDRESS */ PJ_STUN_ATTR_ICMP = 0x0030,/**< ICMP (TURN) */
PJ_STUN_ATTR_END_MANDATORY_ATTR, PJ_STUN_ATTR_END_MANDATORY_ATTR,
PJ_STUN_ATTR_START_EXTENDED_ATTR= 0x8021, PJ_STUN_ATTR_START_EXTENDED_ATTR= 0x8021,
PJ_STUN_ATTR_SERVER = 0x8022,/**< SERVER attribute. */ PJ_STUN_ATTR_SOFTWARE = 0x8022,/**< SOFTWARE attribute. */
PJ_STUN_ATTR_ALTERNATE_SERVER = 0x8023,/**< ALTERNATE-SERVER. */ PJ_STUN_ATTR_ALTERNATE_SERVER = 0x8023,/**< ALTERNATE-SERVER. */
PJ_STUN_ATTR_REFRESH_INTERVAL = 0x8024,/**< REFRESH-INTERVAL. */ PJ_STUN_ATTR_REFRESH_INTERVAL = 0x8024,/**< REFRESH-INTERVAL. */
PJ_STUN_ATTR_FINGERPRINT = 0x8028,/**< FINGERPRINT attribute. */ PJ_STUN_ATTR_FINGERPRINT = 0x8028,/**< FINGERPRINT attribute. */
PJ_STUN_ATTR_ICE_CONTROLLED = 0x8029,/**< ICE-CCONTROLLED at tribute.*/ PJ_STUN_ATTR_ICE_CONTROLLED = 0x8029,/**< ICE-CCONTROLLED at tribute.*/
PJ_STUN_ATTR_ICE_CONTROLLING = 0x802a,/**< ICE-CCONTROLLING attribut e*/ PJ_STUN_ATTR_ICE_CONTROLLING = 0x802a,/**< ICE-CCONTROLLING attribut e*/
PJ_STUN_ATTR_END_EXTENDED_ATTR PJ_STUN_ATTR_END_EXTENDED_ATTR
} pj_stun_attr_type; } pj_stun_attr_type;
skipping to change at line 328 skipping to change at line 328
//PJ_STUN_SC_INTEGRITY_CHECK_FAILURE= 431, /**< Integrity Chk Fail */ //PJ_STUN_SC_INTEGRITY_CHECK_FAILURE= 431, /**< Integrity Chk Fail */
//PJ_STUN_SC_MISSING_USERNAME = 432, /**< Missing Username */ //PJ_STUN_SC_MISSING_USERNAME = 432, /**< Missing Username */
//PJ_STUN_SC_USE_TLS = 433, /**< Use TLS */ //PJ_STUN_SC_USE_TLS = 433, /**< Use TLS */
//PJ_STUN_SC_MISSING_REALM = 434, /**< Missing Realm */ //PJ_STUN_SC_MISSING_REALM = 434, /**< Missing Realm */
//PJ_STUN_SC_MISSING_NONCE = 435, /**< Missing Nonce */ //PJ_STUN_SC_MISSING_NONCE = 435, /**< Missing Nonce */
//PJ_STUN_SC_UNKNOWN_USERNAME = 436, /**< Unknown Username */ //PJ_STUN_SC_UNKNOWN_USERNAME = 436, /**< Unknown Username */
#endif #endif
PJ_STUN_SC_ALLOCATION_MISMATCH = 437, /**< TURN Alloc Mismatch */ PJ_STUN_SC_ALLOCATION_MISMATCH = 437, /**< TURN Alloc Mismatch */
PJ_STUN_SC_STALE_NONCE = 438, /**< Stale Nonce */ PJ_STUN_SC_STALE_NONCE = 438, /**< Stale Nonce */
PJ_STUN_SC_TRANSITIONING = 439, /**< Transitioning. */ PJ_STUN_SC_TRANSITIONING = 439, /**< Transitioning. */
PJ_STUN_SC_WRONG_CREDENTIALS = 441, /**< TURN Wrong Credentials */
PJ_STUN_SC_UNSUPP_TRANSPORT_PROTO = 442, /**< Unsupported Transport or PJ_STUN_SC_UNSUPP_TRANSPORT_PROTO = 442, /**< Unsupported Transport or
Protocol (TURN) */ Protocol (TURN) */
PJ_STUN_SC_INVALID_IP_ADDR = 443, /**< Invalid IP Address(TURN )*/ PJ_STUN_SC_INVALID_IP_ADDR = 443, /**< Invalid IP Address(TURN )*/
PJ_STUN_SC_INVALID_PORT = 444, /**< Invalid Port (TURN) */ PJ_STUN_SC_INVALID_PORT = 444, /**< Invalid Port (TURN) */
PJ_STUN_SC_OPER_TCP_ONLY = 445, /**< Operation for TCP Only */ PJ_STUN_SC_OPER_TCP_ONLY = 445, /**< Operation for TCP Only */
PJ_STUN_SC_CONNECTION_FAILURE = 446, /**< Connection Failure */ PJ_STUN_SC_CONNECTION_FAILURE = 446, /**< Connection Failure */
PJ_STUN_SC_CONNECTION_TIMEOUT = 447, /**< Connection Timeout */ PJ_STUN_SC_CONNECTION_TIMEOUT = 447, /**< Connection Timeout */
PJ_STUN_SC_ALLOCATION_QUOTA_REACHED = 486, /**< Allocation Quota Reach ed PJ_STUN_SC_ALLOCATION_QUOTA_REACHED = 486, /**< Allocation Quota Reach ed
(TURN) */ (TURN) */
PJ_STUN_SC_ROLE_CONFLICT = 487, /**< Role Conflict */ PJ_STUN_SC_ROLE_CONFLICT = 487, /**< Role Conflict */
skipping to change at line 492 skipping to change at line 493
{ {
/** /**
* Standard STUN attribute header. * Standard STUN attribute header.
*/ */
pj_stun_attr_hdr hdr; pj_stun_attr_hdr hdr;
} pj_stun_empty_attr; } pj_stun_empty_attr;
/** /**
* This structure represents generic STUN string attributes, such as STUN * This structure represents generic STUN string attributes, such as STUN
* USERNAME, PASSWORD, SERVER, REALM, and NONCE attributes. Note that for R * USERNAME, PASSWORD, SOFTWARE, REALM, and NONCE attributes.
EALM and
* NONCE attributes, the text MUST be quoted with.
*/ */
typedef struct pj_stun_string_attr typedef struct pj_stun_string_attr
{ {
/** /**
* Standard STUN attribute header. * Standard STUN attribute header.
*/ */
pj_stun_attr_hdr hdr; pj_stun_attr_hdr hdr;
/** /**
* The string value. * The string value.
skipping to change at line 705 skipping to change at line 705
* format as STUN MAPPED-ADDRESS attribute). * format as STUN MAPPED-ADDRESS attribute).
* The XOR-MAPPED-ADDRESS attribute is present in responses. It * The XOR-MAPPED-ADDRESS attribute is present in responses. It
* provides the same information that would present in the MAPPED- * provides the same information that would present in the MAPPED-
* ADDRESS attribute but because the NAT's public IP address is * ADDRESS attribute but because the NAT's public IP address is
* obfuscated through the XOR function, STUN messages are able to pass * obfuscated through the XOR function, STUN messages are able to pass
* through NATs which would otherwise interfere with STUN. * through NATs which would otherwise interfere with STUN.
*/ */
typedef struct pj_stun_sockaddr_attr pj_stun_xor_mapped_addr_attr; typedef struct pj_stun_sockaddr_attr pj_stun_xor_mapped_addr_attr;
/** /**
* This describes STUN SERVER attribute. * This describes STUN SOFTWARE attribute.
* The server attribute contains a textual description of the software * The SOFTWARE attribute contains a textual description of the software
* being used by the server, including manufacturer and version number. * being used by the agent sending the message. It is used by clients
* The attribute has no impact on operation of the protocol, and serves * and servers. Its value SHOULD include manufacturer and version
* only as a tool for diagnostic and debugging purposes. The value of * number. */
* SERVER is variable length. typedef struct pj_stun_string_attr pj_stun_software_attr;
*/
typedef struct pj_stun_string_attr pj_stun_server_attr;
/** /**
* This describes STUN ALTERNATE-SERVER attribute. * This describes STUN ALTERNATE-SERVER attribute.
* The alternate server represents an alternate transport address for a * The alternate server represents an alternate transport address for a
* different STUN server to try. It is encoded in the same way as * different STUN server to try. It is encoded in the same way as
* MAPPED-ADDRESS. * MAPPED-ADDRESS.
*/ */
typedef struct pj_stun_sockaddr_attr pj_stun_alt_server_attr; typedef struct pj_stun_sockaddr_attr pj_stun_alt_server_attr;
/** /**
skipping to change at line 884 skipping to change at line 882
/** /**
* This describes the STUN DATA attribute. * This describes the STUN DATA attribute.
* The DATA attribute is present in Send Indications and Data * The DATA attribute is present in Send Indications and Data
* Indications. It contains raw payload data that is to be sent (in the * Indications. It contains raw payload data that is to be sent (in the
* case of a Send Request) or was received (in the case of a Data * case of a Send Request) or was received (in the case of a Data
* Indication).. * Indication)..
*/ */
typedef struct pj_stun_binary_attr pj_stun_data_attr; typedef struct pj_stun_binary_attr pj_stun_data_attr;
/** /**
* This describes the STUN RELAY-ADDRESS attribute. * This describes the STUN RELAYED-ADDRESS attribute.
* The RELAY-ADDRESS is present in Allocate responses. It specifies the * The RELAYED-ADDRESS is present in Allocate responses. It specifies the
* address and port that the server allocated to the client. It is * address and port that the server allocated to the client. It is
* encoded in the same way as XOR-MAPPED-ADDRESS. * encoded in the same way as XOR-MAPPED-ADDRESS.
*/ */
typedef struct pj_stun_sockaddr_attr pj_stun_relay_addr_attr; typedef struct pj_stun_sockaddr_attr pj_stun_relayed_addr_attr;
/** /**
* This describes the REQUESTED-ADDRESS-TYPE attribute. * This describes the REQUESTED-ADDRESS-TYPE attribute.
* The REQUESTED-ADDRESS-TYPE attribute is used by clients to request * The REQUESTED-ADDRESS-TYPE attribute is used by clients to request
* the allocation of a specific address type from a server. The * the allocation of a specific address type from a server. The
* following is the format of the REQUESTED-ADDRESS-TYPE attribute. * following is the format of the REQUESTED-ADDRESS-TYPE attribute.
\verbatim \verbatim
0 1 2 3 0 1 2 3
skipping to change at line 915 skipping to change at line 913
\endverbatim \endverbatim
*/ */
typedef struct pj_stun_uint_attr pj_stun_req_addr_type; typedef struct pj_stun_uint_attr pj_stun_req_addr_type;
/** /**
* This describes the TURN REQUESTED-PROPS attribute, encoded as * This describes the TURN REQUESTED-PROPS attribute, encoded as
* STUN 32bit integer attribute. Few macros are provided to manipulate * STUN 32bit integer attribute. Few macros are provided to manipulate
* the values in this attribute: #PJ_STUN_GET_PROP_TYPE(), and * the values in this attribute: #PJ_STUN_GET_PROP_TYPE(), and
* #PJ_STUN_SET_PROP_TYPE(). * #PJ_STUN_SET_PROP_TYPE().
* *
* This attribute allows the client to request certain properties for * This attribute allows the client to request that the allocation have
* the relayed transport address that is allocated by the server. The * certain properties, and by the server to indicate which properties
* attribute is 32 bits long. Its format is: * are supported. The attribute is 32 bits long. Its format is:
\verbatim \verbatim
0 1 2 3 0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Prop-type | Reserved = 0 | | Prop-type | Reserved = 0 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
\endverbatim \endverbatim
* The field labeled "Prop-type" is an 8-bit field specifying the * The field labeled "Prop-type" is an 8-bit field specifying the
* desired property. The rest of the attribute is RFFU (Reserved For * desired property. The rest of the attribute is RFFU (Reserved For
* Future Use) and MUST be set to 0 on transmission and ignored on * Future Use) and MUST be set to 0 on transmission and ignored on
* reception. The values of the "Prop-type" field are: * reception.
* *
* 0x00 (Reserved) * The "Prop-type" field is formatted as follows:
* 0x01 Even port number
* 0x02 Pair of ports \verbatim
0 1 2 3 4 5 6 7
+-+-+-+-+-+-+-+-+
|E|R|P| |
+-+-+-+-+-+-+-+-+
\endverbatim
The bits in "Prop-type" are:
E: If 1, the port number for the relayed-transport-address must be
even. If 0, the port number can be even or odd.
R: If 1, the server must reserve the next highest port for a
subsequent allocation. If 0, no such reservation is requested.
If the client sets the R bit to 1, it MUST also set the E bit to 1
(however, the E bit may be 1 when the R bit is 0).
P: If 1, the allocation must be a Preserving allocation. If 0, the
allocation can be either Preserving or Non-Preserving.
*/ */
typedef struct pj_stun_uint_attr pj_stun_req_props_attr; typedef struct pj_stun_uint_attr pj_stun_req_props_attr;
/** /**
* Get the 8bit Prop-type value from a 32bit integral value of TURN * Get the 8bit Prop-type value from a 32bit integral value of TURN
* TURN REQUESTED-PROPS attribute. * TURN REQUESTED-PROPS attribute.
*/ */
#define PJ_STUN_GET_PROP_TYPE(u32) (u32 >> 24) #define PJ_STUN_GET_PROP_TYPE(u32) (u32 >> 24)
/** /**
skipping to change at line 1037 skipping to change at line 1056
/** /**
* This describes the USE-CANDIDATE attribute from draft-ietf-mmusic-ice-13 . * This describes the USE-CANDIDATE attribute from draft-ietf-mmusic-ice-13 .
* The USE-CANDIDATE attribute indicates that the candidate pair * The USE-CANDIDATE attribute indicates that the candidate pair
* resulting from this check should be used for transmission of media. * resulting from this check should be used for transmission of media.
* The attribute has no content (the Length field of the attribute is * The attribute has no content (the Length field of the attribute is
* zero); it serves as a flag. * zero); it serves as a flag.
*/ */
typedef struct pj_stun_empty_attr pj_stun_use_candidate_attr; typedef struct pj_stun_empty_attr pj_stun_use_candidate_attr;
/** /**
* This structure describes STUN XOR-INTERNAL-ADDRESS attribute from
* draft-wing-behave-nat-control-stun-usage-00.
* This attribute MUST be present in a Binding Response and may be used
* in other responses as well. This attribute is necessary to allow a
* STUN client to 'walk backwards' and communicate directly with all of
* the STUN-aware NATs along the path.
*/
typedef pj_stun_sockaddr_attr pj_stun_xor_internal_addr_attr;
/**
* This describes the STUN TIMER-VAL attribute. * This describes the STUN TIMER-VAL attribute.
* The TIMER-VAL attribute is used only in conjunction with the Set * The TIMER-VAL attribute is used only in conjunction with the Set
* Active Destination response. It conveys from the server, to the * Active Destination response. It conveys from the server, to the
* client, the value of the timer used in the server state machine. * client, the value of the timer used in the server state machine.
*/ */
typedef struct pj_stun_uint_attr pj_stun_timer_val_attr; typedef struct pj_stun_uint_attr pj_stun_timer_val_attr;
/** /**
* This describes ICE-CONTROLLING attribute. * This describes ICE-CONTROLLING attribute.
*/ */
typedef struct pj_stun_uint64_attr pj_stun_ice_controlling_attr; typedef struct pj_stun_uint64_attr pj_stun_ice_controlling_attr;
/** /**
* This describes ICE-CONTROLLED attribute. * This describes ICE-CONTROLLED attribute.
*/ */
typedef struct pj_stun_uint64_attr pj_stun_ice_controlled_attr; typedef struct pj_stun_uint64_attr pj_stun_ice_controlled_attr;
/** /**
* This describes TURN ICMP attribute
*/
typedef struct pj_stun_uint_attr pj_stun_icmp_attr;
/**
* This structure describes a parsed STUN message. All integral fields * This structure describes a parsed STUN message. All integral fields
* in this structure (including IP addresses) will be in the host * in this structure (including IP addresses) will be in the host
* byte order. * byte order.
*/ */
typedef struct pj_stun_msg typedef struct pj_stun_msg
{ {
/** /**
* STUN message header. * STUN message header.
*/ */
pj_stun_msg_hdr hdr; pj_stun_msg_hdr hdr;
 End of changes. 15 change blocks. 
36 lines changed or deleted 49 lines changed or added


 tonegen.h   tonegen.h 
/* $Id: tonegen.h 2039 2008-06-20 22:44:47Z bennylp $ */ /* $Id: tonegen.h 2313 2008-09-24 09:38:55Z bennylp $ */
/* /*
* 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,
* 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 64 skipping to change at line 64
/** /**
* This structure describes individual MF digits to be played * This structure describes individual MF digits to be played
* with #pjmedia_tonegen_play(). * with #pjmedia_tonegen_play().
*/ */
typedef struct pjmedia_tone_desc typedef struct pjmedia_tone_desc
{ {
short freq1; /**< First frequency. */ short freq1; /**< First frequency. */
short freq2; /**< Optional second frequency. */ short freq2; /**< Optional second frequency. */
short on_msec; /**< Playback ON duration, in miliseconds. */ short on_msec; /**< Playback ON duration, in miliseconds. */
short off_msec; /**< Playback OFF duration, ini miliseconds. */ short off_msec; /**< Playback OFF duration, ini miliseconds. */
short volume; /**< Volume (1-16383), or 0 for default. short volume; /**< Volume (1-32767), or 0 for default, which
*/ PJMEDIA_TONEGEN_VOLUME will be used.
*/
short flags; /**< Currently internal flags, must be 0
*/
} pjmedia_tone_desc; } pjmedia_tone_desc;
/** /**
* This structure describes individual MF digits to be played * This structure describes individual MF digits to be played
* with #pjmedia_tonegen_play_digits(). * with #pjmedia_tonegen_play_digits().
*/ */
typedef struct pjmedia_tone_digit typedef struct pjmedia_tone_digit
{ {
char digit; /**< The ASCI identification for the digit. */ char digit; /**< The ASCI identification for the digit. */
short on_msec; /**< Playback ON duration, in miliseconds. */ short on_msec; /**< Playback ON duration, in miliseconds. */
short off_msec; /**< Playback OFF duration, ini miliseconds. */ short off_msec; /**< Playback OFF duration, ini miliseconds. */
short volume; /**< Volume (1-16383), or 0 for default. short volume; /**< Volume (1-32767), or 0 for default, which
*/ PJMEDIA_TONEGEN_VOLUME will be used.
*/
} pjmedia_tone_digit; } pjmedia_tone_digit;
/** /**
* This structure describes the digit map which is used by the tone generat or * This structure describes the digit map which is used by the tone generat or
* to produce tones from an ASCII digits. * to produce tones from an ASCII digits.
* Digit map used by a particular tone generator can be retrieved/set with * Digit map used by a particular tone generator can be retrieved/set with
* #pjmedia_tonegen_get_digit_map() and #pjmedia_tonegen_set_digit_map(). * #pjmedia_tonegen_get_digit_map() and #pjmedia_tonegen_set_digit_map().
*/ */
typedef struct pjmedia_tone_digit_map typedef struct pjmedia_tone_digit_map
{ {
 End of changes. 3 change blocks. 
5 lines changed or deleted 9 lines changed or added


 transport.h   transport.h 
/* $Id: transport.h 2039 2008-06-20 22:44:47Z bennylp $ */ /* $Id: transport.h 2293 2008-09-18 12:58:33Z nanang $ */
/* /*
* 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,
* 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 423 skipping to change at line 423
PJMEDIA_TRANSPORT_TYPE_UDP, PJMEDIA_TRANSPORT_TYPE_UDP,
/** Media transport using ICE */ /** Media transport using ICE */
PJMEDIA_TRANSPORT_TYPE_ICE, PJMEDIA_TRANSPORT_TYPE_ICE,
/** /**
* Media transport SRTP, this transport is actually security adapter to be * Media transport SRTP, this transport is actually security adapter to be
* stacked with other transport to enable encryption on the underlying * stacked with other transport to enable encryption on the underlying
* transport. * transport.
*/ */
PJMEDIA_TRANSPORT_TYPE_SRTP PJMEDIA_TRANSPORT_TYPE_SRTP,
/**
* Start of user defined transport.
*/
PJMEDIA_TRANSPORT_TYPE_USER
} pjmedia_transport_type; } pjmedia_transport_type;
/** /**
* This structure declares media transport. A media transport is called * This structure declares media transport. A media transport is called
* by the stream to transmit a packet, and will notify stream when * by the stream to transmit a packet, and will notify stream when
* incoming packet is arrived. * incoming packet is arrived.
*/ */
struct pjmedia_transport struct pjmedia_transport
{ {
skipping to change at line 482 skipping to change at line 487
* stacked transports (e.g: SRTP stacked on top of UDP) * stacked transports (e.g: SRTP stacked on top of UDP)
*/ */
struct pjmedia_transport_info struct pjmedia_transport_info
{ {
/** /**
* General socket info. * General socket info.
*/ */
pjmedia_sock_info sock_info; pjmedia_sock_info sock_info;
/** /**
* Remote address where RTP/RTCP originated from. In case this transpor
t
* hasn't ever received packet, the
*/
pj_sockaddr src_rtp_name;
pj_sockaddr src_rtcp_name;
/**
* Specifies number of transport specific info included. * Specifies number of transport specific info included.
*/ */
int specific_info_cnt; int specific_info_cnt;
/** /**
* Buffer storage of transport specific info. * Buffer storage of transport specific info.
*/ */
pjmedia_transport_specific_info spc_info[PJMEDIA_TRANSPORT_SPECIFIC_INF O_MAXCNT]; pjmedia_transport_specific_info spc_info[PJMEDIA_TRANSPORT_SPECIFIC_INF O_MAXCNT];
}; };
 End of changes. 3 change blocks. 
2 lines changed or deleted 15 lines changed or added


 transport_ice.h   transport_ice.h 
/* $Id: transport_ice.h 2039 2008-06-20 22:44:47Z bennylp $ */ /* $Id: transport_ice.h 2276 2008-09-11 18:43:59Z nanang $ */
/* /*
* 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,
* 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 61 skipping to change at line 61
* @param op The operation * @param op The operation
* @param status Operation status. * @param status Operation status.
*/ */
void (*on_ice_complete)(pjmedia_transport *tp, void (*on_ice_complete)(pjmedia_transport *tp,
pj_ice_strans_op op, pj_ice_strans_op op,
pj_status_t status); pj_status_t status);
} pjmedia_ice_cb; } pjmedia_ice_cb;
/** /**
* Options that can be specified when creating ICE transport.
*/
enum pjmedia_transport_ice_options
{
/**
* Normally when remote doesn't use ICE, the ICE transport will
* continuously check the source address of incoming packets to see
* if it is different than the configured remote address, and switch
* the remote address to the source address of the packet if they
* are different after several packets are received.
* Specifying this option will disable this feature.
*/
PJMEDIA_ICE_NO_SRC_ADDR_CHECKING = 1
};
/**
* Create the Interactive Connectivity Establishment (ICE) media transport * Create the Interactive Connectivity Establishment (ICE) media transport
* using the specified configuration. When STUN or TURN (or both) is used, * using the specified configuration. When STUN or TURN (or both) is used,
* the creation operation will complete asynchronously, when STUN resolutio n * the creation operation will complete asynchronously, when STUN resolutio n
* and TURN allocation completes. When the initialization completes, the * and TURN allocation completes. When the initialization completes, the
* \a on_ice_complete() complete will be called with \a op parameter equal * \a on_ice_complete() complete will be called with \a op parameter equal
* to PJ_ICE_STRANS_OP_INIT. * to PJ_ICE_STRANS_OP_INIT.
* *
* In addition, this transport will also notify the application about the * In addition, this transport will also notify the application about the
* result of ICE negotiation, also in \a on_ice_complete() callback. In thi s * result of ICE negotiation, also in \a on_ice_complete() callback. In thi s
* case the callback will be called with \a op parameter equal to * case the callback will be called with \a op parameter equal to
skipping to change at line 93 skipping to change at line 109
* *
* @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_create(pjmedia_endpt *endpt, PJ_DECL(pj_status_t) pjmedia_ice_create(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,
pjmedia_transport **p_tp); pjmedia_transport **p_tp);
/**
* The same as @pjmedia_ice_create with additional \a options 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 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_create2(pjmedia_endpt *endpt,
const char *name,
unsigned comp_cnt,
const pj_ice_strans_cfg *cfg,
const pjmedia_ice_cb *cb,
unsigned options,
pjmedia_transport **p_tp);
PJ_END_DECL PJ_END_DECL
/** /**
* @} * @}
*/ */
#endif /* __PJMEDIA_TRANSPORT_ICE_H__ */ #endif /* __PJMEDIA_TRANSPORT_ICE_H__ */
 End of changes. 3 change blocks. 
1 lines changed or deleted 41 lines changed or added


 turn_session.h   turn_session.h 
/* $Id: turn_session.h 1988 2008-06-06 14:47:10Z bennylp $ */ /* $Id: turn_session.h 2234 2008-08-22 17:46:33Z bennylp $ */
/* /*
* Copyright (C) 2003-2007 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2007 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,
* 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 231 skipping to change at line 231
/** /**
* Allocation parameter, which can be given when application calls * Allocation parameter, which can be given when application calls
* pj_turn_session_alloc() to allocate relay address in the TURN server. * pj_turn_session_alloc() to allocate relay address in the TURN server.
* Application should call pj_turn_alloc_param_default() to initialize * Application should call pj_turn_alloc_param_default() to initialize
* this structure with the default values. * this structure with the default values.
*/ */
typedef struct pj_turn_alloc_param typedef struct pj_turn_alloc_param
{ {
/** /**
* The requested BANDWIDTH. Default is zero to not request any * The requested BANDWIDTH. Default is zero to not request any
* specific bandwidth. * specific bandwidth. Note that this attribute has been deprecated
* after TURN-08 draft, hence application should only use this
* attribute when talking to TURN-07 or older version.
*/ */
int bandwidth; int bandwidth;
/** /**
* The requested LIFETIME. Default is zero to not request any * The requested LIFETIME. Default is zero to not request any
* explicit allocation lifetime. * explicit allocation lifetime.
*/ */
int lifetime; int lifetime;
/** /**
skipping to change at line 565 skipping to change at line 567
* are received from the TURN server. The session then processes this packe t * are received from the TURN server. The session then processes this packe t
* and decides whether it is part of TURN protocol exchange or if it is a * and decides whether it is part of TURN protocol exchange or if it is a
* data to be reported back to user, which in this case it will call the * data to be reported back to user, which in this case it will call the
* \a on_rx_data() callback. * \a on_rx_data() callback.
* *
* @param sess The TURN client session. * @param sess The TURN client session.
* @param pkt The packet as received from the TURN server. This * @param pkt The packet as received from the TURN server. This
* should contain either STUN encapsulated message or * should contain either STUN encapsulated message or
* a ChannelData packet. * a ChannelData packet.
* @param pkt_len The length of the packet. * @param pkt_len The length of the packet.
* @param parsed_len Optional argument to receive the number of parsed
* or processed data from the packet.
* *
* @return The function may return non-PJ_SUCCESS if it receive s * @return The function may return non-PJ_SUCCESS if it receive s
* non-STUN and non-ChannelData packet, or if the * non-STUN and non-ChannelData packet, or if the
* \a on_rx_data() returns non-PJ_SUCCESS; * \a on_rx_data() returns non-PJ_SUCCESS;
*/ */
PJ_DECL(pj_status_t) pj_turn_session_on_rx_pkt(pj_turn_session *sess, PJ_DECL(pj_status_t) pj_turn_session_on_rx_pkt(pj_turn_session *sess,
void *pkt, void *pkt,
unsigned pkt_len); unsigned pkt_len,
unsigned *parsed_len);
/** /**
* @} * @}
*/ */
PJ_END_DECL PJ_END_DECL
#endif /* __PJNATH_TURN_SESSION_H__ */ #endif /* __PJNATH_TURN_SESSION_H__ */
 End of changes. 4 change blocks. 
3 lines changed or deleted 8 lines changed or added


 wav_port.h   wav_port.h 
/* $Id: wav_port.h 2039 2008-06-20 22:44:47Z bennylp $ */ /* $Id: wav_port.h 2275 2008-09-11 17:38:48Z nanang $ */
/* /*
* 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,
* 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 50 skipping to change at line 50
enum pjmedia_file_player_option enum pjmedia_file_player_option
{ {
/** /**
* Tell the file player to return NULL frame when the whole * Tell the file player to return NULL frame when the whole
* file has been played. * file has been played.
*/ */
PJMEDIA_FILE_NO_LOOP = 1 PJMEDIA_FILE_NO_LOOP = 1
}; };
/** /**
* Create a media port to play streams from a WAV file. * Create a media port to play streams from a WAV file. WAV player port
* supports for reading WAV file with uncompressed 16 bit PCM format or
* compressed G.711 A-law/U-law format.
* *
* @param pool Pool to create memory buffers for this port. * @param pool Pool to create memory buffers for this port.
* @param filename File name to open. * @param filename File name to open.
* @param ptime The duration (in miliseconds) of each frame read * @param ptime The duration (in miliseconds) of each frame read
* from this port. If the value is zero, the default * from this port. If the value is zero, the default
* duration (20ms) will be used. * duration (20ms) will be used.
* @param flags Port creation flags. * @param flags Port creation flags.
* @param buff_size Buffer size to be allocated. If the value is zero or * @param buff_size Buffer size to be allocated. If the value is zero or
* negative, the port will use default buffer size (whi ch * negative, the port will use default buffer size (whi ch
* is about 4KB). * is about 4KB).
skipping to change at line 136 skipping to change at line 138
*/ */
/** /**
* @defgroup PJMEDIA_FILE_REC File Writer (Recorder) * @defgroup PJMEDIA_FILE_REC File Writer (Recorder)
* @ingroup PJMEDIA_PORT * @ingroup PJMEDIA_PORT
* @brief Audio capture/recording to WAV file * @brief Audio capture/recording to WAV file
* @{ * @{
*/ */
/** /**
* WAV file writer options.
*/
enum pjmedia_file_writer_option
{
/**
* Tell the file writer to save the audio in PCM format.
*/
PJMEDIA_FILE_WRITE_PCM = 0,
/**
* Tell the file writer to save the audio in G711 Alaw format.
*/
PJMEDIA_FILE_WRITE_ALAW = 1,
/**
* Tell the file writer to save the audio in G711 Alaw format.
*/
PJMEDIA_FILE_WRITE_ULAW = 2,
};
/**
* Create a media port to record streams to a WAV file. Note that the port * Create a media port to record streams to a WAV file. Note that the port
* must be closed properly (with #pjmedia_port_destroy()) so that the WAV * must be closed properly (with #pjmedia_port_destroy()) so that the WAV
* header can be filled with correct values (such as the file length). * header can be filled with correct values (such as the file length).
* WAV writer port supports for writing audio in uncompressed 16 bit PCM fo
rmat
* or compressed G.711 U-law/A-law format, this needs to be specified in
* \a flags param.
* *
* @param pool Pool to create memory buffers for this port. * @param pool Pool to create memory buffers for this port.
* @param filename File name. * @param filename File name.
* @param clock_rate The sampling rate. * @param clock_rate The sampling rate.
* @param channel_count Number of channels. * @param channel_count Number of channels.
* @param samples_per_frame Number of samples per frame. * @param samples_per_frame Number of samples per frame.
* @param bits_per_sample Number of bits per sample (eg 16). * @param bits_per_sample Number of bits per sample (eg 16).
* @param flags Port creation flags (must be 0 at presen * @param flags Port creation flags, see
t). * #pjmedia_file_writer_option.
* @param buff_size Buffer size to be allocated. If the value is * @param buff_size Buffer size to be allocated. If the value is
* zero or negative, the port will use default buff er * zero or negative, the port will use default buff er
* size (which is about 4KB). * size (which is about 4KB).
* @param p_port Pointer to receive the file port instance. * @param p_port Pointer to receive the file port instance.
* *
* @return PJ_SUCCESS on success. * @return PJ_SUCCESS on success.
*/ */
PJ_DECL(pj_status_t) pjmedia_wav_writer_port_create(pj_pool_t *pool, PJ_DECL(pj_status_t) pjmedia_wav_writer_port_create(pj_pool_t *pool,
const char *filename, const char *filename,
unsigned clock_rate, unsigned clock_rate,
unsigned channel_count, unsigned channel_count,
unsigned samples_per_fra me, unsigned samples_per_fra me,
unsigned bits_per_sample , unsigned bits_per_sample ,
unsigned flags, unsigned flags,
 End of changes. 6 change blocks. 
5 lines changed or deleted 32 lines changed or added


 wave.h   wave.h 
/* $Id: wave.h 2039 2008-06-20 22:44:47Z bennylp $ */ /* $Id: wave.h 2270 2008-09-10 19:48:45Z nanang $ */
/* /*
* 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,
* 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 67 skipping to change at line 67
* Standard FMT tag to identify format chunks. * Standard FMT tag to identify format chunks.
*/ */
#define PJMEDIA_FMT_TAG (' '<<24|'t'<<16|'m'<<8|'f') #define PJMEDIA_FMT_TAG (' '<<24|'t'<<16|'m'<<8|'f')
/** /**
* Standard DATA tag to identify data chunks. * Standard DATA tag to identify data chunks.
*/ */
#define PJMEDIA_DATA_TAG ('a'<<24|'t'<<16|'a'<<8|'d') #define PJMEDIA_DATA_TAG ('a'<<24|'t'<<16|'a'<<8|'d')
/** /**
* Standard FACT tag to identify fact chunks.
*/
#define PJMEDIA_FACT_TAG ('t'<<24|'c'<<16|'a'<<8|'f')
/**
* Enumeration of format compression tag.
*/
typedef enum {
PJMEDIA_WAVE_FMT_TAG_PCM = 1,
PJMEDIA_WAVE_FMT_TAG_ALAW = 6,
PJMEDIA_WAVE_FMT_TAG_ULAW = 7
} pjmedia_wave_fmt_tag;
/**
* This file describes the simpler/canonical version of a WAVE file. * This file describes the simpler/canonical version of a WAVE file.
* It does not support the full RIFF format specification. * It does not support the full RIFF format specification.
*/ */
#pragma pack(2)
struct pjmedia_wave_hdr struct pjmedia_wave_hdr
{ {
/** This structure describes RIFF WAVE file header */ /** This structure describes RIFF WAVE file header */
struct { struct {
pj_uint32_t riff; /**< "RIFF" ASCII tag. */ pj_uint32_t riff; /**< "RIFF" ASCII tag. */
pj_uint32_t file_len; /**< File length minus 8 bytes */ pj_uint32_t file_len; /**< File length minus 8 bytes */
pj_uint32_t wave; /**< "WAVE" ASCII tag. */ pj_uint32_t wave; /**< "WAVE" ASCII tag. */
} riff_hdr; } riff_hdr;
/** This structure describes format chunks/header */ /** This structure describes format chunks/header */
skipping to change at line 97 skipping to change at line 112
pj_uint16_t block_align; /**< nchannels * bits / 8 */ pj_uint16_t block_align; /**< nchannels * bits / 8 */
pj_uint16_t bits_per_sample; /**< Bits per sample. */ pj_uint16_t bits_per_sample; /**< Bits per sample. */
} fmt_hdr; } fmt_hdr;
/** The data header preceeds the actual data in the file. */ /** The data header preceeds the actual data in the file. */
struct { struct {
pj_uint32_t data; /**< "data" ASCII tag. */ pj_uint32_t data; /**< "data" ASCII tag. */
pj_uint32_t len; /**< Data length. */ pj_uint32_t len; /**< Data length. */
} data_hdr; } data_hdr;
}; };
#pragma pack()
/** /**
* @see pjmedia_wave_hdr * @see pjmedia_wave_hdr
*/ */
typedef struct pjmedia_wave_hdr pjmedia_wave_hdr; typedef struct pjmedia_wave_hdr pjmedia_wave_hdr;
/** /**
* This structure describes generic RIFF subchunk header. * This structure describes generic RIFF subchunk header.
*/ */
typedef struct pjmedia_wave_subchunk typedef struct pjmedia_wave_subchunk
 End of changes. 4 change blocks. 
1 lines changed or deleted 17 lines changed or added


 wsola.h   wsola.h 
/* $Id: wsola.h 2039 2008-06-20 22:44:47Z bennylp $ */ /* $Id: wsola.h 2115 2008-07-10 14:59:57Z nanang $ */
/* /*
* 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,
* 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 132 skipping to change at line 132
* frame with #pjmedia_wsola_generate() before calling * frame with #pjmedia_wsola_generate() before calling
* this function, specify whether that was because of * this function, specify whether that was because of
* packet lost. If so, set this parameter to PJ_TRUE * packet lost. If so, set this parameter to PJ_TRUE
* to make WSOLA interpolate this frame with its buffer. * to make WSOLA interpolate this frame with its buffer.
* Otherwise if this value is PJ_FALSE, WSOLA will * Otherwise if this value is PJ_FALSE, WSOLA will
* just append this frame to the end of its buffer. * just append this frame to the end of its buffer.
* *
* @return PJ_SUCCESS normally. * @return PJ_SUCCESS normally.
*/ */
PJ_DECL(pj_status_t) pjmedia_wsola_save(pjmedia_wsola *wsola, PJ_DECL(pj_status_t) pjmedia_wsola_save(pjmedia_wsola *wsola,
short frm[], pj_int16_t frm[],
pj_bool_t prev_lost); pj_bool_t prev_lost);
/** /**
* Generate one synthetic frame from WSOLA. * Generate one synthetic frame from WSOLA.
* *
* @param wsola WSOLA session. * @param wsola WSOLA session.
* @param frm Buffer to receive the frame. * @param frm Buffer to receive the frame.
* *
* @return PJ_SUCCESS normally. * @return PJ_SUCCESS normally.
*/ */
PJ_DECL(pj_status_t) pjmedia_wsola_generate(pjmedia_wsola *wsola, PJ_DECL(pj_status_t) pjmedia_wsola_generate(pjmedia_wsola *wsola,
short frm[]); pj_int16_t frm[]);
/** /**
* Compress or compact the specified buffer by removing some audio samples * Compress or compact the specified buffer by removing some audio samples
* from the buffer, without altering the pitch. For this function to work, * from the buffer, without altering the pitch. For this function to work,
* total length of the buffer must be more than twice \a erase_cnt. * total length of the buffer must be more than twice \a erase_cnt.
* *
* @param wsola WSOLA session. * @param wsola WSOLA session.
* @param buf1 Pointer to buffer. * @param buf1 Pointer to buffer.
* @param buf1_cnt Number of samples in the buffer. * @param buf1_cnt Number of samples in the buffer.
* @param buf2 Pointer to second buffer, if the buffer is not * @param buf2 Pointer to second buffer, if the buffer is not
skipping to change at line 169 skipping to change at line 169
* @param erase_cnt On input, specify the number of samples to be erased. * @param erase_cnt On input, specify the number of samples to be erased.
* This function may erase more or less than the requested * This function may erase more or less than the requested
* number, and the actual number of samples erased will be * number, and the actual number of samples erased will be
* given on this argument upon returning from the function. * given on this argument upon returning from the function.
* *
* @return PJ_SUCCESS if some samples have been erased, PJ_ETOOSMAL L * @return PJ_SUCCESS if some samples have been erased, PJ_ETOOSMAL L
* if buffer is too small to be reduced, PJ_EINVAL if any * if buffer is too small to be reduced, PJ_EINVAL if any
* of the parameters are not valid. * of the parameters are not valid.
*/ */
PJ_DECL(pj_status_t) pjmedia_wsola_discard(pjmedia_wsola *wsola, PJ_DECL(pj_status_t) pjmedia_wsola_discard(pjmedia_wsola *wsola,
short buf1[], pj_int16_t buf1[],
unsigned buf1_cnt, unsigned buf1_cnt,
short buf2[], pj_int16_t buf2[],
unsigned buf2_cnt, unsigned buf2_cnt,
unsigned *erase_cnt); unsigned *erase_cnt);
PJ_END_DECL PJ_END_DECL
/** /**
* @} * @}
*/ */
#endif /* __PJMEDIA_WSOLA_H__ */ #endif /* __PJMEDIA_WSOLA_H__ */
 End of changes. 5 change blocks. 
5 lines changed or deleted 5 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/