include/media/media-entity.h
Source file repositories/reference/linux-study-clean/include/media/media-entity.h
File Facts
- System
- Linux kernel
- Corpus path
include/media/media-entity.h- Extension
.h- Size
- 48177 bytes
- Lines
- 1449
- Domain
- Repository Root And Misc
- Bucket
- include
- Inferred role
- Repository Root And Misc: implementation source
- Status
- source implementation candidate
Why This File Exists
Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/bitmap.hlinux/bug.hlinux/container_of.hlinux/fwnode.hlinux/list.hlinux/media.hlinux/minmax.hlinux/types.h
Detected Declarations
struct media_gobjstruct media_entity_enumstruct media_graphstruct media_pipelinestruct media_pipeline_padstruct media_pipeline_pad_iterstruct media_pipeline_entity_iterstruct media_linkstruct media_padstruct media_entity_operationsstruct media_entitystruct media_interfacestruct media_intf_devnodeenum media_gobj_typeenum media_pad_signal_typeenum media_entity_typefunction media_entity_idfunction media_typefunction media_idfunction media_gobj_gen_idfunction is_media_entity_v4l2_video_devicefunction is_media_entity_v4l2_subdevfunction media_entity_enum_zerofunction media_entity_enum_setfunction media_entity_enum_clearfunction media_entity_enum_testfunction media_entity_enum_test_and_setfunction media_entity_enum_emptyfunction media_entity_enum_intersectsfunction media_entity_cleanupfunction media_entity_remote_source_pad_uniquefunction media_pipeline_startfunction media_pipeline_startfunction media_entity_for_each_pad
Annotated Snippet
struct media_gobj {
struct media_device *mdev;
u32 id;
struct list_head list;
};
#define MEDIA_ENTITY_ENUM_MAX_DEPTH 16
/**
* struct media_entity_enum - An enumeration of media entities.
*
* @bmap: Bit map in which each bit represents one entity at struct
* media_entity->internal_idx.
* @idx_max: Number of bits in bmap
*/
struct media_entity_enum {
unsigned long *bmap;
int idx_max;
};
/**
* struct media_graph - Media graph traversal state
*
* @stack: Graph traversal stack; the stack contains information
* on the path the media entities to be walked and the
* links through which they were reached.
* @stack.entity: pointer to &struct media_entity at the graph.
* @stack.link: pointer to &struct list_head.
* @ent_enum: Visited entities
* @top: The top of the stack
*/
struct media_graph {
struct {
struct media_entity *entity;
struct list_head *link;
} stack[MEDIA_ENTITY_ENUM_MAX_DEPTH];
struct media_entity_enum ent_enum;
int top;
};
/**
* struct media_pipeline - Media pipeline related information
*
* @allocated: Media pipeline allocated and freed by the framework
* @mdev: The media device the pipeline is part of
* @pads: List of media_pipeline_pad
* @start_count: Media pipeline start - stop count
*/
struct media_pipeline {
bool allocated;
struct media_device *mdev;
struct list_head pads;
int start_count;
};
/**
* struct media_pipeline_pad - A pad part of a media pipeline
*
* @list: Entry in the media_pad pads list
* @pipe: The media_pipeline that the pad is part of
* @pad: The media pad
*
* This structure associate a pad with a media pipeline. Instances of
* media_pipeline_pad are created by media_pipeline_start() when it builds the
* pipeline, and stored in the &media_pad.pads list. media_pipeline_stop()
* removes the entries from the list and deletes them.
*/
struct media_pipeline_pad {
struct list_head list;
struct media_pipeline *pipe;
struct media_pad *pad;
};
/**
* struct media_pipeline_pad_iter - Iterator for media_pipeline_for_each_pad
*
* @cursor: The current element
*/
struct media_pipeline_pad_iter {
struct list_head *cursor;
};
/**
* struct media_pipeline_entity_iter - Iterator for media_pipeline_for_each_entity
*
* @ent_enum: The entity enumeration tracker
* @cursor: The current element
*/
struct media_pipeline_entity_iter {
Annotation
- Immediate include surface: `linux/bitmap.h`, `linux/bug.h`, `linux/container_of.h`, `linux/fwnode.h`, `linux/list.h`, `linux/media.h`, `linux/minmax.h`, `linux/types.h`.
- Detected declarations: `struct media_gobj`, `struct media_entity_enum`, `struct media_graph`, `struct media_pipeline`, `struct media_pipeline_pad`, `struct media_pipeline_pad_iter`, `struct media_pipeline_entity_iter`, `struct media_link`, `struct media_pad`, `struct media_entity_operations`.
- Atlas domain: Repository Root And Misc / include.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.