博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
FFmpeg数据结构彻底分析——AVClass
阅读量:7107 次
发布时间:2019-06-28

本文共 2435 字,大约阅读时间需要 8 分钟。

hot3.png

/**

 * Describe the class of an AVClass context structure. That is an //描述任意一个第一个指针指向AVClass的上下文结构体
 * 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); // 指向返回ctx指向的context实例的函数的指针

    /**

     * a pointer to the first option specified in the class if any or NULL
     *
     * @see av_set_default_options()
     */
    const struct AVOption *option; //指向在类中指向的第一个选项,没有则为NULL

    /**

     * 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;   //这个结构体是用那个版本的LIBAVUTIL_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;

转载于:https://my.oschina.net/u/1024767/blog/356840

你可能感兴趣的文章
系统中纹波大
查看>>
GPS经纬度转换为百度坐标
查看>>
3班6组第一次迭代博客
查看>>
J2EE (三) Filter详解
查看>>
Oracle 常用函数(Decode,sign,lpad)
查看>>
【算法设计与数据结构】为何程序员喜欢将INF设置为0x3f3f3f3f?
查看>>
单例模式(think in java中的设计模式)
查看>>
什么是驱动?
查看>>
AOP
查看>>
Github的建立及心得体会
查看>>
1. Docker基础命令
查看>>
46. 47. Permutations and Permutations II 都适用(Java,字典序 + 非字典序排列)
查看>>
listen函数
查看>>
c语言编程之二叉树
查看>>
Git-实战篇-创建本地仓库和关联远程仓库-命令行
查看>>
Ubuntu启动时直接进入命令行模式
查看>>
JavaScript中基本数据类型和引用数据类型的区别
查看>>
Juery实现选项卡
查看>>
PHP汉字转换拼音
查看>>
(转)阿里云出现身份验证错误,要求的函数不受支持的解决办法
查看>>