diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2012-07-31 15:28:22 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2014-03-10 19:53:58 +0100 |
commit | 00b872075dc1232ceeadb2a732b6926c285ac7fb (patch) | |
tree | ab57fbfa58efa05aa3417283d2f28a7d56c21c68 /src/mediactl.c | |
parent | bc72e1332cfc81e166c83c90ad63b4b648f19867 (diff) |
Make the media_device structure private
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Diffstat (limited to 'src/mediactl.c')
-rw-r--r-- | src/mediactl.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/mediactl.c b/src/mediactl.c index 2b054e9..304e185 100644 --- a/src/mediactl.c +++ b/src/mediactl.c @@ -38,8 +38,13 @@ #include <linux/videodev2.h> #include "mediactl.h" +#include "mediactl-priv.h" #include "tools.h" +/* ----------------------------------------------------------------------------- + * Graph access + */ + struct media_pad *media_entity_remote_source(struct media_pad *pad) { unsigned int i; @@ -101,6 +106,26 @@ struct media_entity *media_get_entity_by_id(struct media_device *media, return NULL; } +unsigned int media_get_entities_count(struct media_device *media) +{ + return media->entities_count; +} + +struct media_entity *media_get_entities(struct media_device *media) +{ + return media->entities; +} + +const struct media_device_info *media_get_info(struct media_device *media) +{ + return &media->info; +} + +const char *media_get_devnode(struct media_device *media) +{ + return media->devnode; +} + /* ----------------------------------------------------------------------------- * Open/close */ @@ -222,6 +247,10 @@ int media_reset_links(struct media_device *media) return 0; } +/* ----------------------------------------------------------------------------- + * Entities, pads and links enumeration + */ + static struct media_link *media_entity_add_link(struct media_entity *entity) { if (entity->num_links >= entity->max_links) { |