summaryrefslogtreecommitdiff
path: root/src/mediactl.h
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2012-07-31 15:31:55 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2014-03-10 19:54:00 +0100
commit5d751cc0b289282d354f7701a1ff896cc0778be8 (patch)
tree033304b850732d20b6b2a62ec01bdaa7ca17ce72 /src/mediactl.h
parent69ded6a53907c667b01a2b1dcafc24715c9b5bff (diff)
Expose default devices
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Diffstat (limited to 'src/mediactl.h')
-rw-r--r--src/mediactl.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/mediactl.h b/src/mediactl.h
index e2c93b8..b74be0b 100644
--- a/src/mediactl.h
+++ b/src/mediactl.h
@@ -244,6 +244,25 @@ unsigned int media_get_entities_count(struct media_device *media);
struct media_entity *media_get_entity(struct media_device *media, unsigned int index);
/**
+ * @brief Get the default entity for a given type
+ * @param media - media device.
+ * @param type - entity type.
+ *
+ * This function returns the default entity of the requested type. @a type must
+ * be one of
+ *
+ * MEDIA_ENT_T_DEVNODE_V4L
+ * MEDIA_ENT_T_DEVNODE_FB
+ * MEDIA_ENT_T_DEVNODE_ALSA
+ * MEDIA_ENT_T_DEVNODE_DVB
+ *
+ * @return A pointer to the default entity for the type if it exists, or NULL
+ * otherwise.
+ */
+struct media_entity *media_get_default_entity(struct media_device *media,
+ unsigned int type);
+
+/**
* @brief Get the media device information
* @param media - media device.
*