[vlc-commits] lib: media: Add thumbnail function documentation
Hugo Beauzée-Luyssen
git at videolan.org
Mon Jun 22 15:24:09 CEST 2020
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Mon Mar 9 14:52:32 2020 +0100| [ee857aaf4b1ddc8a83096fa5832c636e844453d7] | committer: Hugo Beauzée-Luyssen
lib: media: Add thumbnail function documentation
Regarding the resulting thumbnail size
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ee857aaf4b1ddc8a83096fa5832c636e844453d7
---
include/vlc/libvlc_media.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/include/vlc/libvlc_media.h b/include/vlc/libvlc_media.h
index d7ae42bb05..31e7c0d92f 100644
--- a/include/vlc/libvlc_media.h
+++ b/include/vlc/libvlc_media.h
@@ -746,12 +746,18 @@ typedef enum libvlc_thumbnailer_seek_speed_t
*
* If the request is successfuly queued, the libvlc_MediaThumbnailGenerated
* is guaranteed to be emited.
+ * The resulting thumbnail size can either be:
+ * - Hardcoded by providing both width & height. In which case, the image will
+ * be stretched to match the provided aspect ratio, or cropped if crop is true.
+ * - Derived from the media aspect ratio if only width or height is provided and
+ * the other one is set to 0.
*
* \param md media descriptor object
* \param time The time at which the thumbnail should be generated
* \param speed The seeking speed \sa{libvlc_thumbnailer_seek_speed_t}
* \param width The thumbnail width
* \param height the thumbnail height
+ * \param crop Should the picture be cropped to preserve source aspect ratio
* \param picture_type The thumbnail picture type \sa{libvlc_picture_type_t}
* \param timeout A timeout value in ms, or 0 to disable timeout
*
@@ -777,12 +783,18 @@ libvlc_media_thumbnail_request_by_time( libvlc_media_t *md,
*
* If the request is successfuly queued, the libvlc_MediaThumbnailGenerated
* is guaranteed to be emited.
+ * The resulting thumbnail size can either be:
+ * - Hardcoded by providing both width & height. In which case, the image will
+ * be stretched to match the provided aspect ratio, or cropped if crop is true.
+ * - Derived from the media aspect ratio if only width or height is provided and
+ * the other one is set to 0.
*
* \param md media descriptor object
* \param pos The position at which the thumbnail should be generated
* \param speed The seeking speed \sa{libvlc_thumbnailer_seek_speed_t}
* \param width The thumbnail width
* \param height the thumbnail height
+ * \param crop Should the picture be cropped to preserve source aspect ratio
* \param picture_type The thumbnail picture type \sa{libvlc_picture_type_t}
* \param timeout A timeout value in ms, or 0 to disable timeout
*
More information about the vlc-commits
mailing list