config.h   config.h 
/* $Id: config.h 3884 2011-11-08 17:11:29Z bennylp $ */ /* $Id: config.h 4109 2012-04-27 07:36:13Z nanang $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 1086 skipping to change at line 1086
#if !defined(PJ_THREAD_ALLOCATE_STACK) #if !defined(PJ_THREAD_ALLOCATE_STACK)
# error "PJ_THREAD_ALLOCATE_STACK should be defined in compat/os_xx.h" # error "PJ_THREAD_ALLOCATE_STACK should be defined in compat/os_xx.h"
#endif #endif
PJ_BEGIN_DECL PJ_BEGIN_DECL
/** PJLIB version major number. */ /** PJLIB version major number. */
#define PJ_VERSION_NUM_MAJOR 1 #define PJ_VERSION_NUM_MAJOR 1
/** PJLIB version minor number. */ /** PJLIB version minor number. */
#define PJ_VERSION_NUM_MINOR 12 #define PJ_VERSION_NUM_MINOR 14
/** PJLIB version revision number. */ /** PJLIB version revision number. */
#define PJ_VERSION_NUM_REV 0 #define PJ_VERSION_NUM_REV 0
/** /**
* Extra suffix for the version (e.g. "-trunk"), or empty for * Extra suffix for the version (e.g. "-trunk"), or empty for
* web release version. * web release version.
*/ */
#define PJ_VERSION_NUM_EXTRA "" #define PJ_VERSION_NUM_EXTRA ""
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 echo.h   echo.h 
/* $Id: echo.h 3567 2011-05-15 12:54:28Z ming $ */ /* $Id: echo.h 4079 2012-04-24 10:26:07Z ming $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 92 skipping to change at line 92
* for the echo canceller, but application will guarantee that echo * for the echo canceller, but application will guarantee that echo
* canceller will not be called by different threads at the same time. * canceller will not be called by different threads at the same time.
*/ */
PJMEDIA_ECHO_NO_LOCK = 16, PJMEDIA_ECHO_NO_LOCK = 16,
/** /**
* If PJMEDIA_ECHO_USE_SIMPLE_FIFO flag is specified, the delay buffer * If PJMEDIA_ECHO_USE_SIMPLE_FIFO flag is specified, the delay buffer
* created for the echo canceller will use simple FIFO mechanism, i.e. * created for the echo canceller will use simple FIFO mechanism, i.e.
* without using WSOLA to expand and shrink audio samples. * without using WSOLA to expand and shrink audio samples.
*/ */
PJMEDIA_ECHO_USE_SIMPLE_FIFO = 32 PJMEDIA_ECHO_USE_SIMPLE_FIFO = 32,
/**
* If PJMEDIA_ECHO_USE_SW_ECHO flag is specified, software echo cancell
er
* will be used instead of device EC.
*/
PJMEDIA_ECHO_USE_SW_ECHO = 64
} pjmedia_echo_flag; } pjmedia_echo_flag;
/** /**
* Create the echo canceller. * Create the echo canceller.
* *
* @param pool Pool to allocate memory. * @param pool Pool to allocate memory.
* @param clock_rate Media clock rate/sampling rate. * @param clock_rate Media clock rate/sampling rate.
* @param samples_per_frame Number of samples per frame. * @param samples_per_frame Number of samples per frame.
* @param tail_ms Tail length, miliseconds. * @param tail_ms Tail length, miliseconds.
 End of changes. 2 change blocks. 
2 lines changed or deleted 9 lines changed or added


 endpoint.h   endpoint.h 
/* $Id: endpoint.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: endpoint.h 3988 2012-03-28 07:32:42Z nanang $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 60 skipping to change at line 60
{ {
/** /**
* This flag controls whether telephony-event should be offered in SDP. * This flag controls whether telephony-event should be offered in SDP.
* Value is boolean. * Value is boolean.
*/ */
PJMEDIA_ENDPT_HAS_TELEPHONE_EVENT_FLAG PJMEDIA_ENDPT_HAS_TELEPHONE_EVENT_FLAG
} pjmedia_endpt_flag; } pjmedia_endpt_flag;
/** /**
* Type of callback to register to pjmedia_endpt_atexit().
*/
typedef void (*pjmedia_endpt_exit_callback)(pjmedia_endpt *endpt);
/**
* Create an instance of media endpoint. * Create an instance of media endpoint.
* *
* @param pf Pool factory, which will be used by the media endpoi nt * @param pf Pool factory, which will be used by the media endpoi nt
* throughout its lifetime. * throughout its lifetime.
* @param ioqueue Optional ioqueue instance to be registered to the * @param ioqueue Optional ioqueue instance to be registered to the
* endpoint. The ioqueue instance is used to poll all R TP * endpoint. The ioqueue instance is used to poll all R TP
* and RTCP sockets. If this argument is NULL, the * and RTCP sockets. If this argument is NULL, the
* endpoint will create an internal ioqueue instance. * endpoint will create an internal ioqueue instance.
* @param worker_cnt Specify the number of worker threads to be created * @param worker_cnt Specify the number of worker threads to be created
* to poll the ioqueue. * to poll the ioqueue.
skipping to change at line 199 skipping to change at line 204
/** /**
* Dump media endpoint capabilities. * Dump media endpoint capabilities.
* *
* @param endpt The media endpoint. * @param endpt The media endpoint.
* *
* @return PJ_SUCCESS on success. * @return PJ_SUCCESS on success.
*/ */
PJ_DECL(pj_status_t) pjmedia_endpt_dump(pjmedia_endpt *endpt); PJ_DECL(pj_status_t) pjmedia_endpt_dump(pjmedia_endpt *endpt);
/**
* Register cleanup function to be called by media endpoint when
* #pjmedia_endpt_destroy() is called. Note that application should not
* use or access any endpoint resource (such as pool, ioqueue) from within
* the callback as such resource may have been released when the callback
* function is invoked.
*
* @param endpt The media endpoint.
* @param func The function to be registered.
*
* @return PJ_SUCCESS on success.
*/
PJ_DECL(pj_status_t) pjmedia_endpt_atexit(pjmedia_endpt *endpt,
pjmedia_endpt_exit_callback func);
PJ_END_DECL PJ_END_DECL
/** /**
* @} * @}
*/ */
#endif /* __PJMEDIA_MEDIAMGR_H__ */ #endif /* __PJMEDIA_MEDIAMGR_H__ */
 End of changes. 3 change blocks. 
1 lines changed or deleted 21 lines changed or added


 rtcp.h   rtcp.h 
/* $Id: rtcp.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: rtcp.h 3960 2012-02-27 14:41:21Z nanang $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 61 skipping to change at line 61
* When application uses the stream interface (see @ref PJMED_STRM), * When application uses the stream interface (see @ref PJMED_STRM),
* application may retrieve the RTCP statistic by calling * application may retrieve the RTCP statistic by calling
* #pjmedia_stream_get_stat() function. * #pjmedia_stream_get_stat() function.
*/ */
#pragma pack(1) #pragma pack(1)
/** /**
* RTCP sender report. * RTCP sender report.
*/ */
struct pjmedia_rtcp_sr typedef struct pjmedia_rtcp_sr
{ {
pj_uint32_t ntp_sec; /**< NTP time, seconds part. */ pj_uint32_t ntp_sec; /**< NTP time, seconds part. */
pj_uint32_t ntp_frac; /**< NTP time, fractions part. */ pj_uint32_t ntp_frac; /**< NTP time, fractions part. */
pj_uint32_t rtp_ts; /**< RTP timestamp. */ pj_uint32_t rtp_ts; /**< RTP timestamp. */
pj_uint32_t sender_pcount; /**< Sender packet cound. */ pj_uint32_t sender_pcount; /**< Sender packet cound. */
pj_uint32_t sender_bcount; /**< Sender octet/bytes count. */ pj_uint32_t sender_bcount; /**< Sender octet/bytes count. */
}; } pjmedia_rtcp_sr;
/**
* @see pjmedia_rtcp_sr
*/
typedef struct pjmedia_rtcp_sr pjmedia_rtcp_sr;
/** /**
* RTCP receiver report. * RTCP receiver report.
*/ */
struct pjmedia_rtcp_rr typedef struct pjmedia_rtcp_rr
{ {
pj_uint32_t ssrc; /**< SSRC identification. */ pj_uint32_t ssrc; /**< SSRC identification. */
#if defined(PJ_IS_BIG_ENDIAN) && PJ_IS_BIG_ENDIAN!=0 #if defined(PJ_IS_BIG_ENDIAN) && PJ_IS_BIG_ENDIAN!=0
pj_uint32_t fract_lost:8; /**< Fraction lost. */ pj_uint32_t fract_lost:8; /**< Fraction lost. */
pj_uint32_t total_lost_2:8; /**< Total lost, bit 16-23. */ pj_uint32_t total_lost_2:8; /**< Total lost, bit 16-23. */
pj_uint32_t total_lost_1:8; /**< Total lost, bit 8-15. */ pj_uint32_t total_lost_1:8; /**< Total lost, bit 8-15. */
pj_uint32_t total_lost_0:8; /**< Total lost, bit 0-7. */ pj_uint32_t total_lost_0:8; /**< Total lost, bit 0-7. */
#else #else
pj_uint32_t fract_lost:8; /**< Fraction lost. */ pj_uint32_t fract_lost:8; /**< Fraction lost. */
pj_uint32_t total_lost_2:8; /**< Total lost, bit 0-7. */ pj_uint32_t total_lost_2:8; /**< Total lost, bit 0-7. */
pj_uint32_t total_lost_1:8; /**< Total lost, bit 8-15. */ pj_uint32_t total_lost_1:8; /**< Total lost, bit 8-15. */
pj_uint32_t total_lost_0:8; /**< Total lost, bit 16-23. */ pj_uint32_t total_lost_0:8; /**< Total lost, bit 16-23. */
#endif #endif
pj_uint32_t last_seq; /**< Last sequence number. */ pj_uint32_t last_seq; /**< Last sequence number. */
pj_uint32_t jitter; /**< Jitter. */ pj_uint32_t jitter; /**< Jitter. */
pj_uint32_t lsr; /**< Last SR. */ pj_uint32_t lsr; /**< Last SR. */
pj_uint32_t dlsr; /**< Delay since last SR. */ pj_uint32_t dlsr; /**< Delay since last SR. */
}; } pjmedia_rtcp_rr;
/**
* @see pjmedia_rtcp_rr
*/
typedef struct pjmedia_rtcp_rr pjmedia_rtcp_rr;
/** /**
* RTCP common header. * RTCP common header.
*/ */
struct pjmedia_rtcp_common typedef struct pjmedia_rtcp_common
{ {
#if defined(PJ_IS_BIG_ENDIAN) && PJ_IS_BIG_ENDIAN!=0 #if defined(PJ_IS_BIG_ENDIAN) && PJ_IS_BIG_ENDIAN!=0
unsigned version:2; /**< packet type */ unsigned version:2; /**< packet type */
unsigned p:1; /**< padding flag */ unsigned p:1; /**< padding flag */
unsigned count:5; /**< varies by payload type */ unsigned count:5; /**< varies by payload type */
unsigned pt:8; /**< payload type */ unsigned pt:8; /**< payload type */
#else #else
unsigned count:5; /**< varies by payload type */ unsigned count:5; /**< varies by payload type */
unsigned p:1; /**< padding flag */ unsigned p:1; /**< padding flag */
unsigned version:2; /**< packet type */ unsigned version:2; /**< packet type */
unsigned pt:8; /**< payload type */ unsigned pt:8; /**< payload type */
#endif #endif
unsigned length:16; /**< packet length */ unsigned length:16; /**< packet length */
pj_uint32_t ssrc; /**< SSRC identification */ pj_uint32_t ssrc; /**< SSRC identification */
}; } pjmedia_rtcp_common;
/**
* @see pjmedia_rtcp_common
*/
typedef struct pjmedia_rtcp_common pjmedia_rtcp_common;
/** /**
* This structure declares default RTCP packet (SR) that is sent by pjmedia . * This structure declares default RTCP packet (SR) that is sent by pjmedia .
* Incoming RTCP packet may have different format, and must be parsed * Incoming RTCP packet may have different format, and must be parsed
* manually by application. * manually by application.
*/ */
typedef struct pjmedia_rtcp_sr_pkt typedef struct pjmedia_rtcp_sr_pkt
{ {
pjmedia_rtcp_common common; /**< Common header. */ pjmedia_rtcp_common common; /**< Common header. */
pjmedia_rtcp_sr sr; /**< Sender report. */ pjmedia_rtcp_sr sr; /**< Sender report. */
skipping to change at line 152 skipping to change at line 137
*/ */
typedef struct pjmedia_rtcp_rr_pkt typedef struct pjmedia_rtcp_rr_pkt
{ {
pjmedia_rtcp_common common; /**< Common header. */ pjmedia_rtcp_common common; /**< Common header. */
pjmedia_rtcp_rr rr; /**< variable-length list */ pjmedia_rtcp_rr rr; /**< variable-length list */
} pjmedia_rtcp_rr_pkt; } pjmedia_rtcp_rr_pkt;
#pragma pack() #pragma pack()
/** /**
* NTP time representation. * RTCP SDES structure.
*/ */
struct pjmedia_rtcp_ntp_rec typedef struct pjmedia_rtcp_sdes
{ {
pj_uint32_t hi; /**< High order 32-bit part. */ pj_str_t cname; /**< RTCP SDES type CNAME. */
pj_uint32_t lo; /**< Lo order 32-bit part. */ pj_str_t name; /**< RTCP SDES type NAME. */
}; pj_str_t email; /**< RTCP SDES type EMAIL. */
pj_str_t phone; /**< RTCP SDES type PHONE. */
pj_str_t loc; /**< RTCP SDES type LOC. */
pj_str_t tool; /**< RTCP SDES type TOOL. */
pj_str_t note; /**< RTCP SDES type NOTE. */
} pjmedia_rtcp_sdes;
/** /**
* @see pjmedia_rtcp_ntp_rec * NTP time representation.
*/ */
typedef struct pjmedia_rtcp_ntp_rec pjmedia_rtcp_ntp_rec; typedef struct pjmedia_rtcp_ntp_rec
{
pj_uint32_t hi; /**< High order 32-bit part. */
pj_uint32_t lo; /**< Lo order 32-bit part. */
} pjmedia_rtcp_ntp_rec;
/** /**
* Unidirectional RTP stream statistics. * Unidirectional RTP stream statistics.
*/ */
struct pjmedia_rtcp_stream_stat typedef struct pjmedia_rtcp_stream_stat
{ {
pj_time_val update; /**< Time of last update. */ pj_time_val update; /**< Time of last update. */
unsigned update_cnt; /**< Number of updates (to calculate avg) */ unsigned update_cnt; /**< Number of updates (to calculate avg) */
pj_uint32_t pkt; /**< Total number of packets */ pj_uint32_t pkt; /**< Total number of packets */
pj_uint32_t bytes; /**< Total number of payload/bytes */ pj_uint32_t bytes; /**< Total number of payload/bytes */
unsigned discard; /**< Total number of discarded packets. */ unsigned discard; /**< Total number of discarded packets. */
unsigned loss; /**< Total number of packets lost */ unsigned loss; /**< Total number of packets lost */
unsigned reorder; /**< Total number of out of order packets */ unsigned reorder; /**< Total number of out of order packets */
unsigned dup; /**< Total number of duplicates packets */ unsigned dup; /**< Total number of duplicates packets */
pj_math_stat loss_period;/**< Loss period statistics (in usec) */ pj_math_stat loss_period;/**< Loss period statistics (in usec) */
struct { struct {
unsigned burst:1; /**< Burst/sequential packet lost detected */ unsigned burst:1; /**< Burst/sequential packet lost detected */
unsigned random:1; /**< Random packet lost detected. */ unsigned random:1; /**< Random packet lost detected. */
} loss_type; /**< Types of loss detected. */ } loss_type; /**< Types of loss detected. */
pj_math_stat jitter; /**< Jitter statistics (in usec) */ pj_math_stat jitter; /**< Jitter statistics (in usec) */
};
/** } pjmedia_rtcp_stream_stat;
* @see pjmedia_rtcp_stream_stat
*/
typedef struct pjmedia_rtcp_stream_stat pjmedia_rtcp_stream_stat;
/** /**
* Bidirectional RTP stream statistics. * Bidirectional RTP stream statistics.
*/ */
struct pjmedia_rtcp_stat typedef 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_uint32_t rtp_tx_last_ts; /**< Last TX RTP timest amp. */
pj_uint16_t rtp_tx_last_seq;/**< Last TX RTP sequen ce. */ pj_uint16_t rtp_tx_last_seq;/**< Last TX RTP sequen ce. */
skipping to change at line 220 skipping to change at line 210
pj_math_stat rx_ipdv;/**< Statistics of IP packet delay pj_math_stat rx_ipdv;/**< Statistics of IP packet delay
variation in receiving direction variation in receiving direction
(in usec). */ (in usec). */
#endif #endif
#if defined(PJMEDIA_RTCP_STAT_HAS_RAW_JITTER) && PJMEDIA_RTCP_STAT_HAS_RAW_ JITTER!=0 #if defined(PJMEDIA_RTCP_STAT_HAS_RAW_JITTER) && PJMEDIA_RTCP_STAT_HAS_RAW_ JITTER!=0
pj_math_stat rx_raw_jitter;/**< Statistic of raw jitter in pj_math_stat rx_raw_jitter;/**< Statistic of raw jitter in
receiving direction receiving direction
(in usec). */ (in usec). */
#endif #endif
};
/** pjmedia_rtcp_sdes peer_sdes; /**< Peer SDES.
* @see pjmedia_rtcp_stat */
*/ char peer_sdes_buf_[PJMEDIA_RTCP_RX_SDES_BUF_LEN];
typedef struct pjmedia_rtcp_stat pjmedia_rtcp_stat; /**< Peer SDES buffer.
*/
} 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.
*/ */
struct pjmedia_rtcp_session typedef struct pjmedia_rtcp_session
{ {
char *name; /**< Name identification. */ char *name; /**< Name identification. */
pjmedia_rtcp_sr_pkt rtcp_sr_pkt;/**< Cached RTCP SR packet. */ pjmedia_rtcp_sr_pkt rtcp_sr_pkt;/**< Cached RTCP SR packet. */
pjmedia_rtcp_rr_pkt rtcp_rr_pkt;/**< Cached RTCP RR packet. */ pjmedia_rtcp_rr_pkt rtcp_rr_pkt;/**< Cached RTCP RR packet. */
pjmedia_rtp_seq_session seq_ctrl; /**< RTCP sequence number control. */ pjmedia_rtp_seq_session seq_ctrl; /**< RTCP sequence number control. */
unsigned rtp_last_ts;/**< Last timestamp in RX RTP pkt. */ unsigned rtp_last_ts;/**< Last timestamp in RX RTP pkt. */
unsigned clock_rate; /**< Clock rate of the stream */ unsigned clock_rate; /**< Clock rate of the stream */
unsigned pkt_size; /**< Avg pkt size, in samples. */ unsigned pkt_size; /**< Avg pkt size, in samples. */
skipping to change at line 270 skipping to change at line 260
* Specify whether RTCP XR processing is enabled on this session. * Specify whether RTCP XR processing is enabled on this session.
*/ */
pj_bool_t xr_enabled; pj_bool_t xr_enabled;
/** /**
* RTCP XR session, only valid if RTCP XR processing is enabled * RTCP XR session, only valid if RTCP XR processing is enabled
* on this session. * on this session.
*/ */
pjmedia_rtcp_xr_session xr_session; pjmedia_rtcp_xr_session xr_session;
#endif #endif
}; } pjmedia_rtcp_session;
/**
* @see pjmedia_rtcp_session
*/
typedef struct pjmedia_rtcp_session pjmedia_rtcp_session;
/** /**
* RTCP session settings. * RTCP session settings.
*/ */
typedef struct pjmedia_rtcp_session_setting typedef struct pjmedia_rtcp_session_setting
{ {
char *name; /**< RTCP session name. */ char *name; /**< RTCP session name. */
unsigned clock_rate; /**< Sequence. */ unsigned clock_rate; /**< Sequence. */
unsigned samples_per_frame; /**< Timestamp. */ unsigned samples_per_frame; /**< Timestamp. */
pj_uint32_t ssrc; /**< Sender SSRC. */ pj_uint32_t ssrc; /**< Sender SSRC. */
skipping to change at line 418 skipping to change at line 403
* @param session The RTCP session. * @param session The RTCP session.
* @param rtcp_pkt Upon return, it will contain pointer to the * @param rtcp_pkt Upon return, it will contain pointer to the
* RTCP packet, which can be RTCP SR or RR. * RTCP packet, which can be RTCP SR or RR.
* @param len Upon return, it will indicate the size of * @param len Upon return, it will indicate the size of
* the RTCP packet. * the RTCP packet.
*/ */
PJ_DECL(void) pjmedia_rtcp_build_rtcp( pjmedia_rtcp_session *session, PJ_DECL(void) pjmedia_rtcp_build_rtcp( pjmedia_rtcp_session *session,
void **rtcp_pkt, int *len); void **rtcp_pkt, int *len);
/** /**
* Build an RTCP SDES (source description) packet. This packet can be
* appended to other RTCP packets, e.g: RTCP RR/SR, to compose a compound
* RTCP packet.
*
* @param session The RTCP session.
* @param buf The buffer to receive RTCP SDES packet.
* @param length On input, it will contain the buffer length.
* On output, it will contain the generated RTCP SDES
* packet length.
* @param sdes The source description, see #pjmedia_rtcp_sdes.
*
* @return PJ_SUCCESS on success.
*/
PJ_DECL(pj_status_t) pjmedia_rtcp_build_rtcp_sdes(
pjmedia_rtcp_session *session,
void *buf,
pj_size_t *length,
const pjmedia_rtcp_sdes *sdes);
/**
* Build an RTCP BYE packet. This packet can be appended to other RTCP
* packets, e.g: RTCP RR/SR, to compose a compound RTCP packet.
*
* @param session The RTCP session.
* @param buf The buffer to receive RTCP BYE packet.
* @param length On input, it will contain the buffer length.
* On output, it will contain the generated RTCP BYE
* packet length.
* @param reason Optional, the BYE reason.
*
* @return PJ_SUCCESS on success.
*/
PJ_DECL(pj_status_t) pjmedia_rtcp_build_rtcp_bye(
pjmedia_rtcp_session *session,
void *buf,
pj_size_t *length,
const pj_str_t *reason);
/**
* Call this function if RTCP XR needs to be enabled/disabled in the * Call this function if RTCP XR needs to be enabled/disabled in the
* RTCP session. * RTCP session.
* *
* @param session The RTCP session. * @param session The RTCP session.
* @param enable Enable/disable RTCP XR. * @param enable Enable/disable RTCP XR.
* *
* @return PJ_SUCCESS on success. * @return PJ_SUCCESS on success.
*/ */
PJ_DECL(pj_status_t) pjmedia_rtcp_enable_xr( pjmedia_rtcp_session *session, PJ_DECL(pj_status_t) pjmedia_rtcp_enable_xr( pjmedia_rtcp_session *session,
pj_bool_t enable); pj_bool_t enable);
 End of changes. 21 change blocks. 
48 lines changed or deleted 74 lines changed or added


 rtcp_xr.h   rtcp_xr.h 
/* $Id: rtcp_xr.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: rtcp_xr.h 3969 2012-03-08 08:34:30Z nanang $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 200 skipping to change at line 200
pj_uint8_t reserved2; /**< Not used */ pj_uint8_t reserved2; /**< Not used */
pj_uint16_t jb_nom; /**< Current delay by jitter pj_uint16_t jb_nom; /**< Current delay by jitter
buffer */ buffer */
pj_uint16_t jb_max; /**< Maximum delay by jitter pj_uint16_t jb_max; /**< Maximum delay by jitter
buffer */ buffer */
pj_uint16_t jb_abs_max; /**< Maximum possible delay by pj_uint16_t jb_abs_max; /**< Maximum possible delay by
jitter buffer */ jitter buffer */
} pjmedia_rtcp_xr_rb_voip_mtc; } pjmedia_rtcp_xr_rb_voip_mtc;
/** /**
* Constant of RTCP-XR content size.
*/
#define PJMEDIA_RTCP_XR_BUF_SIZE \
sizeof(pjmedia_rtcp_xr_rb_rr_time) + \
sizeof(pjmedia_rtcp_xr_rb_dlrr) + \
sizeof(pjmedia_rtcp_xr_rb_stats) + \
sizeof(pjmedia_rtcp_xr_rb_voip_mtc)
/**
* This structure declares RTCP XR (Extended Report) packet. * This structure declares RTCP XR (Extended Report) packet.
*/ */
typedef struct pjmedia_rtcp_xr_pkt typedef struct pjmedia_rtcp_xr_pkt
{ {
struct { struct {
#if defined(PJ_IS_BIG_ENDIAN) && PJ_IS_BIG_ENDIAN!=0 #if defined(PJ_IS_BIG_ENDIAN) && PJ_IS_BIG_ENDIAN!=0
unsigned version:2; /**< packet type */ unsigned version:2; /**< packet type */
unsigned p:1; /**< padding flag */ unsigned p:1; /**< padding flag */
unsigned count:5; /**< varies by payload type */ unsigned count:5; /**< varies by payload type */
unsigned pt:8; /**< payload type */ unsigned pt:8; /**< payload type */
#else #else
unsigned count:5; /**< varies by payload type */ unsigned count:5; /**< varies by payload type */
unsigned p:1; /**< padding flag */ unsigned p:1; /**< padding flag */
unsigned version:2; /**< packet type */ unsigned version:2; /**< packet type */
unsigned pt:8; /**< payload type */ unsigned pt:8; /**< payload type */
#endif #endif
unsigned length:16; /**< packet length */ unsigned length:16; /**< packet length */
pj_uint32_t ssrc; /**< SSRC identification */ pj_uint32_t ssrc; /**< SSRC identification */
} common; } common;
pj_int8_t buf[PJMEDIA_MAX_MTU];/**< Content buffer */ pj_int8_t buf[PJMEDIA_RTCP_XR_BUF_SIZE];
/**< Content buffer */
} pjmedia_rtcp_xr_pkt; } pjmedia_rtcp_xr_pkt;
#pragma pack() #pragma pack()
/** /**
* This structure describes RTCP XR statitic. * This structure describes RTCP XR statitic.
*/ */
typedef struct pjmedia_rtcp_xr_stream_stat typedef struct pjmedia_rtcp_xr_stream_stat
{ {
struct { struct {
 End of changes. 3 change blocks. 
2 lines changed or deleted 12 lines changed or added


 sip_config.h   sip_config.h 
/* $Id: sip_config.h 3586 2011-06-16 13:15:04Z nanang $ */ /* $Id: sip_config.h 4091 2012-04-26 09:20:07Z bennylp $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 84 skipping to change at line 84
* Specify port number should be allowed to appear in To and From * Specify port number should be allowed to appear in To and From
* header. Note that RFC 3261 disallow this, see Table 1 in section * header. Note that RFC 3261 disallow this, see Table 1 in section
* 19.1.1 of the RFC. Default is PJSIP_ALLOW_PORT_IN_FROMTO_HDR. * 19.1.1 of the RFC. Default is PJSIP_ALLOW_PORT_IN_FROMTO_HDR.
*/ */
pj_bool_t allow_port_in_fromto_hdr; pj_bool_t allow_port_in_fromto_hdr;
/** /**
* Disable rport in request. * Disable rport in request.
*/ */
pj_bool_t disable_rport; pj_bool_t disable_rport;
/**
* Disable automatic switching from UDP to TCP if outgoing request
* is greater than 1300 bytes. See PJSIP_DONT_SWITCH_TO_TCP.
*/
pj_bool_t disable_tcp_switch;
} endpt; } endpt;
/** Transaction layer settings. */ /** Transaction layer settings. */
struct { struct {
/** Maximum number of transactions. The value is initialized with /** Maximum number of transactions. The value is initialized with
* PJSIP_MAX_TSX_COUNT * PJSIP_MAX_TSX_COUNT
*/ */
unsigned max_count; unsigned max_count;
skipping to change at line 246 skipping to change at line 253
/** /**
* RFC 3261 section 18.1.1: * RFC 3261 section 18.1.1:
* If a request is within 200 bytes of the path MTU, or if it is larger * If a request is within 200 bytes of the path MTU, or if it is larger
* than 1300 bytes and the path MTU is unknown, the request MUST be sent * than 1300 bytes and the path MTU is unknown, the request MUST be sent
* using an RFC 2914 [43] congestion controlled transport protocol, such * using an RFC 2914 [43] congestion controlled transport protocol, such
* as TCP. * as TCP.
* *
* Disable the behavior of automatic switching to TCP whenever UDP packet * Disable the behavior of automatic switching to TCP whenever UDP packet
* size exceeds the threshold defined in PJSIP_UDP_SIZE_THRESHOLD. * size exceeds the threshold defined in PJSIP_UDP_SIZE_THRESHOLD.
* *
* This option can also be controlled at run-time by the \a disable_tcp_swi
tch
* setting in pjsip_cfg_t.
*
* Default is 0 (no). * Default is 0 (no).
*/ */
#ifndef PJSIP_DONT_SWITCH_TO_TCP #ifndef PJSIP_DONT_SWITCH_TO_TCP
# define PJSIP_DONT_SWITCH_TO_TCP 0 # define PJSIP_DONT_SWITCH_TO_TCP 0
#endif #endif
/** /**
* This setting controls the threshold of the UDP packet, which if it's * This setting controls the threshold of the UDP packet, which if it's
* larger than this value the request will be sent with TCP. This setting * larger than this value the request will be sent with TCP. This setting
* is useful only when PJSIP_DONT_SWITCH_TO_TCP is set to 0. * is useful only when PJSIP_DONT_SWITCH_TO_TCP is set to 0.
skipping to change at line 403 skipping to change at line 413
/** /**
* Max entries to process in timer heap per poll. * Max entries to process in timer heap per poll.
* *
* Default: 10 * Default: 10
*/ */
#ifndef PJSIP_MAX_TIMED_OUT_ENTRIES #ifndef PJSIP_MAX_TIMED_OUT_ENTRIES
# define PJSIP_MAX_TIMED_OUT_ENTRIES 10 # define PJSIP_MAX_TIMED_OUT_ENTRIES 10
#endif #endif
/** /**
* Idle timeout interval to be applied to transports with no usage * Idle timeout interval to be applied to outgoing transports (i.e. client
* before the transport is destroyed. Value is in seconds. * side) with no usage before the transport is destroyed. Value is in
* seconds.
*
* Note that if the value is put lower than 33 seconds, it may cause some
* pjsip test units to fail. See the comment on the following link:
* https://trac.pjsip.org/repos/ticket/1465#comment:4
* *
* Default: 600 * Default: 33
*/ */
#ifndef PJSIP_TRANSPORT_IDLE_TIME #ifndef PJSIP_TRANSPORT_IDLE_TIME
# define PJSIP_TRANSPORT_IDLE_TIME 600 # define PJSIP_TRANSPORT_IDLE_TIME 33
#endif
/**
* Idle timeout interval to be applied to incoming transports (i.e. server
* side) with no usage before the transport is destroyed. Server typically
* should let client close the connection, hence set this interval to a lar
ge
* value. Value is in seconds.
*
* Default: 600
*/
#ifndef PJSIP_TRANSPORT_SERVER_IDLE_TIME
# define PJSIP_TRANSPORT_SERVER_IDLE_TIME 600
#endif #endif
/** /**
* Maximum number of usages for a transport before a new transport is * Maximum number of usages for a transport before a new transport is
* created. This only applies for ephemeral transports such as TCP. * created. This only applies for ephemeral transports such as TCP.
* *
* Currently this is not used. * Currently this is not used.
* *
* Default: -1 * Default: -1
*/ */
 End of changes. 6 change blocks. 
5 lines changed or deleted 34 lines changed or added


 sip_endpoint.h   sip_endpoint.h 
/* $Id: sip_endpoint.h 3828 2011-10-19 10:13:13Z bennylp $ */ /* $Id: sip_endpoint.h 3988 2012-03-28 07:32:42Z nanang $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 66 skipping to change at line 66
* existing modules (such as when incoming request has unsupported metho d). * existing modules (such as when incoming request has unsupported metho d).
* - and so on.. * - and so on..
* *
* Application should only instantiate one SIP endpoint instance for every * Application should only instantiate one SIP endpoint instance for every
* process. * process.
* *
* @{ * @{
*/ */
/** /**
* Type of callback to register to pjsip_endpt_atexit().
*/
typedef void (*pjsip_endpt_exit_callback)(pjsip_endpoint *endpt);
/**
* Create an instance of SIP endpoint from the specified pool factory. * Create an instance of SIP endpoint from the specified pool factory.
* The pool factory reference then will be kept by the endpoint, so that * The pool factory reference then will be kept by the endpoint, so that
* future memory allocations by SIP components will be taken from the same * future memory allocations by SIP components will be taken from the same
* pool factory. * pool factory.
* *
* @param pf Pool factory that will be used for the lifetime of * @param pf Pool factory that will be used for the lifetime of
* endpoint. * endpoint.
* @param name Optional name to be specified for the endpoint. * @param name Optional name to be specified for the endpoint.
* If this parameter is NULL, then the name will use * If this parameter is NULL, then the name will use
* local host name. * local host name.
skipping to change at line 506 skipping to change at line 511
* with log level 3. * with log level 3.
* *
* @param endpt The endpoint. * @param endpt The endpoint.
* @param detail If non zero, then it will dump a detailed output. * @param detail If non zero, then it will dump a detailed output.
* BEWARE that this option may crash the system because * BEWARE that this option may crash the system because
* it tries to access all memory pools. * it tries to access all memory pools.
*/ */
PJ_DECL(void) pjsip_endpt_dump( pjsip_endpoint *endpt, pj_bool_t detail ); PJ_DECL(void) pjsip_endpt_dump( pjsip_endpoint *endpt, pj_bool_t detail );
/** /**
* Register cleanup function to be called by SIP endpoint when
* #pjsip_endpt_destroy() is called. Note that application should not
* use or access any endpoint resource (such as pool, ioqueue, timer heap)
* from within the callback as such resource may have been released when
* the callback function is invoked.
*
* @param endpt The SIP endpoint.
* @param func The function to be registered.
*
* @return PJ_SUCCESS on success.
*/
PJ_DECL(pj_status_t) pjsip_endpt_atexit(pjsip_endpoint *endpt,
pjsip_endpt_exit_callback func);
/**
* @} * @}
*/ */
/** /**
* Log an error. * Log an error.
*/ */
PJ_DECL(void) pjsip_endpt_log_error( pjsip_endpoint *endpt, PJ_DECL(void) pjsip_endpt_log_error( pjsip_endpoint *endpt,
const char *sender, const char *sender,
pj_status_t error_code, pj_status_t error_code,
const char *format, const char *format,
 End of changes. 3 change blocks. 
1 lines changed or deleted 21 lines changed or added


 sip_regc.h   sip_regc.h 
/* $Id: sip_regc.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: sip_regc.h 4037 2012-04-11 09:41:25Z bennylp $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 260 skipping to change at line 260
* @param sel Transport selector containing the specification of * @param sel Transport selector containing the specification of
* transport or listener to be used by this session * transport or listener to be used by this session
* to send requests. * to send requests.
* *
* @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) pjsip_regc_set_transport(pjsip_regc *regc, PJ_DECL(pj_status_t) pjsip_regc_set_transport(pjsip_regc *regc,
const pjsip_tpselector *sel); const pjsip_tpselector *sel);
/** /**
* Release the reference to current transport being used by the regc, if an
y.
* The regc keeps the reference to the last transport being used in order
* to prevent it from being destroyed. In some situation however, such as
* when the transport is disconnected, it is necessary to instruct the
* regc to release this reference so that the transport can be destroyed.
* See https://trac.pjsip.org/repos/ticket/1481 for background info.
*
* @param regc The client registration instance.
*
* @return PJ_SUCCESS on success, or the appropriate error code.
*/
PJ_DECL(pj_status_t) pjsip_regc_release_transport(pjsip_regc *regc);
/**
* Add headers to be added to outgoing REGISTER requests. * Add headers to be added to outgoing REGISTER requests.
* *
* @param regc The client registration structure. * @param regc The client registration structure.
* @param hdr_list List containing SIP headers to be added for all outgoin g * @param hdr_list List containing SIP headers to be added for all outgoin g
* REGISTER requests. * REGISTER requests.
* *
* @return PJ_SUCCESS on success. * @return PJ_SUCCESS on success.
*/ */
PJ_DECL(pj_status_t) pjsip_regc_add_headers(pjsip_regc *regc, PJ_DECL(pj_status_t) pjsip_regc_add_headers(pjsip_regc *regc,
const pjsip_hdr *hdr_list); const pjsip_hdr *hdr_list);
 End of changes. 2 change blocks. 
1 lines changed or deleted 16 lines changed or added


 sip_transport.h   sip_transport.h 
/* $Id: sip_transport.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: sip_transport.h 3954 2012-02-18 02:12:22Z bennylp $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 563 skipping to change at line 563
} tp_info; } tp_info;
/** /**
* Transport selector, to specify which transport to be used. * Transport selector, to specify which transport to be used.
* The value here must be set with pjsip_tx_data_set_transport(), * The value here must be set with pjsip_tx_data_set_transport(),
* to allow reference counter to be set properly. * to allow reference counter to be set properly.
*/ */
pjsip_tpselector tp_sel; pjsip_tpselector tp_sel;
/** /**
* Special flag to indicate that this transmit data is a request that h
as
* been updated with proper authentication response and is ready to be
* sent for retry.
*/
pj_bool_t auth_retry;
/**
* Arbitrary data attached by PJSIP modules. * Arbitrary data attached by PJSIP modules.
*/ */
void *mod_data[PJSIP_MAX_MODULE]; void *mod_data[PJSIP_MAX_MODULE];
}; };
/** /**
* 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.
 End of changes. 2 change blocks. 
1 lines changed or deleted 9 lines changed or added


 sip_transport_tls.h   sip_transport_tls.h 
/* $Id: sip_transport_tls.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: sip_transport_tls.h 3943 2012-01-17 07:02:14Z nanang $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 29 skipping to change at line 29
*/ */
#ifndef __PJSIP_TRANSPORT_TLS_H__ #ifndef __PJSIP_TRANSPORT_TLS_H__
#define __PJSIP_TRANSPORT_TLS_H__ #define __PJSIP_TRANSPORT_TLS_H__
/** /**
* @file sip_transport_tls.h * @file sip_transport_tls.h
* @brief SIP TLS Transport. * @brief SIP TLS Transport.
*/ */
#include <pjsip/sip_transport.h> #include <pjsip/sip_transport.h>
#include <pj/pool.h>
#include <pj/ssl_sock.h> #include <pj/ssl_sock.h>
#include <pj/string.h> #include <pj/string.h>
#include <pj/sock_qos.h> #include <pj/sock_qos.h>
PJ_BEGIN_DECL PJ_BEGIN_DECL
/** /**
* @defgroup PJSIP_TRANSPORT_TLS TLS Transport * @defgroup PJSIP_TRANSPORT_TLS TLS Transport
* @ingroup PJSIP_TRANSPORT * @ingroup PJSIP_TRANSPORT
* @brief API to create and register TLS transport. * @brief API to create and register TLS transport.
skipping to change at line 105 skipping to change at line 106
* - PJSIP_SSLV3_METHOD(3): SSL3 * - PJSIP_SSLV3_METHOD(3): SSL3
* - PJSIP_SSLV23_METHOD(23): SSL23 * - PJSIP_SSLV23_METHOD(23): SSL23
* *
* Default is PJSIP_SSL_UNSPECIFIED_METHOD (0), which in turn will * Default is PJSIP_SSL_UNSPECIFIED_METHOD (0), which in turn will
* use PJSIP_SSL_DEFAULT_METHOD, which default value is * use PJSIP_SSL_DEFAULT_METHOD, which default value is
* PJSIP_TLSV1_METHOD. * PJSIP_TLSV1_METHOD.
*/ */
int method; int method;
/** /**
* TLS cipher list string in OpenSSL format. If empty, then default * Number of ciphers contained in the specified cipher preference.
* cipher list of the backend will be used. * If this is set to zero, then default cipher list of the backend
* will be used.
*
* Default: 0 (zero).
*/ */
pj_str_t ciphers; unsigned ciphers_num;
/** /**
* Optionally specify the server name instance to be contacted when * Ciphers and order preference. The #pj_ssl_cipher_get_availables()
* making outgoing TLS connection. This setting is useful when the * can be used to check the available ciphers supported by backend.
* server is hosting multiple domains for the same TLS listening
* socket.
*
* Default: empty.
*/ */
pj_str_t server_name; pj_ssl_cipher *ciphers;
/** /**
* Specifies TLS transport behavior on the server TLS certificate * Specifies TLS transport behavior on the server TLS certificate
* verification result: * verification result:
* - If \a verify_server is disabled (set to PJ_FALSE), TLS transport * - If \a verify_server is disabled (set to PJ_FALSE), TLS transport
* will just notify the application via #pjsip_tp_state_callback with * will just notify the application via #pjsip_tp_state_callback with
* state PJSIP_TP_STATE_CONNECTED regardless TLS verification result. * state PJSIP_TP_STATE_CONNECTED regardless TLS verification result.
* - If \a verify_server is enabled (set to PJ_TRUE), TLS transport * - If \a verify_server is enabled (set to PJ_TRUE), TLS transport
* will be shutdown and application will be notified with state * will be shutdown and application will be notified with state
* PJSIP_TP_STATE_DISCONNECTED whenever there is any TLS verification * PJSIP_TP_STATE_DISCONNECTED whenever there is any TLS verification
skipping to change at line 242 skipping to change at line 242
*/ */
PJ_INLINE(void) pjsip_tls_setting_copy(pj_pool_t *pool, PJ_INLINE(void) pjsip_tls_setting_copy(pj_pool_t *pool,
pjsip_tls_setting *dst, pjsip_tls_setting *dst,
const pjsip_tls_setting *src) const pjsip_tls_setting *src)
{ {
pj_memcpy(dst, src, sizeof(*dst)); pj_memcpy(dst, src, sizeof(*dst));
pj_strdup_with_null(pool, &dst->ca_list_file, &src->ca_list_file); pj_strdup_with_null(pool, &dst->ca_list_file, &src->ca_list_file);
pj_strdup_with_null(pool, &dst->cert_file, &src->cert_file); pj_strdup_with_null(pool, &dst->cert_file, &src->cert_file);
pj_strdup_with_null(pool, &dst->privkey_file, &src->privkey_file); pj_strdup_with_null(pool, &dst->privkey_file, &src->privkey_file);
pj_strdup_with_null(pool, &dst->password, &src->password); pj_strdup_with_null(pool, &dst->password, &src->password);
pj_strdup_with_null(pool, &dst->ciphers, &src->ciphers); if (src->ciphers_num) {
unsigned i;
dst->ciphers = (pj_ssl_cipher*) pj_pool_calloc(pool, src->ciphers_nu
m,
sizeof(pj_ssl_cipher)
);
for (i=0; i<src->ciphers_num; ++i)
dst->ciphers[i] = src->ciphers[i];
}
} }
/** /**
* Register support for SIP TLS transport by creating TLS listener on * Register support for SIP TLS transport by creating TLS listener on
* the specified address and port. This function will create an * the specified address and port. This function will create an
* instance of SIP TLS transport factory and register it to the * instance of SIP TLS transport factory and register it to the
* transport manager. * transport manager.
* *
* @param endpt The SIP endpoint. * @param endpt The SIP endpoint.
* @param opt Optional TLS settings. * @param opt Optional TLS settings.
 End of changes. 7 change blocks. 
12 lines changed or deleted 20 lines changed or added


 sound_port.h   sound_port.h 
/* $Id: sound_port.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: sound_port.h 4065 2012-04-21 02:17:07Z bennylp $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 78 skipping to change at line 78
enum pjmedia_snd_port_option enum pjmedia_snd_port_option
{ {
/** /**
* Don't start the audio device when creating a sound port. * Don't start the audio device when creating a sound port.
*/ */
PJMEDIA_SND_PORT_NO_AUTO_START = 1 PJMEDIA_SND_PORT_NO_AUTO_START = 1
}; };
/** /**
* This structure specifies the parameters to create the sound port. * This structure specifies the parameters to create the sound port.
* Use pjmedia_snd_port_param_default() to initialize this structure with
* default values (mostly zeroes)
*/ */
typedef struct pjmedia_snd_port_param typedef struct pjmedia_snd_port_param
{ {
/** /**
* Base structure. * Base structure.
*/ */
pjmedia_aud_param base; pjmedia_aud_param base;
/** /**
* Sound port creation options. * Sound port creation options.
*/ */
unsigned options; unsigned options;
/**
* Echo cancellation options/flags.
*/
unsigned ec_options;
} pjmedia_snd_port_param; } pjmedia_snd_port_param;
/** /**
* Initialize pjmedia_snd_port_param with default values.
*
* @param prm The parameter.
*/
PJ_DECL(void) pjmedia_snd_port_param_default(pjmedia_snd_port_param *prm);
/**
* This opaque type describes sound device port connection. * This opaque type describes sound device port connection.
* Sound device port is not a media port, but it is used to connect media * Sound device port is not a media port, but it is used to connect media
* port to the sound device. * port to the sound device.
*/ */
typedef struct pjmedia_snd_port pjmedia_snd_port; typedef struct pjmedia_snd_port pjmedia_snd_port;
/** /**
* Create bidirectional sound port for both capturing and playback of * Create bidirectional sound port for both capturing and playback of
* audio samples. * audio samples.
* *
 End of changes. 4 change blocks. 
1 lines changed or deleted 16 lines changed or added


 ssl_sock.h   ssl_sock.h 
/* $Id: ssl_sock.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: ssl_sock.h 3942 2012-01-16 05:05:47Z nanang $ */
/* /*
* Copyright (C) 2009-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2009-2011 Teluu Inc. (http://www.teluu.com)
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
skipping to change at line 324 skipping to change at line 324
* *
* @param ciphers The ciphers buffer to receive cipher list. * @param ciphers The ciphers buffer to receive cipher list.
* @param cipher_num Maximum number of ciphers to be received. * @param cipher_num Maximum number of ciphers to be received.
* *
* @return PJ_SUCCESS when successful. * @return PJ_SUCCESS when successful.
*/ */
PJ_DECL(pj_status_t) pj_ssl_cipher_get_availables(pj_ssl_cipher ciphers[], PJ_DECL(pj_status_t) pj_ssl_cipher_get_availables(pj_ssl_cipher ciphers[],
unsigned *cipher_num); unsigned *cipher_num);
/** /**
* Check if the specified cipher is supported by SSL/TLS backend.
*
* @param cipher The cipher.
*
* @return PJ_TRUE when supported.
*/
PJ_DECL(pj_bool_t) pj_ssl_cipher_is_supported(pj_ssl_cipher cipher);
/**
* Get cipher name string. * Get cipher name string.
* *
* @param cipher The cipher. * @param cipher The cipher.
* *
* @return The cipher name or NULL if cipher is not recognized. * @return The cipher name or NULL if cipher is not recognized/
* supported.
*/ */
PJ_DECL(const char*) pj_ssl_cipher_name(pj_ssl_cipher cipher); PJ_DECL(const char*) pj_ssl_cipher_name(pj_ssl_cipher cipher);
/** /**
* Get cipher ID from cipher name string.
*
* @param cipher_name The cipher name string.
*
* @return The cipher ID or PJ_TLS_UNKNOWN_CIPHER if the cipher
* name string is not recognized/supported.
*/
PJ_DECL(pj_ssl_cipher) pj_ssl_cipher_id(const char *cipher_name);
/**
* This structure contains the callbacks to be called by the secure socket. * This structure contains the callbacks to be called by the secure socket.
*/ */
typedef struct pj_ssl_sock_cb typedef struct pj_ssl_sock_cb
{ {
/** /**
* This callback is called when a data arrives as the result of * This callback is called when a data arrives as the result of
* pj_ssl_sock_start_read(). * pj_ssl_sock_start_read().
* *
* @param ssock The secure socket. * @param ssock The secure socket.
* @param data The buffer containing the new data, if any. If * @param data The buffer containing the new data, if any. If
 End of changes. 4 change blocks. 
2 lines changed or deleted 22 lines changed or added


 transport_srtp.h   transport_srtp.h 
/* $Id: transport_srtp.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: transport_srtp.h 3986 2012-03-22 11:29:20Z nanang $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 196 skipping to change at line 196
pjmedia_srtp_use peer_use; pjmedia_srtp_use peer_use;
} pjmedia_srtp_info; } pjmedia_srtp_info;
/** /**
* Initialize SRTP library. This function should be called before * Initialize SRTP library. This function should be called before
* any SRTP functions, however calling #pjmedia_transport_srtp_create() * any SRTP functions, however calling #pjmedia_transport_srtp_create()
* will also invoke this function. This function will also register SRTP * will also invoke this function. This function will also register SRTP
* library deinitialization to #pj_atexit(), so the deinitialization * library deinitialization to #pj_atexit(), so the deinitialization
* of SRTP library will be performed automatically by PJLIB destructor. * of SRTP library will be performed automatically by PJLIB destructor.
*
* @param endpt The media endpoint instance.
*
* @return PJ_SUCCESS on success.
*/ */
PJ_DECL(pj_status_t) pjmedia_srtp_init_lib(void); PJ_DECL(pj_status_t) pjmedia_srtp_init_lib(pjmedia_endpt *endpt);
/** /**
* Initialize SRTP setting with its default values. * Initialize SRTP setting with its default values.
* *
* @param opt SRTP setting to be initialized. * @param opt SRTP setting to be initialized.
*/ */
PJ_DECL(void) pjmedia_srtp_setting_default(pjmedia_srtp_setting *opt); PJ_DECL(void) pjmedia_srtp_setting_default(pjmedia_srtp_setting *opt);
/** /**
* Create an SRTP media transport. * Create an SRTP media transport.
 End of changes. 3 change blocks. 
2 lines changed or deleted 6 lines changed or added


 types.h   types.h 
/* $Id: types.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: types.h 3987 2012-03-23 08:24:58Z bennylp $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 288 skipping to change at line 288
/* /*
* General. * General.
*/ */
/** /**
* Initialize the PJ Library. * Initialize the PJ Library.
* This function must be called before using the library. The purpose of th is * This function must be called before using the library. The purpose of th is
* function is to initialize static library data, such as character table u sed * function is to initialize static library data, such as character table u sed
* in random string generation, and to initialize operating system dependen t * in random string generation, and to initialize operating system dependen t
* functionality (such as WSAStartup() in Windows). * functionality (such as WSAStartup() in Windows).
* *
* Apart from calling pj_init(), application typically should also initiali
ze
* the random seed by calling pj_srand().
*
* @return PJ_SUCCESS on success. * @return PJ_SUCCESS on success.
*/ */
PJ_DECL(pj_status_t) pj_init(void); PJ_DECL(pj_status_t) pj_init(void);
/** /**
* Shutdown PJLIB. * Shutdown PJLIB.
*/ */
PJ_DECL(void) pj_shutdown(void); PJ_DECL(void) pj_shutdown(void);
/** /**
 End of changes. 2 change blocks. 
1 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/