Ignore:
Timestamp:
Dec 7, 2011 10:43:28 AM (12 years ago)
Author:
nanang
Message:

Re #1234: Initial version of keyframe request/response via SIP INFO.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/include/pjmedia/vid_codec.h

    r3893 r3901  
    7676 
    7777} pjmedia_vid_packing; 
     78 
     79 
     80/** 
     81 * Enumeration of video frame info flag for the bit_info field in the 
     82 * pjmedia_frame. 
     83 */ 
     84typedef enum pjmedia_vid_frm_bit_info 
     85{ 
     86    /** 
     87     * The video frame is keyframe. 
     88     */ 
     89    PJMEDIA_VID_FRM_KEYFRAME    = 1 
     90 
     91} pjmedia_vid_frm_bit_info; 
     92 
     93 
     94/** 
     95 * Encoding option. 
     96 */ 
     97typedef struct pjmedia_vid_encode_opt 
     98{ 
     99    /** 
     100     * Flag to force the encoder to generate keyframe for the specified input 
     101     * frame. When this flag is set, application can verify the result by 
     102     * examining PJMEDIA_VID_FRM_KEYFRAME flag in the bit_info field of the 
     103     * output frame. 
     104     */ 
     105    pj_bool_t force_keyframe; 
     106 
     107} pjmedia_vid_encode_opt; 
     108 
    78109 
    79110/**  
     
    179210     * See #pjmedia_vid_codec_modify(). 
    180211     */ 
    181     pj_status_t (*modify)(pjmedia_vid_codec *codec,  
     212    pj_status_t (*modify)(pjmedia_vid_codec *codec, 
    182213                          const pjmedia_vid_codec_param *param); 
    183214 
     
    192223     */ 
    193224    pj_status_t (*encode_begin)(pjmedia_vid_codec *codec, 
     225                                const pjmedia_vid_encode_opt *opt, 
    194226                                const pjmedia_frame *input, 
    195227                                unsigned out_size, 
     
    364396 
    365397/** 
    366  * Initialize pjmedia_vid_codec structure with default values. 
    367  * 
    368  * @param codec     The codec to be initialized. 
    369  * @param sig       Codec's object signature (see signatures.h) 
    370  */ 
    371 PJ_DECL(void) pjmedia_vid_codec_reset(pjmedia_vid_codec *codec, 
    372                                       pjmedia_obj_sig sig); 
    373  
    374 /** 
    375398 * Initialize codec manager. If there is no the default video codec manager, 
    376399 * this function will automatically set the default video codec manager to 
     
    729752 * 
    730753 * @param codec         The codec instance. 
     754 * @param opt           Optional encoding options. 
    731755 * @param input         The input frame. 
    732756 * @param out_size      The length of buffer in the output frame. This 
     
    742766PJ_INLINE(pj_status_t) 
    743767pjmedia_vid_codec_encode_begin( pjmedia_vid_codec *codec, 
     768                                const pjmedia_vid_encode_opt *opt, 
    744769                                const pjmedia_frame *input, 
    745770                                unsigned out_size, 
     
    747772                                pj_bool_t *has_more) 
    748773{ 
    749     return (*codec->op->encode_begin)(codec, input, out_size, output, 
     774    return (*codec->op->encode_begin)(codec, opt, input, out_size, output, 
    750775                                      has_more); 
    751776} 
Note: See TracChangeset for help on using the changeset viewer.