summaryrefslogtreecommitdiff
path: root/pjmedia/include
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2006-04-24 23:13:00 +0000
committerBenny Prijono <bennylp@teluu.com>2006-04-24 23:13:00 +0000
commit30b72e6036e0dd2bbe85e5929dc4201357d258db (patch)
tree3c15f9ff17b095a7a33d9be98d102a90190dbbba /pjmedia/include
parent0659acc8c5810d565d6b0c39e8dbfa7862784ada (diff)
Better support for continuing media when peer has restarted transmission/RTP session
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@408 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/include')
-rw-r--r--pjmedia/include/pjmedia/jbuf.h24
-rw-r--r--pjmedia/include/pjmedia/rtcp.h4
-rw-r--r--pjmedia/include/pjmedia/rtp.h1
3 files changed, 24 insertions, 5 deletions
diff --git a/pjmedia/include/pjmedia/jbuf.h b/pjmedia/include/pjmedia/jbuf.h
index 9a0d5c6a..c289e337 100644
--- a/pjmedia/include/pjmedia/jbuf.h
+++ b/pjmedia/include/pjmedia/jbuf.h
@@ -63,6 +63,8 @@ enum pjmedia_jb_frame_type
* memory to keep the frames in the buffer.
*
* @param pool The pool to allocate memory.
+ * @param name Name to identify the jitter buffer for logging
+ * purpose.
* @param frame_size The size of each frame that will be kept in the
* jitter buffer. The value here normaly corresponds
* to the RTP payload size according to the codec
@@ -73,11 +75,12 @@ enum pjmedia_jb_frame_type
*
* @return PJ_SUCCESS on success.
*/
-PJ_DECL(pj_status_t) pjmedia_jbuf_create(pj_pool_t *pool,
- int frame_size,
- int init_delay,
- int max_count,
- pjmedia_jbuf **p_jb);
+PJ_DECL(pj_status_t) pjmedia_jbuf_create(pj_pool_t *pool,
+ const pj_str_t *name,
+ int frame_size,
+ int init_delay,
+ int max_count,
+ pjmedia_jbuf **p_jb);
/**
* Destroy jitter buffer instance.
@@ -90,6 +93,17 @@ PJ_DECL(pj_status_t) pjmedia_jbuf_destroy(pjmedia_jbuf *jb);
/**
+ * Restart jitter. This function flushes all packets in the buffer and
+ * reset the internal sequence number.
+ *
+ * @param jb The jitter buffer.
+ *
+ * @return PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_jbuf_reset(pjmedia_jbuf *jb);
+
+
+/**
* Put a frame to the jitter buffer. If the frame can be accepted (based
* on the sequence number), the jitter buffer will copy the frame and put
* it in the appropriate position in the buffer.
diff --git a/pjmedia/include/pjmedia/rtcp.h b/pjmedia/include/pjmedia/rtcp.h
index 46cf13f2..51efe2e8 100644
--- a/pjmedia/include/pjmedia/rtcp.h
+++ b/pjmedia/include/pjmedia/rtcp.h
@@ -221,6 +221,7 @@ typedef struct pjmedia_rtcp_stat pjmedia_rtcp_stat;
*/
struct pjmedia_rtcp_session
{
+ char *name; /**< Name identification. */
pjmedia_rtcp_pkt rtcp_pkt; /**< Cached RTCP packet. */
pjmedia_rtp_seq_session seq_ctrl; /**< RTCP sequence number control. */
@@ -253,11 +254,14 @@ typedef struct pjmedia_rtcp_session pjmedia_rtcp_session;
* Initialize RTCP session.
*
* @param session The session
+ * @param name Optional name to identify the session (for
+ * logging purpose).
* @param clock_rate Codec clock rate in samples per second.
* @param samples_per_frame Average number of samples per frame.
* @param ssrc The SSRC used in to identify the session.
*/
PJ_DECL(void) pjmedia_rtcp_init( pjmedia_rtcp_session *session,
+ char *name,
unsigned clock_rate,
unsigned samples_per_frame,
pj_uint32_t ssrc );
diff --git a/pjmedia/include/pjmedia/rtp.h b/pjmedia/include/pjmedia/rtp.h
index 87a73c81..29dad419 100644
--- a/pjmedia/include/pjmedia/rtp.h
+++ b/pjmedia/include/pjmedia/rtp.h
@@ -192,6 +192,7 @@ struct pjmedia_rtp_status
this packet. More information will be given
in other flags. */
int badpt:1; /**< Bad payload type. */
+ int badssrc:1; /**< Bad SSRC */
int dup:1; /**< Indicates duplicate packet */
int outorder:1; /**< Indicates out of order packet */
int probation:1;/**< Indicates that session is in probation