Top |
FluRecorderEvent *
flu_recorder_event_new (FluRecorderEventType type
);
Creates a new FluRecorderEvent
FluRecorderEvent *
flu_recorder_event_copy (const FluRecorderEvent *event
);
Copies a FluRecorderEvent
void flu_recorder_event_free (FluRecorderEvent *event
);
Frees the FluRecorderEvent
Enum values used to describe different type of events that can be raised by a FluRecorder.
Enum values used to describe the different save modes of a recorder
No saving of the encoded stream will be done. The application must listen to the FluRecorderEventSave to fetch the encoded stream |
||
The encoded stream will be saved to a file |
||
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
use as |
||
FluRecorderSaveModeUdpStreamData |
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.
FluRecorderEventType |
||
FluRecorderSaveMode |
Specify the save mode of the recorder |
|
FluRecorderSaveModeData |
Specific data for a save mode |
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
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>