Changeset 3664 for pjproject/trunk/pjmedia/include/pjmedia/jbuf.h
- Timestamp:
- Jul 19, 2011 3:42:28 AM (13 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk
- Property svn:mergeinfo changed
-
pjproject/trunk/pjmedia/include/pjmedia/jbuf.h
r3553 r3664 69 69 * This structure describes jitter buffer state. 70 70 */ 71 struct pjmedia_jb_state71 typedef struct pjmedia_jb_state 72 72 { 73 73 /* Setting */ … … 90 90 unsigned discard; /**< Number of discarded frames. */ 91 91 unsigned empty; /**< Number of empty on GET events. */ 92 }; 93 94 95 /** 96 * @see pjmedia_jb_state 97 */ 98 typedef struct pjmedia_jb_state pjmedia_jb_state; 92 } pjmedia_jb_state; 99 93 100 94 … … 181 175 182 176 /** 177 * Enable/disable the jitter buffer drift detection and handling mechanism. 178 * The default behavior is enabled. 179 * 180 * @param jb The jitter buffer 181 * @param enable Set to PJ_TRUE to enable or PJ_FALSE to disable. 182 * 183 * @return PJ_SUCCESS on success. 184 */ 185 PJ_DECL(pj_status_t) pjmedia_jbuf_enable_discard(pjmedia_jbuf *jb, 186 pj_bool_t enable); 187 188 189 /** 183 190 * Destroy jitter buffer instance. 184 191 * … … 244 251 pj_bool_t *discarded); 245 252 253 /** 254 * Put a frame to the jitter buffer. If the frame can be accepted (based 255 * on the sequence number), the jitter buffer will copy the frame and put 256 * it in the appropriate position in the buffer. 257 * 258 * Application MUST manage it's own synchronization when multiple threads 259 * are accessing the jitter buffer at the same time. 260 * 261 * @param jb The jitter buffer. 262 * @param frame Pointer to frame buffer to be stored in the jitter 263 * buffer. 264 * @param size The frame size. 265 * @param bit_info Bit precise info of the frame, e.g: a frame may not 266 * exactly start and end at the octet boundary, so this 267 * field may be used for specifying start & end bit offset. 268 * @param frame_seq The frame sequence number. 269 * @param frame_ts The frame timestamp. 270 * @param discarded Flag whether the frame is discarded by jitter buffer. 271 */ 272 PJ_DECL(void) pjmedia_jbuf_put_frame3( pjmedia_jbuf *jb, 273 const void *frame, 274 pj_size_t size, 275 pj_uint32_t bit_info, 276 int frame_seq, 277 pj_uint32_t frame_ts, 278 pj_bool_t *discarded); 246 279 /** 247 280 * Get a frame from the jitter buffer. The jitter buffer will return the … … 295 328 296 329 /** 330 * Get a frame from the jitter buffer. The jitter buffer will return the 331 * oldest frame from it's buffer, when it is available. 332 * 333 * @param jb The jitter buffer. 334 * @param frame Buffer to receive the payload from the jitter buffer. 335 * @see pjmedia_jbuf_get_frame(). 336 * @param size Pointer to receive frame size. 337 * @param p_frm_type Pointer to receive frame type. 338 * @see pjmedia_jbuf_get_frame(). 339 * @param bit_info Bit precise info of the frame, e.g: a frame may not 340 * exactly start and end at the octet boundary, so this 341 * field may be used for specifying start & end bit offset. 342 * @param ts Frame timestamp. 343 * @param seq Frame sequence number. 344 */ 345 PJ_DECL(void) pjmedia_jbuf_get_frame3(pjmedia_jbuf *jb, 346 void *frame, 347 pj_size_t *size, 348 char *p_frm_type, 349 pj_uint32_t *bit_info, 350 pj_uint32_t *ts, 351 int *seq); 352 353 354 /** 355 * Peek a frame from the jitter buffer. The jitter buffer state will not be 356 * modified. 357 * 358 * @param jb The jitter buffer. 359 * @param offset Offset from the oldest frame to be peeked. 360 * @param frame Buffer to receive the payload from the jitter buffer. 361 * @see pjmedia_jbuf_get_frame(). 362 * @param size Pointer to receive frame size. 363 * @param p_frm_type Pointer to receive frame type. 364 * @see pjmedia_jbuf_get_frame(). 365 * @param bit_info Bit precise info of the frame, e.g: a frame may not 366 * exactly start and end at the octet boundary, so this 367 * field may be used for specifying start & end bit offset. 368 * @param ts Frame timestamp. 369 * @param seq Frame sequence number. 370 */ 371 PJ_DECL(void) pjmedia_jbuf_peek_frame(pjmedia_jbuf *jb, 372 unsigned offset, 373 const void **frame, 374 pj_size_t *size, 375 char *p_frm_type, 376 pj_uint32_t *bit_info, 377 pj_uint32_t *ts, 378 int *seq); 379 380 381 /** 382 * Remove frames from the jitter buffer. 383 * 384 * @param jb The jitter buffer. 385 * @param frame_cnt Number of frames to be removed. 386 * 387 * @return The number of frame successfully removed. 388 */ 389 PJ_DECL(unsigned) pjmedia_jbuf_remove_frame(pjmedia_jbuf *jb, 390 unsigned frame_cnt); 391 392 393 /** 297 394 * Get jitter buffer current state/settings. 298 395 *
Note: See TracChangeset
for help on using the changeset viewer.