Ignore:
Timestamp:
Jul 12, 2011 9:08:56 AM (13 years ago)
Author:
bennylp
Message:

More on re #1284:

  • Replaced bit_info mechanism to report format change in codec with event
  • Updated vid_port, vid_codec_test, etc.
  • Add event publisher to vid_codec
  • Add event publisher to pjmedia_port
  • Add event publisher to vid_stream
File:
1 edited

Legend:

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

    r3613 r3622  
    2828 
    2929#include <pjmedia/codec.h> 
     30#include <pjmedia/event.h> 
    3031#include <pjmedia/format.h> 
    3132#include <pjmedia/types.h> 
     
    99100 
    100101/** 
    101  * Enumeration of video codec events. 
    102  */ 
    103 typedef enum pjmedia_vid_codec_event 
    104 { 
    105     /** 
    106      * Format changed event. The decoder output format is not really 
    107      * configurable, so that the output format setting configured in the 
    108      * initialization may be changed. Application can catch this event 
    109      * by checking the bit_info field of the pjmedia_frame of the decoder 
    110      * output frame. 
    111      */ 
    112     PJMEDIA_VID_CODEC_EVENT_FMT_CHANGED = 1, 
    113  
    114 } pjmedia_vid_codec_event; 
    115  
    116  
    117 /** 
    118102 * Forward declaration for video codec. 
    119103 */ 
     
    269253     * format may different to the current setting, e.g: the format specified 
    270254     * in the #pjmedia_vid_codec_param when opening the codec, in this case the 
    271      * PJMEDIA_VID_CODEC_EVENT_FMT_CHANGED flag will be set in the bit_info 
    272      * field of the output frame and application can query the new format 
     255     * PJMEDIA_EVENT_FMT_CHANGED event will be emitted by the codec. The codec 
     256     * parameter will also be updated, and application can query the format by 
    273257     * using #get_param(). 
    274258     * 
     
    310294 
    311295/** 
    312  * This structure describes a video codec instance.  
     296 * This structure describes a video codec instance. Codec implementers 
     297 * should use #pjmedia_vid_codec_init() to initialize this structure with 
     298 * default values. 
    313299 */ 
    314300struct pjmedia_vid_codec 
     
    325311    /** Operations to codec. */ 
    326312    pjmedia_vid_codec_op        *op; 
     313 
     314    /** Event publisher object */ 
     315    pjmedia_event_publisher      epub; 
    327316}; 
    328317 
     
    438427 
    439428 
     429/** 
     430 * Initialize pjmedia_vid_codec structure with default values. 
     431 * 
     432 * @param codec     The codec to be initialized. 
     433 */ 
     434PJ_DECL(void) pjmedia_vid_codec_init(pjmedia_vid_codec *codec); 
    440435 
    441436/** 
Note: See TracChangeset for help on using the changeset viewer.