linux视频之media媒体框架

Posted 小谢的编程成长记

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了linux视频之media媒体框架相关的知识,希望对你有一定的参考价值。

  linux视频媒体(kernel层分析)主要包括三个文件:

  (/drivers/media/media-device.c ,  /drivers/media/media-devnode.c , /drivers/media/media-entity.c)

一.主要分析/drivers/media/media-device.c文件,此文件中主要的结构是:

  

struct media_device {
    struct device *dev; //dev->driver_data points to this struct
    struct media_devnode devnode;
    char model[32];
    char driver_name[32];
    char serial[40];
    char bus_info[32];
    u32 hw_revision;
    u32 driver_version;
    u32 topology_version;
    u32 id;
    struct ida entity_internal_idx;
    int entity_internal_idx_max;
    struct list_head entities;
    struct list_head interfaces;
    struct list_head pads;
    struct list_head links;
    struct list_head entity_notify; //notify callback list invoked when a new entity is registered
    spinlock_t lock; //Protects the graph objects creation/removal 
    struct mutex graph_mutex; //Serializes graph operations.
    struct media_entity_graph pm_count_walk;
    void *source_priv;
    int (*enable_source)(struct media_entity *entity, struct media_pipeline *pipe);
    void (*disable_source)(struct media_entity *entity);
    int (*link_notify)(struct media_link *link, u32 flags,
               unsigned int notification);
};

 

以上是关于linux视频之media媒体框架的主要内容,如果未能解决你的问题,请参考以下文章

OpenHarmony 3.2 Beta多媒体系列——音视频播放框架

Android官方Media Playback中文教程

Android官方Media Playback中文教程

HTML5无插件多媒体Media——音频audio与视频video

HTML5无插件多媒体Media——音频audio与视频video

Java单体应用 - 常用框架 - 01.Bootstrap - 媒体查询