diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2014-05-20 16:54:27 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2014-06-04 12:35:15 +0200 |
commit | dcc1f2aebb01437a2b43125ca986c7ffc5e702e7 (patch) | |
tree | 6cdc0bc3cf2837ab029d7226ce598c79b7656925 /src/v4l2subdev.h | |
parent | fe322d677d869b176efdd75e135783730743c0ba (diff) |
Add field support for the media bus formatfield
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/v4l2subdev.h')
-rw-r--r-- | src/v4l2subdev.h | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/v4l2subdev.h b/src/v4l2subdev.h index 5d55482..4589739 100644 --- a/src/v4l2subdev.h +++ b/src/v4l2subdev.h @@ -194,7 +194,7 @@ const char *v4l2_subdev_pixelcode_to_string(enum v4l2_mbus_pixelcode code); /** * @brief Parse string to media bus pixel code. * @param string - input string - * @param lenght - length of the string + * @param length - length of the string * * Parse human readable string @a string to an media bus pixel code. * @@ -202,4 +202,27 @@ const char *v4l2_subdev_pixelcode_to_string(enum v4l2_mbus_pixelcode code); */ enum v4l2_mbus_pixelcode v4l2_subdev_string_to_pixelcode(const char *string, unsigned int length); + +/** + * @brief Convert a field order to string. + * @param field - field order + * + * Convert field order @a field to a human-readable string. + * + * @return A pointer to a string on success, NULL on failure. + */ +const char *v4l2_subdev_field_to_string(enum v4l2_field field); + +/** + * @brief Parse string to field order. + * @param string - input string + * @param length - length of the string + * + * Parse human readable string @a string to field order. + * + * @return field order on success, -1 on failure. + */ +enum v4l2_field v4l2_subdev_string_to_field(const char *string, + unsigned int length); + #endif |