Skip to content
Snippets Groups Projects
avcodec.h 29.9 KiB
Newer Older
  • Learn to ignore specific revisions
  •     // maybe define some simple structure which
        // might be passed to the user - but they can't
        // contain any codec specific parts and these
        // calls are usualy necessary only few times
    
        // set video commands
        AVC_SET_WIDTH = 0xACD000,
        AVC_SET_HEIGHT,
    
        // set video encoding commands
        AVC_SET_FRAME_RATE = 0xACD800,
        AVC_SET_QUALITY,
        AVC_SET_HURRY_UP,
    
        // set audio commands
        AVC_SET_SAMPLE_RATE = 0xACE000,
        AVC_SET_CHANNELS,
    
    } avc_cmd_t;
    
    /**
     * \param handle  allocated private structure by libavcodec
     *                for initialization pass NULL - will be returned pout
     *                user is supposed to know nothing about its structure
     * \param cmd     type of operation to be performed
     * \param pint    input parameter
     * \param pout    output parameter
     *
     * \returns  command status - eventually for query command it might return
     * integer resulting value
     */
    int avcodec(void* handle, avc_cmd_t cmd, void* pin, void* pout);
    
    
    /* memory */
    void *av_malloc(int size);
    void *av_mallocz(int size);
    void av_free(void *ptr);
    void __av_freep(void **ptr);
    #define av_freep(p) __av_freep((void **)(p))
    
    
    Fabrice Bellard's avatar
    Fabrice Bellard committed
    #endif /* AVCODEC_H */