Changeset 3841 for pjproject/trunk/pjmedia/include/pjmedia/jbuf.h
- Timestamp:
- Oct 24, 2011 9:28:13 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
r3835 r3841 49 49 * Types of frame returned by the jitter buffer. 50 50 */ 51 enum pjmedia_jb_frame_type51 typedef enum pjmedia_jb_frame_type 52 52 { 53 53 PJMEDIA_JB_MISSING_FRAME = 0, /**< No frame because it's missing */ … … 57 57 PJMEDIA_JB_ZERO_EMPTY_FRAME = 3 /**< Zero frame is being returned 58 58 because JB is empty. */ 59 }; 60 61 62 /** 63 * @see pjmedia_jb_frame_type. 64 */ 65 typedef enum pjmedia_jb_frame_type pjmedia_jb_frame_type; 59 } pjmedia_jb_frame_type; 60 61 62 /** 63 * Enumeration of jitter buffer discard algorithm. The jitter buffer 64 * continuously calculates the jitter level to get the optimum latency at 65 * any time and in order to adjust the latency, the jitter buffer may need 66 * to discard some frames. 67 */ 68 typedef enum pjmedia_jb_discard_algo 69 { 70 /** 71 * Jitter buffer should not discard any frame, except when the jitter 72 * buffer is full and a new frame arrives, one frame will be discarded 73 * to make space for the new frame. 74 */ 75 PJMEDIA_JB_DISCARD_NONE = 0, 76 77 /** 78 * Only discard one frame in at least 200ms when the latency is considered 79 * much higher than it should be. When the jitter buffer is full and a new 80 * frame arrives, one frame will be discarded to make space for the new 81 * frame. 82 */ 83 PJMEDIA_JB_DISCARD_STATIC, 84 85 /** 86 * The discard rate is dynamically calculated based on actual parameters 87 * such as jitter level and latency. When the jitter buffer is full and 88 * a new frame arrives, one frame will be discarded to make space for the 89 * new frame. 90 */ 91 PJMEDIA_JB_DISCARD_PROGRESSIVE 92 93 } pjmedia_jb_discard_algo; 66 94 67 95 … … 108 136 * Create an adaptive jitter buffer according to the specification. If 109 137 * application wants to have a fixed jitter buffer, it may call 110 * #pjmedia_jbuf_set_fixed() after the jitter buffer is created. 138 * #pjmedia_jbuf_set_fixed() after the jitter buffer is created. Also 139 * if application wants to alter the discard algorithm, which the default 140 * PJMEDIA_JB_DISCARD_PROGRESSIVE, it may call #pjmedia_jbuf_set_discard(). 111 141 * 112 142 * This function may allocate large chunk of memory to keep the frames in … … 175 205 176 206 /** 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);207 * Set the jitter buffer discard algorithm. The default discard algorithm, 208 * set in jitter buffer creation, is PJMEDIA_JB_DISCARD_PROGRESSIVE. 209 * 210 * @param jb The jitter buffer. 211 * @param algo The discard algorithm to be used. 212 * 213 * @return PJ_SUCCESS on success. 214 */ 215 PJ_DECL(pj_status_t) pjmedia_jbuf_set_discard(pjmedia_jbuf *jb, 216 pjmedia_jb_discard_algo algo); 187 217 188 218
Note: See TracChangeset
for help on using the changeset viewer.