- Timestamp:
- Feb 24, 2011 7:47:55 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/2.0-dev/pjmedia/include/pjmedia/jbuf.h
r3065 r3420 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 … … 294 327 295 328 329 PJ_DECL(void) pjmedia_jbuf_get_frame3(pjmedia_jbuf *jb, 330 void *frame, 331 pj_size_t *size, 332 char *p_frm_type, 333 pj_uint32_t *bit_info, 334 pj_uint32_t *ts); 335 336 PJ_DECL(void) pjmedia_jbuf_peek_frame(pjmedia_jbuf *jb, 337 unsigned idx, 338 const void **frame, 339 pj_size_t *size, 340 char *p_frm_type, 341 pj_uint32_t *bit_info, 342 pj_uint32_t *ts); 343 344 PJ_DECL(unsigned) pjmedia_jbuf_remove_frame(pjmedia_jbuf *jb, 345 unsigned frame_cnt); 346 347 296 348 /** 297 349 * Get jitter buffer current state/settings.
Note: See TracChangeset
for help on using the changeset viewer.