Ignore:
Timestamp:
Feb 24, 2011 7:47:55 AM (13 years ago)
Author:
nanang
Message:

Re #1182:

  • Added video stream interface in vid_stream.h, the video stream will be able to handle different video formats in encoding and decoding direction.
  • Renamed video device stream class identifiers from 'pjmedia_vid_stream*' to 'pjmedia_vid_dev_stream*' as 'pjmedia_vid_stream' is used by video stream interface.
  • Added ffmpeg video capability to be able to parse SDP format param for H263 and also decide video format for encoding direction based on remote preference and local format-capability setting.
  • Added some new APIs in jitter buffer for handling video stream: pjmedia_jbuf_put_frame3(), pjmedia_jbuf_get_frame3(), pjmedia_jbuf_peek_frame(), and pjmedia_jbuf_remove_frame().
  • Moved pjmedia_stream_info_from_sdp() from session to stream
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/2.0-dev/pjmedia/include/pjmedia/jbuf.h

    r3065 r3420  
    6969 * This structure describes jitter buffer state. 
    7070 */ 
    71 struct pjmedia_jb_state 
     71typedef struct pjmedia_jb_state 
    7272{ 
    7373    /* Setting */ 
     
    9090    unsigned    discard;            /**< Number of discarded frames.        */ 
    9191    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; 
    9993 
    10094 
     
    181175 
    182176/** 
     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 */ 
     185PJ_DECL(pj_status_t) pjmedia_jbuf_enable_discard(pjmedia_jbuf *jb, 
     186                                                 pj_bool_t enable); 
     187 
     188 
     189/** 
    183190 * Destroy jitter buffer instance. 
    184191 * 
     
    244251                                       pj_bool_t *discarded); 
    245252 
     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 */ 
     272PJ_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); 
    246279/** 
    247280 * Get a frame from the jitter buffer. The jitter buffer will return the 
     
    294327 
    295328 
     329PJ_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 
     336PJ_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 
     344PJ_DECL(unsigned) pjmedia_jbuf_remove_frame(pjmedia_jbuf *jb,  
     345                                            unsigned frame_cnt); 
     346 
     347 
    296348/** 
    297349 * Get jitter buffer current state/settings. 
Note: See TracChangeset for help on using the changeset viewer.