Top |
FluPlayerEvent *
flu_player_event_new (FluPlayerEventType type
);
Creates a new FluPlayerEvent
FluPlayerEvent *
flu_player_event_copy (const FluPlayerEvent *event
);
Copies a FluPlayerEvent
void flu_player_event_free (FluPlayerEvent *event
);
Frees the FluPlayerEvent
Enum values used to describe different kinds of prohibited user operations. This is mostly used in the case of DVD playback for example when the user is not allowed to skip some scene or for advertising scenarios.
No operation is prohibited. |
||
User cannot change playback position. |
||
User cannot change playback rate. |
||
User cannot change currently playing audio stream. |
||
User cannot change currently playing video stream. |
||
User cannot change currently playing text stream. |
||
User cannot go to the title menu. |
||
User cannot go to the root menu. |
||
User cannot go to the subtitles/text menu. |
||
User cannot go to the audio menu. |
||
User cannot go to the video menu. |
||
User cannot go to the chapters menu. |
||
User cannot go trigger a select button event. |
||
User cannot skip to a different chapter. |
||
User cannot pause playback. |
||
User cannot stop playback. |
||
User cannot resume movie playback from a menu. |
||
User cannot perform any operation. |
Enum values used to describe different type of events that can be raised by a FluPlayer.
New information about available streams has been received. Application should query available streams and their respective info again. |
||
The state of a stream has changed. |
||
Information about a stream has been updated. |
||
An error occured on the stream and thus it can not be played. |
||
A video stream is requesting an output texture. |
||
The player is buffering data in order to resume playback and prevent jittering. |
||
A fatal error occured on the player. |
||
The player reached the end of stream. |
||
The player state has changed. |
||
User Operation masks have changed. |
||
A stream is requesting it's render mode. |
||
A stream has received a buffer to render. |
||
A stream needs a device to render to |
||
Media information about the currently opened resource has been updated. |
||
New information about available bookmarks has been received. Application should query available bookmarks and their respective info again. |
||
A DRM capable element is asking the application for a DRM agent. |
||
The source requests to seek to a given position. |
||
The source requests new data to be supplied. |
typedef struct { FluPlayerEventType type; } FluPlayerEventAny;
Contains the fields which are common to all event structs. Any event pointer can safely be cast to a pointer to a FluPlayerEventAny to access these fields.
typedef struct { FluPlayerEventType type; GError *error; const gchar *dbg; } FluPlayerEventError;
Event structure describing an error that occurred in an FluPlayer instance.
typedef struct { FluPlayerEventType type; GError *error; const gchar *dbg; FluStream *stream; } FluPlayerEventStreamError;
Event structure describing an error that occured in an FluStream instance.
FluPlayerEventType |
||
a GError describing the error |
||
Debug string |
||
FluStream * |
Pointer to the FluStream that has generated the error |
typedef struct { FluPlayerEventType type; gint percent; } FluPlayerEventBuffering;
Event structure providing information about the current buffering state of an
FluPlayer instance. When percent
is lower than 100, the player is paused
and buffering data. When percent
reaches 100 again, playback will resume.
typedef struct { FluPlayerEventType type; guintptr handle; FluStream *stream; gboolean handle_aspect_ratio; } FluPlayerEventRequestTexture;
Event structure used by a stream
to retrieve information about the target
rendering texture. When a video stream is preparing to render the
first video frame it will request a destination drawable to the application.
Application should set the target texture pointer in handle
while handling
this event. The video rendering component is sometimes able to handle the drawing
of black borders and maintain the original video aspect ratio. In most cases this
will work just fine but it is recommended that the application handles this
directly to support special cases like forcing a specific aspect ratio, video
cropping, etc...
FluPlayerEventType |
||
A generic pointer used to exchange a texture identifier. It is specific to the windowing system. |
||
FluStream * |
A pointer to the FluStream that needs a target texture |
|
|
typedef struct { FluPlayerEventType type; FluStream *stream; FluStreamChangedFlags changed_flags; } FluPlayerEventStreamChanged;
Event structure used to notify applications that a stream
's changed
FluPlayerEventType |
||
FluStream * |
A pointer to the FluStream |
|
FluStreamChangedFlags |
struct FluPlayerEventStreamInfoUpdated { FluPlayerEventType type; FluStream *stream; };
Alias of FluPlayerEventStreamChanged for backwards compatibility
struct FluPlayerEventStreamStateChanged { FluPlayerEventType type; FluStream *stream; };
Event structure used to notify applications that a stream
's state has
changed. That means that the stream either became active thanks to data flow
(after being requested) or inactive.
typedef struct { FluPlayerEventType type; FluPlayerState state; } FluPlayerEventState;
Event structure used to notify applications that the player's state has changed.
The new current state is provided in state
or can be queried using
flu_player_state_get()
.
typedef struct { FluPlayerEventType type; FluUserOperation prohibited_operations; } FluPlayerEventUOPChanged;
Event structure used to notify applications that the player's UOP (User Operation Prohibition) has changed.
FluPlayerEventType |
||
FluUserOperation |
new User Operation Prohibition |
typedef struct { FluPlayerEventType type; FluStream *stream; gboolean render; gboolean synchronize; gboolean notify; } FluPlayerEventRequestRenderMode;
Event structure used to retrieve information about the target rendering
mode for stream
. Whenever the stream
is about to be decoded, the
application can decide to render or not to render a specific stream.
FluPlayerEventType |
||
FluStream * |
A pointer to the FluStream that requests a render mode |
|
|
||
|
||
|
struct FluPlayerEventRequestRenderDevice { FluPlayerEventType type; FluStream *stream; GList *devices; gint selected; };
Event structure used to retrieve what device to use to render a stream
.
FluPlayerEventType |
||
FluStream * |
A pointer to the FluStream that requests a render mode |
|
List of devices |
||
Index of selected one from |
typedef struct { FluPlayerEventType type; FluStream *stream; guint64 pts; guint64 duration; } FluPlayerEventRender;
Event structure indicating that a stream
is ready to render a sample.
FluPlayerEventType |
||
FluStream * |
A pointer to the FluStream that received a sample for rendering |
|
Timestamp of the sample in nanoseconds |
||
Sample duration in nanoseconds |
typedef struct { FluPlayerEventType type; const FluMediaInfo *info; FluSource *source; } FluPlayerEventMediaInfoUpdated;
Event structure used to notify applications that a
FluPlayerEventType |
||
const FluMediaInfo * |
A pointer to the FluMediaInfo. The structure referenced by this pointer should not be freed or modified in any way. |
|
FluSource * |
typedef struct { FluPlayerEventType type; guintptr handle; gpointer init_data; gsize init_data_size; gboolean try_inband; } FluPlayerEventRequestDRMAgent;
Event structure used to retrieve the DRM agent handle used for decrypting
FluPlayerEventType |
||
A generic pointer used to set the drm agent to use |
||
Data chunk extracted from the stream that is necessary to init drm agent, such as PSSH atom, or Playready Object. |
||
size of |
||
allow player to try drm object creation on it's own if no |
typedef struct { FluPlayerEventType type; FluSource *source; guint64 position; FluFormat format; } FluPlayerEventSeekSource;
Event structure used to request a seek on FluSource
FluPlayerEventType |
||
FluSource * |
FluSource requesting seek |
|
Position in bytes to seek |
||
FluFormat |
Format of seek event from FluFormat |
typedef struct { FluPlayerEventType type; FluSource *source; FluPlaybackDirection playback_direction; guint8 *data; gsize size; guint64 pts; GFreeFunc free_func; } FluPlayerEventSourceNeedData;
Event structure used when FluSource request data.
This event is used with seekable
FluPlayerEventType |
||
FluSource * |
FluSource requesting seek |
|
FluPlaybackDirection |
current playback direction |
|
pointer to the data. The structure takes the ownership |
||
size of the data. Can be FLU_SIZE_UNKNOWN if not defined. |
||
timestamp of the data. Can be FLU_TIME_NONE if not defined. |
||
typedef struct { FluPlayerEventType type; FluStream *stream; gboolean added; } FluPlayerEventStreamsAvailable;
Event structure used when a new stream is add to a FluSource
FluPlayerEventType |
||
FluStream * |
A pointer to the FluStream that has been added to trigger event |
|
True if the stream has been added to the source |
The FluPlayerEvent 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> FluPlayerEvent *event; FluPlayerEventType 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> FluPlayerEvent *event; FluPlayerState state;
state = ((FluPlayerEventState*)event)->state; </programlisting> </informalexample> or: <informalexample> <programlisting> FluPlayerEvent *event; FluPlayerState state;
state = event->state.x; </programlisting> </informalexample>
stream_info_updated and stream_state_changed are aliases of stream_changed for backwards compatibility