Recorder

Description

Recorder interface

FluRecorderListener ()

gboolean(*FluRecorderListener) (FluRecorder *recorder, FluRecorderEvent *event, gpointer data);

A recorder event listener definition

Parameters

recorder

The recorder that triggered the event

event

The recorder event definition. You should cast to the specific recorder event data

data

The user data provided when registering the listener

flu_recorder_new ()

FluRecorder * flu_recorder_new (const FluMediaInfo *media_info, GError **error);

Since: 1.0

Parameters

media_info

The FluMediaInfo to use to describe the recording.

error

Pointer to a GError* pointer that will receive error info, or NULL Creates a new FluRecorder

Returns

The newly created recorder

flu_recorder_ref ()

FluRecorder * flu_recorder_ref (FluRecorder *thiz);

Add a reference to an FluRecorder

Since: 1.0

Parameters

thiz

The recorder to be referenced

Returns

The same object, for programming convenience.

[transfer full]

flu_recorder_unref ()

void flu_recorder_unref (FluRecorder *thiz);

Remove a reference from an FluRecorder

Since: 1.0

Parameters

thiz

The recorder to be unreferenced

flu_recorder_record ()

void flu_recorder_record (FluRecorder *thiz, GError **error);

Starts recording with provided FluRecorder, or switches back to recording state if provided FluRecorder is currently paused.

Since: 1.0

Parameters

thiz

The FluRecorder used to start or continue recording

error

Pass the address of a GError pointer to store back detailed information about any error that may occur while changing recording state. You can pass NULL to ignore detailed error reporting. If the returned value points to a valid GError instance, you will need to free it up using g_error_free().

flu_recorder_pause ()

void flu_recorder_pause (FluRecorder *thiz);

Pauses a recorder currently recording. The recording will be paused and the FLU_RECORDER_EVENT_STATE event will be triggered with a value of FLU_RECORDER_STATE_PAUSED (in case the recorder was in FLU_RECORDER_STATE_RECORDING state else no event is triggered).

Since: 1.1

Parameters

thiz

The FluRecorder to pause

flu_recorder_stop ()

void flu_recorder_stop (FluRecorder *thiz);

Stops current recording.

Since: 1.0

Parameters

thiz

The FluRecorder to stop

flu_recorder_streams_get ()

GList * flu_recorder_streams_get (FluRecorder *thiz);

Gets the list of requested streams note: Use flu_stream_list_free() to free the returned list

Since: 1.0

Parameters

thiz

The FluRecorder to get the list of requested streams from

Returns

The list of requested streams.

[element-type FluStream][transfer full]

flu_recorder_video_streams_get ()

GList * flu_recorder_video_streams_get (FluRecorder *thiz);

Gets the list of requested video streams note: Use flu_stream_list_free() to free the returned list

Since: 1.0

Parameters

thiz

The FluRecorder to get the list of requested video streams from

Returns

The list of requested video streams.

[element-type FluStream][transfer full]

flu_recorder_audio_streams_get ()

GList * flu_recorder_audio_streams_get (FluRecorder *thiz);

Gets the list of requested audio streams note: Use flu_stream_list_free() to free the returned list

Since: 1.0

Parameters

thiz

The FluRecorder to get the list of requested audio streams from

Returns

The list of requested audio streams.

[element-type FluStream][transfer full]

flu_recorder_text_streams_get ()

GList * flu_recorder_text_streams_get (FluRecorder *thiz);

Gets the list of available text streams note: Use flu_stream_list_free() to free the returned list

Since: 1.0

Parameters

thiz

The FluPlayer to get the list of available text streams from

Returns

The list of available text streams.

[element-type FluStream][transfer full]

flu_recorder_request_stream ()

FluStream * flu_recorder_request_stream (FluRecorder *thiz, const FluStreamInfo *info, GError **error);

Request a FluStream to push data to be recorded

Since: 1.0

Parameters

thiz

The recorder to request the stream from

info

The stream information to be requested

error

Pointer to a GError* pointer that will receive error info, or NULL

Returns

The requested stream.

[transfer full]

flu_recorder_connect_device ()

FluStream * flu_recorder_connect_device (FluRecorder *thiz, FluDevice *d, const FluStreamInfo *info, GError **error);

Since: 1.0

Parameters

thiz

The recorder to connect the device to

d

The device to connect to

info

The stream information to use when recording from the device

error

Pointer to a GError* pointer that will receive error info, or NULL Connect a FluDevice to a FluRecorder to grab all frames from the device

Returns

The requested stream from the device.

[transfer full]

flu_recorder_dot_graph_generate ()

void flu_recorder_dot_graph_generate (FluRecorder *thiz, const gchar *filename);

Outputs a DOT file representing the current pipeline

Since: 1.0

Parameters

thiz

The FluRecorder

filename

The filename for the DOT file

flu_recorder_state_name_get ()

const gchar * flu_recorder_state_name_get (FluRecorderState state);

Gets a readable name of a state

Since: 1.1

Parameters

state

The FluRecorderState to get the name of

Returns

A statically-allocated string

flu_recorder_state_get ()

FluRecorderState flu_recorder_state_get (FluRecorder *thiz);

Since: 1.1

Parameters

thiz

The FluRecorder

Returns

the FluRecorder current state

flu_recorder_event_listener_add ()

void flu_recorder_event_listener_add (FluRecorder *thiz, FluRecorderEventType event, FluRecorderListener listener, gpointer data);

Adds an event listener on a FluRecorder

Since: 1.0

Parameters

thiz

The FluRecorder to add the event listener to

event

The FluRecorderEvent to listen to

listener

The function to be called whenever an event is received.

data

The user provided data to be passed onto the listener

flu_recorder_event_listener_remove ()

void flu_recorder_event_listener_remove (FluRecorder *thiz, FluRecorderEventType event, FluRecorderListener listener, gpointer data);

Removes an event listener on a FluRecorder

Since: 1.0

Parameters

thiz

The FluRecorder to remove the event listener from

event

The FluRecorderEvent to stop listening

listener

The function used when adding a listener.

data

The user provided data used when adding a listener

flu_recorder_is_hardware_accelerated ()

gboolean flu_recorder_is_hardware_accelerated (const FluStreamInfo *info);

Checks if the encoder will use hardware accelaration for the FluStreamInfo

Since: 1.1

Parameters

info

The stream information

Returns

Whether the encoder will use hardware acceleration or not

Types and Values

FluRecorder

typedef struct { } FluRecorder;

An opaque structure representing a media player instance.