Thumbnailer related functions
FluThumbnailer * |
|
FluThumbnailer * |
|
void |
|
gboolean |
|
void |
|
gboolean |
|
gboolean |
|
gboolean |
|
gboolean |
|
gboolean |
FluThumbnailer * flu_thumbnailer_new (void);
Creates a new FluThumbnailer
Since: 1.0
The newly created thumnailer
FluThumbnailer * flu_thumbnailer_ref (FluThumbnailer *thiz);
Add a reference to a FluThumbnailer
Since: 1.1
The thumbnailer to be referenced
The same object, for programming convenience.
[transfer full]
void flu_thumbnailer_unref (FluThumbnailer *thiz);
Remove a reference from a FluThumbnailer
Since: 1.1
The thumbnailer to be unreferenced
gboolean flu_thumbnailer_open (FluThumbnailer *thiz, const gchar *input_uri, gboolean disable_hw_accel, GError **error);
Opens a file with an FluThumbnailer
Since: 1.0
The FluThumbnailer
URI of the input video to open.
Disables hardware acceleration
Pass the address of a GError pointer to store back detailed information about any error that may occur while opening the thumbnailer. You can pass NULL to ignore detailed error reporting.
TRUE if successful, FALSE otherwise
void flu_thumbnailer_close (FluThumbnailer *thiz);
Closes an FluThumbnailer
Since: 1.0
gboolean flu_thumbnailer_frame_rgb_get (FluThumbnailer *thiz, gint64 position, gboolean accurate, FluStreamVideoRgbFormat format, gint *width, gint *height, guint8 **data, guint32 *pitch, GError **error);
Takes a RGB thumbnail at a stream position
Since: 1.0
The FluThumbnailer
The position in the stream, pass -1 to extract thumbnail at current position.
Indicates weither the position can be approximated
The FluStreamVideoRgbFormat format to use
The desired width of the frame (-1 to use the native width).
The desired height of the frame (-1 to use the native height).
The pointer to get the frame data from. In case of NULL the library will allocate the memory for you and you should use g_free().
The pitch of the frame. The number of pitches depend on the format used. In case data is NULL the pitch value will be set.
Pass the address of a GError pointer to store back detailed information about any error that may occur while extracting a frame. You can pass NULL to ignore detailed error reporting.
TRUE if successful, FALSE otherwise
gboolean flu_thumbnailer_frame_ycbcr_get (FluThumbnailer *thiz, gint64 position, gboolean accurate, FluStreamVideoYcbcrFormat format, gint *width, gint *height, guint8 **planes, guint32 *pitches, GError **error);
Takes a YCbCr thumbnail at a stream position
Since: 1.0
The FluThumbnailer
The position in the stream, pass -1 to extract thumbnail at current position.
Indicates weither the position can be approximated
The FluStreamVideoYcbcrFormat format to use
The desired width of the frame (-1 to use the native width).
The desired height of the frame (-1 to use the native height).
array of planes pointers to store the pixels. The number of planes in the provided array depends on the format used (1 plane with YUYV and 2 planes with other formats). Each plane pointer can be NULL in such case the library will allocate the memory for you and you should use g_free() to free the corresponding memory. The provided array must be valid and must have enough size to store pointers for each plane.
array of pitches for each plane. The number of pitches depends on the format used and must be equal to the number of planes. The provided array must be valid and must have enough size to store pitches for each plane.
Pass the address of a GError pointer to store back detailed information about any error that may occur while extracting a frame. You can pass NULL to ignore detailed error reporting.
TRUE if successful, FALSE otherwise
gboolean flu_thumbnailer_frame_encoded_get (FluThumbnailer *thiz, gint64 position, gboolean accurate, FluStreamVideoFrameFormat format, gint *width, gint *height, guint8 **data, guint *size, GError **error);
Extract a JPEG or PNG thumbnail at a stream position.
Since: 1.1
The FluThumbnailer
The position in the stream, pass -1 to get thumbnail at current position.
Indicates weither the position can be approximated
The FluStreamVideoFrameFormat format to use
The desired width of the frame (-1 to use the native width).
The desired height of the frame (-1 to use the native height).
Address of a pointer where data are going to be copied. On succes, data pointer will be filled out with the address of a binary data block representing the encoded content of the frame. In this case, data content must be freed using g_free(). In case of failure, data pointer will be filled out with NULL.
size in bytes of the buffer returned by data parameter.
Pass the address of a GError pointer to store back detailed information about any error that may occur while extracting a frame. You can pass NULL to ignore detailed error reporting.
TRUE if successful, FALSE otherwise
gboolean flu_thumbnailer_frame_save (FluThumbnailer *thiz, gint64 position, gboolean accurate, FluStreamVideoFrameFormat format, gint width, gint height, const gchar *location, GError **error);
Saves a frame at a stream position into an image file
Since: 1.0
The FluThumbnailer
The position in the stream, pass -1 to save thumbnail at current position.
Indicates weither the position can be approximated
The FluStreamVideoFrameFormat format to use
The desired width of the frame (-1 to use the native width)
The desired height of the frame (-1 to use the native height)
The file path to save the file (not a URI)
Pass the address of a GError pointer to store back detailed information about any error that may occur while saving a thumbnail. You can pass NULL to ignore detailed error reporting.
TRUE if successful, FALSE otherwise
gboolean flu_thumbnailer_duration_get (FluThumbnailer *thiz, gint64 *duration);
Gets the duration of the media set
Since: 1.0
TRUE if the duration is valid, FALSE otherwise
typedef struct { } FluThumbnailer;
An opaque structure representing a thumbnailer instance.