Custom source

Description

Custom source interface

flu_source_custom_new ()

FluSource * flu_source_custom_new (const char *source_name, gboolean is_seekable, gint64 size);

Creates a new custom based source source_name : Name of the new source or NULL to automatically create a new unique name. is_seekable : Flag indicating if source is seekable or not size : The size of the data stream in bytes (Use FLU_SIZE_UNKNOWN if unknown)

Returns

A new instance of a FluSource

flu_source_custom_data_push ()

gboolean flu_source_custom_data_push (FluSource *thiz, guchar *data, gsize size, guint64 pts, GFreeFunc free_func);

Pushes data into a FluSource. This operation can fail if the source is seekable. In the seekable case, it's preferable to use the signal FluPlayerEventSourceNeedData.

Parameters

thiz

The FluSource to push data into

data

The actual data to push

size

The size of the data to push

pts

The presentation timestamp in nanoseconds for the actual data. Use FLU_TIME_NONE if not defined.

free_func

The method to call when the data is ready to be released

Returns

TRUE if the operation succeed, FALSE otherwise

flu_source_custom_eos_send ()

gboolean flu_source_custom_eos_send (FluSource *thiz);

Sends the EOS to the FluSource

Parameters

thiz

The FluSource to push the EOS to

Returns

TRUE if the operation succeed, FALSE otherwise

Types and Values