diff options
Diffstat (limited to 'include/media/media-entity.h')
-rw-r--r-- | include/media/media-entity.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/media/media-entity.h b/include/media/media-entity.h index f6c856c9ac16..28f61f6ee549 100644 --- a/include/media/media-entity.h +++ b/include/media/media-entity.h | |||
@@ -113,10 +113,25 @@ static inline u32 media_entity_subtype(struct media_entity *entity) | |||
113 | return entity->type & MEDIA_ENT_SUBTYPE_MASK; | 113 | return entity->type & MEDIA_ENT_SUBTYPE_MASK; |
114 | } | 114 | } |
115 | 115 | ||
116 | #define MEDIA_ENTITY_ENUM_MAX_DEPTH 16 | ||
117 | |||
118 | struct media_entity_graph { | ||
119 | struct { | ||
120 | struct media_entity *entity; | ||
121 | int link; | ||
122 | } stack[MEDIA_ENTITY_ENUM_MAX_DEPTH]; | ||
123 | int top; | ||
124 | }; | ||
125 | |||
116 | int media_entity_init(struct media_entity *entity, u16 num_pads, | 126 | int media_entity_init(struct media_entity *entity, u16 num_pads, |
117 | struct media_pad *pads, u16 extra_links); | 127 | struct media_pad *pads, u16 extra_links); |
118 | void media_entity_cleanup(struct media_entity *entity); | 128 | void media_entity_cleanup(struct media_entity *entity); |
119 | int media_entity_create_link(struct media_entity *source, u16 source_pad, | 129 | int media_entity_create_link(struct media_entity *source, u16 source_pad, |
120 | struct media_entity *sink, u16 sink_pad, u32 flags); | 130 | struct media_entity *sink, u16 sink_pad, u32 flags); |
121 | 131 | ||
132 | void media_entity_graph_walk_start(struct media_entity_graph *graph, | ||
133 | struct media_entity *entity); | ||
134 | struct media_entity * | ||
135 | media_entity_graph_walk_next(struct media_entity_graph *graph); | ||
136 | |||
122 | #endif | 137 | #endif |