Recorder events
FluRecorderEvent * |
|
FluRecorderEvent * |
|
void |
FluRecorderEvent * flu_recorder_event_new (FluRecorderEventType type);
Creates a new FluRecorderEvent
Since: 1.1
The newly created event.
[transfer full]
FluRecorderEvent * flu_recorder_event_copy (const FluRecorderEvent *event);
Copies a FluRecorderEvent
Since: 1.1
The copied event.
[transfer full]
void flu_recorder_event_free (FluRecorderEvent *event);
Frees the FluRecorderEvent
Since: 1.1
Enum values used to describe an FluRecorder state.
FLU_RECORDER_STATE_STOPPED |
The recorder is currently stopped |
FLU_RECORDER_STATE_PAUSED |
The recorder is currently paused |
FLU_RECORDER_STATE_RECORDING |
The recorder is currently recording |
Enum values used to describe different type of events that can be raised by a FluRecorder.
FLU_RECORDER_EVENT_EMPTY |
|
FLU_RECORDER_EVENT_STATE |
The recorder state has changed |
FLU_RECORDER_EVENT_REQUEST_SAVE_MODE |
A recorder is requesting its save mode |
FLU_RECORDER_EVENT_SAVE |
The recoder need |
FLU_RECORDER_EVENT_ERROR |
Enum values used to describe the different save modes of a recorder
FLU_RECORDER_SAVE_MODE_NONE |
No saving of the encoded stream will be done. The application must listen to the FluRecorderEventSave to fetch the encoded stream |
FLU_RECORDER_SAVE_MODE_FILE |
The encoded stream will be saved to a file |
FLU_RECORDER_SAVE_MODE_UDP_STREAM |
typedef struct { const gchar *filename; } FluRecorderSaveModeFileData;
The specific data required when using the FLU_RECORDER_SAVE_MODE_FILE
struct FluRecorderSaveModeUdpStreamData { gchar *host; gint port; };
The specific data required when using the FLU_RECORDER_SAVE_MODE_UDP_STREAM
The union all the data required for every save mode defined in FLURecorderSaveMode
typedef struct { FluRecorderEventType type; } FluRecorderEventAny;
Contains the fields which are common to all event structs. Any event pointer can safely be cast to a pointer to a FluRecorderEventAny to access these fields.
typedef struct { FluRecorderEventType type; FluRecorderSaveMode mode; FluRecorderSaveModeData data; } FluRecorderEventRequestSaveMode;
Event structure used to retrieve information about the target saving mode for a FluRecorder. In case of setting FLU_RECORDER_SAVE_MODE_NONE the event FLU_RECORDER_EVENT_SAVE will be received on every muxed buffer ready to be saved. Nothing is required on the specific data member. In case of setting FLU_RECORDER_SAVE_MODE_FILE, you need to pass a const gchar * with the file name to write the file to.
typedef struct { FluRecorderEventType type; const guint8 *data; guint64 duration; } FluRecorderEventSave;
Event structure indicating that muxed frame has been generated
typedef struct { FluRecorderEventType type; FluRecorderState state; } FluRecorderEventState;
Event structure used to notify applications that the recorder's state has changed. The new current state is provided in state or can be queried using flu_recorder_state_get().
typedef struct { FluRecorderEventType type; FluErrorTuple error; } FluRecorderEventError;
The FluRecoderEvent struct contains a union of all of the event structs, and allows access to the data fields in a number of ways.
The event type is always the first field in all of the event structs, and can always be accessed with the following code, no matter what type of event it is: <informalexample> <programlisting> FluRecorderEvent *event; FluRecorderEventType type;
type = event->type; </programlisting> </informalexample>
To access other fields of the event structs, the pointer to the event can be cast to the appropriate event struct pointer, or the union member name can be used. For example if the event type is FLU_PLAYER_EVENT_STATE then the state can be accessed with: <informalexample> <programlisting> FluRecorderEvent *event; FluRecorderState state;
state = ((FluRecoderEventState*)event)->state; </programlisting> </informalexample> or: <informalexample> <programlisting> FluRecorderEvent *event; FluRecorderState state;
state = event->state.x; </programlisting> </informalexample>