Player interface
gboolean |
|
FluPlayer * |
|
FluPlayer * |
|
void |
|
gboolean |
|
void |
|
GList * |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
gboolean |
|
FluPlayerState |
|
gboolean |
|
gboolean |
|
gboolean |
|
gboolean |
|
gboolean |
|
gboolean |
|
void |
|
gboolean |
|
gboolean |
|
gboolean |
|
void |
|
gboolean |
|
gboolean |
|
void |
|
gboolean |
|
gboolean |
|
void |
|
gboolean |
|
void |
|
GList * |
|
GList * |
|
void |
|
GList * |
|
void |
|
GList * |
|
GList * |
|
void |
|
GList * |
|
void |
|
GList * |
|
GList * |
|
void |
|
GList * |
|
GList * |
|
void |
|
GList * |
|
gboolean |
|
gint |
|
gboolean |
|
void |
|
FluBufferingPolicy |
|
void |
|
void |
|
GList * |
|
gboolean |
|
FluBookmark * |
|
void |
|
void |
|
void |
|
gpointer |
|
const gchar * |
|
void |
|
void |
|
void |
|
gboolean |
gboolean(*FluPlayerListener) (FluPlayer *player, FluPlayerEvent *event, gpointer data);
A player event listener definition
Since: 1.1
The player that triggered the event
The player event definition. You should cast to the specific player event data
The user data provided when registering the listener
FALSE if listener wants to be disconnected after call, or TRUE if listener wants to stay connected.
FluPlayer * flu_player_new (void);
Creates a new FluPlayer
Since: 1.0
The newly created player
Add a reference to an FluPlayer
Since: 1.0
The player to be referenced
The same object, for programming convenience.
[transfer full]
void flu_player_unref (FluPlayer *thiz);
Remove a reference from an FluPlayer
Since: 1.0
The player to be unreferenced
Adds a FluStream to a FluPlayer
Since: 1.0
TRUE if the operation succeed, FALSE otherwise
Removes a FluStream from a FluPlayer
Since: 1.0
GList * flu_player_sources_get (FluPlayer *thiz);
Gets the list of available sources note: Use flu_source_list_free() to free the returned list
Since: 1.0
The list of available streams.
[element-type FluSource][transfer full]
void flu_player_uri_open (FluPlayer *thiz, const char *uri);
Opens an URI
Since: 1.0
Opens a hardware device
Since: 1.0
The FluPlayer instance
The Device to open. Obtain it with flu_device_list_get(), for example.
void flu_player_close (FluPlayer *thiz);
The playback will be stopped and the FLU_PLAYER_EVENT_STATE event will be triggered in case the player was in FLU_PLAYER_STATE_PAUSED or FLU_PLAYER_STATE_PLAYING states with a value of FLU_PLAYER_STATE_STOPPED
Since: 1.0
void flu_player_stop (FluPlayer *thiz);
The playback will be stopped and the FLU_PLAYER_EVENT_STATE event will be triggered in case the player was in FLU_PLAYER_STATE_PAUSED or FLU_PLAYER_STATE_PLAYING states with a value of FLU_PLAYER_STATE_STOPPED
Since: 1.0
void flu_player_pause (FluPlayer *thiz);
Pauses the current playback. The playback will be paused and the FLU_PLAYER_EVENT_STATE event will be triggered in case the player was in FLU_PLAYER_STATE_STOPPED or FLU_PLAYER_STATE_PLAYING states with a value of FLU_PLAYER_STATE_PAUSED
Since: 1.0
void flu_player_play (FluPlayer *thiz);
Plays the URI set by flu_player_uri_open() or flu_player_device_open(). The playback will start and the FLU_PLAYER_EVENT_STATE event will be triggered in case the player was in FLU_PLAYER_STATE_PAUSED with a value of FLU_PLAYER_STATE_PLAYING
Since: 1.0
gboolean flu_player_media_info_get (FluPlayer *thiz, const FluMediaInfo **info);
Gets the media information for the current FluPlayer
Since: 1.0
The player to get the information from
The pointer to store the media information. Returned structure lifetime is the same as the associated FluPlayer instance. If you need to keep FluMediaInfo data beyond the lifetime of the FluPlayer instance, you can use flu_media_info_copy() to copy them to a local instance. Don't forget to call flu_media_info_clear() later on your local instance to free up memory.
TRUE if the operation succeed, FALSE otherwise
FluPlayerState flu_player_state_get (FluPlayer *thiz);
Gets the playback state of FluPlayer
Since: 1.0
The playback state
gboolean flu_player_duration_get (FluPlayer *thiz, gint64 *duration);
Gets the duration of the media set
Since: 1.0
TRUE if the duration is valid, FALSE otherwise
gboolean flu_player_position_get (FluPlayer *thiz, gint64 *position);
Gets the current playback position
Since: 1.0
TRUE if the position is valid, FALSE otherwise
gboolean flu_player_position_set (FluPlayer *thiz, gint64 position, gboolean accurate);
Sets the current playback position. While seeking the player will emit a state change event to SEEKING until the player gets back to its target state and emits the state change event again. Note that state changes are sequential, you might receive a state change event to PAUSED while calling this function if you called flu_player_pause() before and then SEEKING and then PAUSED again.
Since: 1.0
The FluPlayer to set the position to
The position to set specified in nanoseconds
Indicates whether the position can be approximated to increase response time or if it should be respected at all costs
TRUE if the position was set correctly, FALSE otherwise
gboolean flu_player_rate_set (FluPlayer *thiz, gdouble rate);
Sets the playback rate reverse playback and > 1.0 for fast playback
Since: 1.0
TRUE if the rate was set correctly, FALSE otherwise
gboolean flu_player_rate_get (FluPlayer *thiz, gdouble *rate);
Gets the playback rate
Since: 1.0
TRUE if the rate is valid, FALSE otherwise
gboolean flu_player_step (FluPlayer *thiz, gint64 amount);
Step the current playback position, this is, advance only the specified ammount of buffers.
Since: 1.0
TRUE if the step was done correctly, FALSE otherwise
void flu_player_uop_get (FluPlayer *thiz, FluUserOperation *uop);
Gets the user operations prohibition mask
Since: 1.0
gboolean flu_player_dvd_is_supported (FluPlayer *thiz);
Check if DVD playback is supported
Since: 1.0
TRUE if DVD playback is supported, FALSE otherwise
gboolean flu_player_auto_switching_is_supported (FluPlayer *thiz);
Check if the network auto switching is supported
Since: 1.0
TRUE if network auto switching is supported, FALSE otherwise
gboolean flu_player_auto_switching_get (FluPlayer *thiz);
Gets the state of the network auto switching property
Since: 1.0
TRUE if the property is enabled, FALSE otherwise
void flu_player_auto_switching_set (FluPlayer *thiz, gboolean enable);
Sets the state of the network auto switching property
Since: 1.0
The FluPlayer to set the state of the property to
TRUE to enable the property, FALSE otherwise
gboolean flu_player_spdif_is_supported (FluPlayer *thiz);
Check if SPDIF is supported
Since: 1.0
TRUE if SPDIF is supported, FALSE otherwise
gboolean flu_player_spdif_get (FluPlayer *thiz);
Gets the state of the SPDIF property
Since: 1.0
TRUE if the property is enabled, FALSE otherwise
void flu_player_spdif_set (FluPlayer *thiz, gboolean enable);
Sets the state of the SPDIF property
Since: 1.0
The FluPlayer to set the state of the property to
TRUE to enable the property, FALSE otherwise
gboolean flu_player_hw_accel_is_supported (FluPlayer *thiz);
Check if hardware acceleration is supported
Since: 1.0
TRUE if hardware acceleration is supported, FALSE otherwise
gboolean flu_player_hw_accel_get (FluPlayer *thiz);
Gets the state of the hardware acceleration property
Since: 1.0
TRUE if the property is enabled, FALSE otherwise
void flu_player_hw_accel_set (FluPlayer *thiz, gboolean enable);
Sets the state of the hardware acceleration property
Since: 1.0
The FluPlayer to set the state of the property to
TRUE to enable the property, FALSE otherwise
gboolean flu_player_normalize_downmix_get (FluPlayer *thiz);
Gets the state of the normalize downmix property
Since: 1.0
TRUE if the property is enabled, FALSE otherwise
void flu_player_normalize_downmix_set (FluPlayer *thiz, gboolean enable);
Sets the state of the normalize downmix property
Since: 1.0
The FluPlayer to set the state of the property to
TRUE to enable the property, FALSE otherwise
GList * flu_player_streams_get (FluPlayer *thiz);
Gets the list of available streams note: Use flu_stream_list_free() to free the returned list
Since: 1.0
The list of available streams.
[element-type FluStream][transfer full]
GList * flu_player_video_streams_get (FluPlayer *thiz);
Gets the list of available video streams note: Use flu_stream_list_free() to free the returned list
Since: 1.0
The list of available video streams.
[element-type FluStream][transfer full]
void flu_player_video_active_streams_set (FluPlayer *thiz, GList *streams);
Sets the list of active video streams
Since: 1.0
The FluPlayer to set the list of active video streams to
The list of active video streams.
GList * flu_player_video_active_streams_get (FluPlayer *thiz);
Gets the list of active video streams note: Use flu_stream_list_free() to free the returned list
Since: 1.0
The list of active video streams.
[element-type FluStream][transfer full]
void flu_player_video_ignored_streams_set (FluPlayer *thiz, GList *streams);
Sets the list of ignored video streams
Since: 1.0
The FluPlayer to set the list of ignored video streams to
The list of ignored video streams.
GList * flu_player_video_ignored_streams_get (FluPlayer *thiz);
Gets the list of ignored video streams note: Use flu_stream_list_free() to free the returned list
Since: 1.0
The list of ignored video streams.
[element-type FluStream][transfer full]
GList * flu_player_audio_streams_get (FluPlayer *thiz);
Gets the list of available audio streams note: Use flu_stream_list_free() to free the returned list
Since: 1.0
The list of available audio streams.
[element-type FluStream][transfer full]
void flu_player_audio_active_streams_set (FluPlayer *thiz, GList *streams);
Sets the list of active audio streams
Since: 1.0
The FluPlayer to set the list of active audio streams to
The list of active audio streams.
GList * flu_player_audio_active_streams_get (FluPlayer *thiz);
Gets the list of active audio streams note: Use flu_stream_list_free() to free the returned list
Since: 1.0
The list of active audio streams.
[element-type FluStream][transfer full]
void flu_player_audio_ignored_streams_set (FluPlayer *thiz, GList *streams);
Sets the list of ignored audio streams
Since: 1.0
The FluPlayer to set the list of ignored audio streams to
The list of ignored audio streams.
GList * flu_player_audio_ignored_streams_get (FluPlayer *thiz);
Gets the list of ignored audio streams note: Use flu_stream_list_free() to free the returned list
Since: 1.0
The list of ignored audio streams.
[element-type FluStream][transfer full]
GList * flu_player_text_streams_get (FluPlayer *thiz);
Gets the list of available text streams note: Use flu_stream_list_free() to free the returned list
Since: 1.0
The list of available text streams.
[element-type FluStream][transfer full]
void flu_player_text_active_streams_set (FluPlayer *thiz, GList *streams);
Sets the list of active text streams
Since: 1.0
The FluPlayer to set the list of active text streams to
The list of active text streams.
GList * flu_player_text_active_streams_get (FluPlayer *thiz);
Gets the list of active text streams note: Use flu_stream_list_free() to free the returned list
Since: 1.0
The list of active text streams.
[element-type FluStream][transfer full]
GList * flu_player_data_streams_get (FluPlayer *thiz);
Gets the list of available data streams note: Use flu_stream_list_free() to free the returned list
Since: 1.0
The list of available data streams.
[element-type FluStream][transfer full]
void flu_player_data_active_streams_set (FluPlayer *thiz, GList *streams);
Sets the list of active data streams
Since: 1.0
The FluPlayer to set the list of active data streams to
The list of active data streams.
GList * flu_player_data_active_streams_get (FluPlayer *thiz);
Gets the list of active data streams note: Use flu_stream_list_free() to free the returned list
Since: 1.0
The list of active data streams.
[element-type FluStream][transfer full]
gboolean flu_player_get_seekable_range (FluPlayer *thiz, gboolean *seekable, gint64 *start, gint64 *end);
Gets the seeking range
Since: 1.0
The FluPlayer to get the seekable range from
whether stream is seekable or not
start position of seekable range in nanoseconds
end position of seekable range in nanoseconds
TRUE if it's possible to get seekable range from current player. If it returns FALSE, values under seekable , start and end are not being changed.
gint flu_player_buffering_n_get (FluPlayer *thiz);
Gets the number of buffered segments
Since: 1.0
The number of buffered segments
gboolean flu_player_buffering_info_get (FluPlayer *thiz, gint nth, gint64 *start, gint64 *stop);
Gets the information of a buffered segment
Since: 1.0
The FluPlayer to get the buffered segments info from
Index of the buffered segment to query in the range of 0 to flu_player_buffering_n_get()
The start position of the queried buffered segment expressed in percent of total media duration (always between 0 and 100 inclusive).
The stop position of the queried buffered segment expressed in percent of total media duration (always between 0 and 100 inclusive).
Whether the operation succeeded or not
void flu_player_buffering_policy_set (FluPlayer *thiz, FluBufferingPolicy policy, gint size, gint64 time);
Sets the buffering policy on a player In case the policy used is FLU_BUFFERING_POLICY_NONE the size and time parameters are ignored
Since: 1.0
The FluPlayer to set the buffering policy
The FluBufferingPolicy to set
The minimum size in bytes for the buffering queue
The minimum time in nanoseconds for the buffering queue
FluBufferingPolicy flu_player_buffering_policy_get (FluPlayer *thiz, gint *size, gint64 *time);
Gets the buffering policy from a player
Since: 1.0
The FluPlayer to get the buffering policy from
The minimum size in bytes of the buffering queue.
The minimum time in nanoseconds of the buffering queue.
The buffering policy
void flu_player_dot_graph_generate (FluPlayer *thiz, const gchar *filename);
Outputs a DOT file representing the current pipeline
Since: 1.0
void flu_player_external_text_set (FluPlayer *thiz, const gchar *uri);
Sets the external text uri. When the URI is opened an valid a new FluStream of type FLU_STREAM_TYPE_TEXT will be available and behaves exactly the same as any other FluStream. To remove the text stream from the list of streams, call this function with NULL as the uri parameter.
Since: 1.0
GList * flu_player_bookmarks_get (FluPlayer *thiz);
Gets the list of available bookmarks
Since: 1.0
The FluPlayer to get the list of available bookmarks from note Use flu_bookmark_list_free() to free the returned list
The list of available bookmarks.
[element-type FluBookmark][transfer full]
gboolean flu_player_bookmark_set (FluPlayer *thiz, FluBookmark *b);
Sets the current bookmark
Since: 1.0
TRUE if the bookmark is set correctly, FALSE otherwise
FluBookmark * flu_player_bookmark_get (FluPlayer *thiz);
Gets the bookmark closest to the current playback position
Since: 1.0
The FluPlayer to get the bookmark from note: Use flu_bookmark_unref() to unref the returned bookmark
The bookmark closest to the current playback position.
[transfer full]
void flu_player_user_agent_set (FluPlayer *thiz, const gchar *user_agent);
Sets the User-Agent HTTP request header filed
Since: 1.0
void flu_player_user_data_add (FluPlayer *thiz, const gchar *key, gpointer user_data, GDestroyNotify destroy);
Add user provided data into a player
Since: 1.0
The FluPlayer to store the user data into
The name to identify the data stored
The callback function to relase user_data when the FluPlayer is destroyed
void flu_player_user_data_remove (FluPlayer *thiz, const gchar *key);
Remove user provided data from a player
Since: 1.0
gpointer flu_player_user_data_get (FluPlayer *thiz, const gchar *key);
Get the user provided data from a player
Since: 1.0
A pointer to the user data.
[transfer none]
const gchar * flu_player_state_name_get (FluPlayerState state);
Gets a readable name of a state
Since: 1.0
A statically-allocated string
void flu_player_event_listener_add (FluPlayer *thiz, FluPlayerEventType event, FluPlayerListener listener, gpointer data);
Adds an event listener on a FluPlayer
Since: 1.0
The FluPlayer to add the event listener to
The FluPlayerEvent to listen to
The function to be called whenever an event is received.
The user provided data to be passed onto the listener
void flu_player_event_listener_remove (FluPlayer *thiz, FluPlayerEventType event, FluPlayerListener listener, gpointer data);
Removes an event listener on a FluPlayer
Since: 1.0
The FluPlayer to remove the event listener from
The FluPlayerEvent to stop listening
The function used when adding a listener.
The user provided data used when adding a listener
void flu_player_tunneled_playback_set (FluPlayer *thiz, gboolean enable);
If TRUE, it will try to enable tunneled playback mode Has to be called before flu_player_uri_open()
Enables Android tunneled playback when the stream and the video codec supports it. Tunneled playback provides better decoding performance on Android, specially for 4K/UHD streams, with smoother playback and less GPU resources usage. When enabled, tunneled playback will be automaticalle activated when it's supported by the video codec and when the source has at least one audio stream that must be active.
https://source.android.com/devices/tv/multimedia-tunneling
Since: 1.1
To either enable or not the tunneling playback
gboolean flu_player_tunneled_playback_get (FluPlayer *thiz);
typedef struct { } FluPlayer;
An opaque structure representing a media player instance.