summaryrefslogtreecommitdiff
path: root/pjmedia/include
diff options
context:
space:
mode:
authorNanang Izzuddin <nanang@teluu.com>2008-06-05 10:50:40 +0000
committerNanang Izzuddin <nanang@teluu.com>2008-06-05 10:50:40 +0000
commit5f1ff63b18fbf86eaa27798a35ae8979e3a01b11 (patch)
treed7ec5fdb38e021ed5c3d2239db3f49d421fc64c8 /pjmedia/include
parent5c55c6ae827ee835906e48e1657f64fa0a84f309 (diff)
Ticket #473:
- fixed issue on Speex multiple frames (encoding: encoded bits concatenation & decoding: frames parsing) - updated pjmedia stream & codecs on encoding multiple frames - introduced bit_info in pjmedia_frame and jitter buffer git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1983 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/include')
-rw-r--r--pjmedia/include/pjmedia/codec.h2
-rw-r--r--pjmedia/include/pjmedia/jbuf.h10
-rw-r--r--pjmedia/include/pjmedia/port.h13
3 files changed, 19 insertions, 6 deletions
diff --git a/pjmedia/include/pjmedia/codec.h b/pjmedia/include/pjmedia/codec.h
index e64f8f08..1a7e0bc0 100644
--- a/pjmedia/include/pjmedia/codec.h
+++ b/pjmedia/include/pjmedia/codec.h
@@ -375,7 +375,7 @@ typedef struct pjmedia_codec_op
/**
* Instruct the codec to encode the specified input frame. The input
- * PCM samples MUST have ptime that is exactly equal to base frame
+ * PCM samples MUST have ptime that is multiplication of base frame
* ptime (i.e. the value of info.frm_ptime in #pjmedia_codec_param).
*
* @param codec The codec instance.
diff --git a/pjmedia/include/pjmedia/jbuf.h b/pjmedia/include/pjmedia/jbuf.h
index 229f3f05..bef94490 100644
--- a/pjmedia/include/pjmedia/jbuf.h
+++ b/pjmedia/include/pjmedia/jbuf.h
@@ -219,12 +219,16 @@ PJ_DECL(void) pjmedia_jbuf_put_frame( pjmedia_jbuf *jb,
* @param frame Pointer to frame buffer to be stored in the jitter
* buffer.
* @param size The frame size.
+ * @param bit_info Bit precise info of the frame, e.g: a frame may not
+ * exactly start and end at the octet boundary, so this
+ * field may be used for specifying start & end bit offset.
* @param frame_seq The frame sequence number.
* @param discarded Flag whether the frame is discarded by jitter buffer.
*/
PJ_DECL(void) pjmedia_jbuf_put_frame2( pjmedia_jbuf *jb,
const void *frame,
pj_size_t size,
+ pj_uint32_t bit_info,
int frame_seq,
pj_bool_t *discarded);
@@ -267,11 +271,15 @@ PJ_DECL(void) pjmedia_jbuf_get_frame( pjmedia_jbuf *jb,
* @param size Pointer to receive frame size.
* @param p_frm_type Pointer to receive frame type.
* @see pjmedia_jbuf_get_frame().
+ * @param bit_info Bit precise info of the frame, e.g: a frame may not
+ * exactly start and end at the octet boundary, so this
+ * field may be used for specifying start & end bit offset.
*/
PJ_DECL(void) pjmedia_jbuf_get_frame2(pjmedia_jbuf *jb,
void *frame,
pj_size_t *size,
- char *p_frm_type);
+ char *p_frm_type,
+ pj_uint32_t *bit_info);
/**
diff --git a/pjmedia/include/pjmedia/port.h b/pjmedia/include/pjmedia/port.h
index 58b6e0f7..3edea1dc 100644
--- a/pjmedia/include/pjmedia/port.h
+++ b/pjmedia/include/pjmedia/port.h
@@ -298,10 +298,15 @@ typedef enum pjmedia_frame_type
*/
struct pjmedia_frame
{
- pjmedia_frame_type type; /**< Frame type. */
- void *buf; /**< Pointer to buffer. */
- pj_size_t size; /**< Frame size in bytes. */
- pj_timestamp timestamp; /**< Frame timestamp. */
+ pjmedia_frame_type type; /**< Frame type. */
+ void *buf; /**< Pointer to buffer. */
+ pj_size_t size; /**< Frame size in bytes. */
+ pj_timestamp timestamp; /**< Frame timestamp. */
+ pj_uint32_t bit_info; /**< Bit info of the frame, sample case:
+ a frame may not exactly start and end
+ at the octet boundary, so this field
+ may be used for specifying start &
+ end bit offset. */
};