• ffmpeg之AVClass


    结构体AVClass

    /**
     * Describe the class of an AVClass context structure. That is an
     * arbitrary struct of which the first field is a pointer to an
     * AVClass struct (e.g. AVCodecContext, AVFormatContext etc.).
     */
    typedef struct AVClass {
        /**
         * The name of the class; usually it is the same name as the
         * context structure type to which the AVClass is associated.
         */
        const char* class_name;
    
        /**
         * A pointer to a function which returns the name of a context
         * instance ctx associated with the class.
         */
        const char* (*item_name)(void* ctx);
    
        /**
         * a pointer to the first option specified in the class if any or NULL
         *
         * @see av_set_default_options()
         */
        const struct AVOption *option;
    
        /**
         * LIBAVUTIL_VERSION with which this structure was created.
         * This is used to allow fields to be added without requiring major
         * version bumps everywhere.
         */
    
        int version;
    
        /**
         * Offset in the structure where log_level_offset is stored.
         * 0 means there is no such variable
         */
        int log_level_offset_offset;
    
        /**
         * Offset in the structure where a pointer to the parent context for
         * logging is stored. For example a decoder could pass its AVCodecContext
         * to eval as such a parent context, which an av_log() implementation
         * could then leverage to display the parent context.
         * The offset can be NULL.
         */
        int parent_log_context_offset;
    
        /**
         * Return next AVOptions-enabled child or NULL
         */
        void* (*child_next)(void *obj, void *prev);
    
        /**
         * Return an AVClass corresponding to the next potential
         * AVOptions-enabled child.
         *
         * The difference between child_next and this is that
         * child_next iterates over _already existing_ objects, while
         * child_class_next iterates over _all possible_ children.
         */
        const struct AVClass* (*child_class_next)(const struct AVClass *prev);
    
        /**
         * Category used for visualization (like color)
         * This is only set if the category is equal for all objects using this class.
         * available since version (51 << 16 | 56 << 8 | 100)
         */
        AVClassCategory category;
    
        /**
         * Callback to return the category.
         * available since version (51 << 16 | 59 << 8 | 100)
         */
        AVClassCategory (*get_category)(void* ctx);
    
        /**
         * Callback to return the supported/allowed ranges.
         * available since version (52.12)
         */
        int (*query_ranges)(struct AVOptionRanges **, void *obj, const char *key, int flags);
    } AVClass;
    

    AVOption

  • 相关阅读:
    servlet(二)
    servlet(一)
    static、final、static final的区别
    java基础知识(一)
    IntelliJ IDEA中Debug的使用技巧
    IDEA从SVN中导入多模块项目
    Java实现MD5加密
    冒泡排序
    ulimit: core file size: cannot modify limit: Operation not permitted
    Linux 禁用摄像头
  • 原文地址:https://www.cnblogs.com/faithlocus/p/15679436.html
Copyright © 2020-2023  润新知