From 5d751cc0b289282d354f7701a1ff896cc0778be8 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Tue, 31 Jul 2012 15:31:55 +0200 Subject: Expose default devices Signed-off-by: Laurent Pinchart Acked-by: Sakari Ailus Acked-by: Hans Verkuil --- src/mediactl.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/mediactl.h') diff --git a/src/mediactl.h b/src/mediactl.h index e2c93b8..b74be0b 100644 --- a/src/mediactl.h +++ b/src/mediactl.h @@ -243,6 +243,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. -- cgit v1.2.3