Thumbnailer

Description

Thumbnailer related functions

flu_thumbnailer_new ()

FluThumbnailer * flu_thumbnailer_new (void);

Creates a new FluThumbnailer

Returns

The newly created thumnailer

flu_thumbnailer_free ()

void flu_thumbnailer_free (FluThumbnailer *thiz);

Frees an FluThumbnailer

Parameters

thiz

The FluThumbnailer to free

flu_thumbnailer_open ()

gboolean flu_thumbnailer_open (FluThumbnailer *thiz, gchar *input, gboolean disable_hw_accel, GError **error);

Opens a file with an FluThumbnailer

Parameters

thiz

The FluThumbnailer

input

The input file to use

disable_hw_accel

Disables hardware acceleration

error

NULL if the input file opened correctly

Returns

TRUE if successful, FALSE otherwise

flu_thumbnailer_close ()

void flu_thumbnailer_close (FluThumbnailer *thiz);

Closes an FluThumbnailer

Parameters

thiz

The FluThumbnailer to close

flu_thumbnailer_frame_rgb_get ()

gboolean flu_thumbnailer_frame_rgb_get (FluThumbnailer *thiz, gint64 position, gboolean accurate, FluStreamVideoRgbFormat format, gint *width, gint *height, guint8 **data, guint32 *pitch);

Takes a RGB thumbnail at a stream position

Parameters

thiz

The FluThumbnailer

position

The position in the stream

accurate

Indicates wether the position can be approximated

format

The FluStreamVideoRgbFormat format to use

width

The desired with of the frame (-1 to use the native width)

height

The desired with of the frame (-1 to use the native height)

data

The pointer to get the frame data from. In case of NULL the library will allocate the memory for you and you should use free().

pitch

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

Returns

TRUE if successful, FALSE otherwise

flu_thumnailer_frame_ycbcr_get ()

gboolean flu_thumnailer_frame_ycbcr_get (FluThumbnailer *thiz, gint64 position, gboolean accurate, FluStreamVideoYcbcrFormat format, gint *width, gint *height, guint8 **planes, guint32 *pitches);

Takes a YCbCr thumbnail at a stream position

Parameters

thiz

The FluThumbnailer

position

The position in the stream

accurate

Indicates wether the position can be approximated

format

The FluStreamVideoYcbcrFormat format to use

width

The desired with of the frame (-1 to use the native width)

height

The desired with of the frame (-1 to use the native height)

planes

The planes pointer to store the pixels. The number of planes depend on the format used. The actual pointers can be NULL in such case the library will allocate the memory for you and you should use free() on each plane value.

pitches

The pitch for each plane. The number of pitches depend on the format used. In case the planes pointers are NULL the pitches values will be set.

Returns

TRUE if successful, FALSE otherwise

flu_thumbnailer_frame_save ()

gboolean flu_thumbnailer_frame_save (FluThumbnailer *thiz, gint64 position, gboolean accurate, FluStreamVideoFrameFormat format, gint width, gint height, gchar *location);

Saves a frame at a stream position into an image file

Parameters

thiz

The FluThumbnailer

position

The position in the stream

accurate

Indicates wether the position can be approximated

format

The FluStreamVideoFrameFormat format to use

width

The desired with of the frame (-1 to use the native width)

height

The desired with of the frame (-1 to use the native height)

location

The file path to save the file (not a URI)

Returns

TRUE if successful, FALSE otherwise

flu_thumbnailer_duration_get ()

gboolean flu_thumbnailer_duration_get (FluThumbnailer *thiz, gint64 *duration);

Gets the duration of the media set

Parameters

thiz

The FluThumbnailer to get the duration from

duration

The duration specified in nanoseconds

Returns

TRUE if the duration is valid, FALSE otherwise

Types and Values

FluThumbnailer

typedef struct { } FluThumbnailer;

An opaque structure representing a thumbnailer instance.