This repository has been archived by the owner on Dec 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
256 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Git LFS file not shown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* $Id: config.h 5725 2018-01-15 08:52:29Z ming $ */ | ||
/* $Id: config.h 5732 2018-01-24 03:42:35Z nanang $ */ | ||
/* | ||
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) | ||
* Copyright (C) 2003-2008 Benny Prijono <[email protected]> | ||
|
@@ -938,10 +938,15 @@ | |
* which uses GnuTLS. Setting this to PJ_SSL_SOCK_IMP_NONE will disable | ||
* secure socket. | ||
* | ||
* Default is PJ_SSL_SOCK_IMP_NONE | ||
* Default is PJ_SSL_SOCK_IMP_NONE if PJ_HAS_SSL_SOCK is not set, otherwise | ||
* it is PJ_SSL_SOCK_IMP_OPENSSL. | ||
*/ | ||
#ifndef PJ_SSL_SOCK_IMP | ||
# define PJ_SSL_SOCK_IMP PJ_SSL_SOCK_IMP_NONE | ||
# if PJ_HAS_SSL_SOCK==0 | ||
# define PJ_SSL_SOCK_IMP PJ_SSL_SOCK_IMP_NONE | ||
# else | ||
# define PJ_SSL_SOCK_IMP PJ_SSL_SOCK_IMP_OPENSSL | ||
# endif | ||
#endif | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* $Id: errno.h 5597 2017-06-03 09:22:34Z nanang $ */ | ||
/* $Id: errno.h 5748 2018-02-27 03:37:53Z ming $ */ | ||
/* | ||
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) | ||
* Copyright (C) 2003-2008 Benny Prijono <[email protected]> | ||
|
@@ -176,6 +176,11 @@ PJ_BEGIN_DECL | |
* Invalid SDP bandwidth info (b=) line. | ||
*/ | ||
#define PJMEDIA_SDP_EINBANDW (PJMEDIA_ERRNO_START+37) /* 220037 */ | ||
/** | ||
* @hideinitializer | ||
* Invalid SDP "ssrc" attribute. | ||
*/ | ||
#define PJMEDIA_SDP_EINSSRC (PJMEDIA_ERRNO_START+38) /* 220038 */ | ||
|
||
|
||
/************************************************************ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* $Id: jbuf.h 3841 2011-10-24 09:28:13Z ming $ */ | ||
/* $Id: jbuf.h 5734 2018-02-12 06:18:22Z ming $ */ | ||
/* | ||
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) | ||
* Copyright (C) 2003-2008 Benny Prijono <[email protected]> | ||
|
@@ -167,6 +167,18 @@ PJ_DECL(pj_status_t) pjmedia_jbuf_create(pj_pool_t *pool, | |
unsigned max_count, | ||
pjmedia_jbuf **p_jb); | ||
|
||
/** | ||
* Set the jitter buffer's frame duration. | ||
* | ||
* @param jb The jitter buffer | ||
* @param ptime Frame duration. | ||
* | ||
* @return PJ_SUCCESS on success. | ||
*/ | ||
PJ_DECL(pj_status_t) pjmedia_jbuf_set_ptime( pjmedia_jbuf *jb, | ||
unsigned ptime); | ||
|
||
|
||
/** | ||
* Set the jitter buffer to fixed delay mode. The default behavior | ||
* is to adapt the delay with actual packet delay. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* $Id: rtp.h 5460 2016-10-13 11:49:57Z riza $ */ | ||
/* $Id: rtp.h 5748 2018-02-27 03:37:53Z ming $ */ | ||
/* | ||
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) | ||
* Copyright (C) 2003-2008 Benny Prijono <[email protected]> | ||
|
@@ -189,6 +189,7 @@ struct pjmedia_rtp_session | |
pjmedia_rtp_seq_session seq_ctrl; /**< Sequence number management. */ | ||
pj_uint16_t out_pt; /**< Default outgoing payload type. */ | ||
pj_uint32_t out_extseq; /**< Outgoing extended seq #. */ | ||
pj_bool_t has_peer_ssrc;/**< Has peer SSRC? */ | ||
pj_uint32_t peer_ssrc; /**< Peer SSRC. */ | ||
pj_uint32_t received; /**< Number of received packets. */ | ||
}; | ||
|
@@ -248,9 +249,11 @@ typedef struct pjmedia_rtp_session_setting | |
bit #0: default payload type | ||
bit #1: sender SSRC | ||
bit #2: sequence | ||
bit #3: timestamp */ | ||
bit #3: timestamp | ||
bit #4: peer SSRC */ | ||
int default_pt; /**< Default payload type. */ | ||
pj_uint32_t sender_ssrc; /**< Sender SSRC. */ | ||
pj_uint32_t peer_ssrc; /**< Peer SSRC. */ | ||
pj_uint16_t seq; /**< Sequence. */ | ||
pj_uint32_t ts; /**< Timestamp. */ | ||
} pjmedia_rtp_session_setting; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* $Id: sdp.h 5697 2017-11-17 04:07:43Z ming $ */ | ||
/* $Id: sdp.h 5748 2018-02-27 03:37:53Z ming $ */ | ||
/* | ||
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) | ||
* Copyright (C) 2003-2008 Benny Prijono <[email protected]> | ||
|
@@ -333,6 +333,43 @@ PJ_DECL(pjmedia_sdp_attr*) pjmedia_sdp_attr_create_rtcp(pj_pool_t *pool, | |
const pj_sockaddr *a); | ||
|
||
|
||
/** | ||
* This structure describes SDP \a ssrc attribute. | ||
*/ | ||
typedef struct pjmedia_sdp_ssrc_attr | ||
{ | ||
pj_uint32_t ssrc; /**< RTP SSRC. */ | ||
pj_str_t cname; /**< RTCP CNAME. */ | ||
} pjmedia_sdp_ssrc_attr; | ||
|
||
|
||
/** | ||
* Parse a generic SDP attribute to get SDP ssrc attribute values. | ||
* | ||
* @param attr Generic attribute to be converted to ssrc, which | ||
* name must be "ssrc". | ||
* @param ssrc SDP ssrc attribute to be initialized. | ||
* | ||
* @return PJ_SUCCESS on success. | ||
*/ | ||
PJ_DECL(pj_status_t) pjmedia_sdp_attr_get_ssrc(const pjmedia_sdp_attr *attr, | ||
pjmedia_sdp_ssrc_attr *rtcp); | ||
|
||
|
||
/** | ||
* Create a=ssrc attribute. | ||
* | ||
* @param pool Pool to create the attribute. | ||
* @param ssrc SSRC identifier. | ||
* @param cname CNAME. | ||
* | ||
* @return SDP SSRC attribute. | ||
*/ | ||
PJ_DECL(pjmedia_sdp_attr*) pjmedia_sdp_attr_create_ssrc(pj_pool_t *pool, | ||
pj_uint32_t ssrc, | ||
const pj_str_t *cname); | ||
|
||
|
||
/* ************************************************************************** | ||
* SDP CONNECTION INFO | ||
**************************************************************************** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* $Id: stream.h 5479 2016-11-04 14:57:20Z riza $ */ | ||
/* $Id: stream.h 5748 2018-02-27 03:37:53Z ming $ */ | ||
/* | ||
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) | ||
* Copyright (C) 2003-2008 Benny Prijono <[email protected]> | ||
|
@@ -116,6 +116,10 @@ typedef struct pjmedia_stream_info | |
int tx_event_pt;/**< Outgoing pt for telephone-events. */ | ||
int rx_event_pt;/**< Incoming pt for telephone-events. */ | ||
pj_uint32_t ssrc; /**< RTP SSRC. */ | ||
pj_str_t cname; /**< RTCP CNAME. */ | ||
pj_bool_t has_rem_ssrc;/**<Has remote RTP SSRC? */ | ||
pj_uint32_t rem_ssrc; /**< Remote RTP SSRC. */ | ||
pj_str_t rem_cname; /**< Remote RTCP CNAME. */ | ||
pj_uint32_t rtp_ts; /**< Initial RTP timestamp. */ | ||
pj_uint16_t rtp_seq; /**< Initial RTP sequence number. */ | ||
pj_uint8_t rtp_seq_ts_set; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* $Id: transport.h 5478 2016-11-03 09:39:20Z riza $ */ | ||
/* $Id: transport.h 5750 2018-03-06 07:42:54Z nanang $ */ | ||
/* | ||
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) | ||
* Copyright (C) 2003-2008 Benny Prijono <[email protected]> | ||
|
@@ -682,16 +682,16 @@ PJ_INLINE(void*) pjmedia_transport_info_get_spc_info( | |
* @return PJ_SUCCESS on success, or the appropriate error code. | ||
*/ | ||
PJ_INLINE(pj_status_t) pjmedia_transport_attach2(pjmedia_transport *tp, | ||
pjmedia_transport_attach_param *att_param) | ||
pjmedia_transport_attach_param *att_param) | ||
{ | ||
if (tp->op->attach2) { | ||
return tp->op->attach2(tp, att_param); | ||
return (*tp->op->attach2)(tp, att_param); | ||
} else { | ||
return tp->op->attach(tp, att_param->user_data, | ||
(pj_sockaddr_t*)&att_param->rem_addr, | ||
(pj_sockaddr_t*)&att_param->rem_rtcp, | ||
att_param->addr_len, att_param->rtp_cb, | ||
att_param->rtcp_cb); | ||
return (*tp->op->attach)(tp, att_param->user_data, | ||
(pj_sockaddr_t*)&att_param->rem_addr, | ||
(pj_sockaddr_t*)&att_param->rem_rtcp, | ||
att_param->addr_len, att_param->rtp_cb, | ||
att_param->rtcp_cb); | ||
} | ||
} | ||
|
||
|
@@ -729,8 +729,22 @@ PJ_INLINE(pj_status_t) pjmedia_transport_attach(pjmedia_transport *tp, | |
void*pkt, | ||
pj_ssize_t)) | ||
{ | ||
return tp->op->attach(tp, user_data, rem_addr, rem_rtcp, addr_len, | ||
rtp_cb, rtcp_cb); | ||
if (tp->op->attach2) { | ||
pjmedia_transport_attach_param param; | ||
|
||
pj_bzero(¶m, sizeof(param)); | ||
param.user_data = user_data; | ||
pj_sockaddr_cp(¶m.rem_addr, rem_addr); | ||
pj_sockaddr_cp(¶m.rem_rtcp, rem_rtcp); | ||
param.addr_len = addr_len; | ||
param.rtp_cb = rtp_cb; | ||
param.rtcp_cb = rtcp_cb; | ||
|
||
return (*tp->op->attach2)(tp, ¶m); | ||
} else { | ||
return (*tp->op->attach)(tp, user_data, rem_addr, rem_rtcp, addr_len, | ||
rtp_cb, rtcp_cb); | ||
} | ||
} | ||
|
||
|
||
|
@@ -749,7 +763,7 @@ PJ_INLINE(pj_status_t) pjmedia_transport_attach(pjmedia_transport *tp, | |
PJ_INLINE(void) pjmedia_transport_detach(pjmedia_transport *tp, | ||
void *user_data) | ||
{ | ||
tp->op->detach(tp, user_data); | ||
(*tp->op->detach)(tp, user_data); | ||
} | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* $Id: pjsua_internal.h 5676 2017-10-24 07:31:39Z ming $ */ | ||
/* $Id: pjsua_internal.h 5748 2018-02-27 03:37:53Z ming $ */ | ||
/* | ||
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) | ||
* Copyright (C) 2003-2008 Benny Prijono <[email protected]> | ||
|
@@ -138,6 +138,8 @@ struct pjsua_call | |
pjsua_call_hold_type call_hold_type; /**< How to do call hold. */ | ||
pj_bool_t local_hold;/**< Flag for call-hold by local. */ | ||
void *hold_msg; /**< Outgoing hold tx_data. */ | ||
pj_str_t cname; /**< RTCP CNAME. */ | ||
char cname_buf[16];/**< cname buffer. */ | ||
|
||
unsigned med_cnt; /**< Number of media in SDP. */ | ||
pjsua_call_media media[PJSUA_MAX_CALL_MEDIA]; /**< Array of media */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* $Id: config.h 5725 2018-01-15 08:52:29Z ming $ */ | ||
/* $Id: config.h 5732 2018-01-24 03:42:35Z nanang $ */ | ||
/* | ||
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) | ||
* Copyright (C) 2003-2008 Benny Prijono <[email protected]> | ||
|
@@ -938,10 +938,15 @@ | |
* which uses GnuTLS. Setting this to PJ_SSL_SOCK_IMP_NONE will disable | ||
* secure socket. | ||
* | ||
* Default is PJ_SSL_SOCK_IMP_NONE | ||
* Default is PJ_SSL_SOCK_IMP_NONE if PJ_HAS_SSL_SOCK is not set, otherwise | ||
* it is PJ_SSL_SOCK_IMP_OPENSSL. | ||
*/ | ||
#ifndef PJ_SSL_SOCK_IMP | ||
# define PJ_SSL_SOCK_IMP PJ_SSL_SOCK_IMP_NONE | ||
# if PJ_HAS_SSL_SOCK==0 | ||
# define PJ_SSL_SOCK_IMP PJ_SSL_SOCK_IMP_NONE | ||
# else | ||
# define PJ_SSL_SOCK_IMP PJ_SSL_SOCK_IMP_OPENSSL | ||
# endif | ||
#endif | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* $Id: errno.h 5597 2017-06-03 09:22:34Z nanang $ */ | ||
/* $Id: errno.h 5748 2018-02-27 03:37:53Z ming $ */ | ||
/* | ||
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) | ||
* Copyright (C) 2003-2008 Benny Prijono <[email protected]> | ||
|
@@ -176,6 +176,11 @@ PJ_BEGIN_DECL | |
* Invalid SDP bandwidth info (b=) line. | ||
*/ | ||
#define PJMEDIA_SDP_EINBANDW (PJMEDIA_ERRNO_START+37) /* 220037 */ | ||
/** | ||
* @hideinitializer | ||
* Invalid SDP "ssrc" attribute. | ||
*/ | ||
#define PJMEDIA_SDP_EINSSRC (PJMEDIA_ERRNO_START+38) /* 220038 */ | ||
|
||
|
||
/************************************************************ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* $Id: jbuf.h 3841 2011-10-24 09:28:13Z ming $ */ | ||
/* $Id: jbuf.h 5734 2018-02-12 06:18:22Z ming $ */ | ||
/* | ||
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) | ||
* Copyright (C) 2003-2008 Benny Prijono <[email protected]> | ||
|
@@ -167,6 +167,18 @@ PJ_DECL(pj_status_t) pjmedia_jbuf_create(pj_pool_t *pool, | |
unsigned max_count, | ||
pjmedia_jbuf **p_jb); | ||
|
||
/** | ||
* Set the jitter buffer's frame duration. | ||
* | ||
* @param jb The jitter buffer | ||
* @param ptime Frame duration. | ||
* | ||
* @return PJ_SUCCESS on success. | ||
*/ | ||
PJ_DECL(pj_status_t) pjmedia_jbuf_set_ptime( pjmedia_jbuf *jb, | ||
unsigned ptime); | ||
|
||
|
||
/** | ||
* Set the jitter buffer to fixed delay mode. The default behavior | ||
* is to adapt the delay with actual packet delay. | ||
|
Oops, something went wrong.