Top |
gboolean (*FluPlayerListener) (FluPlayer *player
,FluPlayerEvent *event
,);
gpointer data
A player event listener definition
GList * flu_player_sources_get (FluPlayer *thiz
);
Gets the list of available sources
note: Use flu_source_list_free()
to free the returned list
void flu_player_device_open (FluPlayer *thiz
,FluDevice *device
);
Opens a hardware device
thiz |
The FluPlayer instance |
|
device |
The Device to open. Obtain it with |
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
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
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
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
gboolean flu_player_media_info_get (FluPlayer *thiz
,const FluMediaInfo **info
);
Gets the media information for the current FluPlayer
thiz |
The player to get the information from |
|
info |
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 |
[out][transfer none] |
FluPlayerState
flu_player_state_get (FluPlayer *thiz
);
Gets the playback state of FluPlayer
gboolean flu_player_duration_get (FluPlayer *thiz
,);
gint64 *duration
Gets the duration of the media set
gboolean flu_player_position_get (FluPlayer *thiz
,);
gint64 *position
Gets the current playback position
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.
thiz |
The FluPlayer to set the position to |
|
position |
The position to set specified in nanoseconds |
|
accurate |
Indicates whether the position can be approximated to increase response time or if it should be respected at all costs |
gboolean flu_player_rate_set (FluPlayer *thiz
,);
gdouble rate
Sets the playback rate reverse playback and > 1.0 for fast playback
thiz |
The FluPlayer to set the rate to |
|
rate |
The rate to set playback, 1.0 For normal rate. < 0.0 for |
gboolean flu_player_rate_get (FluPlayer *thiz
,);
gdouble *rate
Gets the playback rate
gboolean flu_player_step (FluPlayer *thiz
,);
gint64 amount
Step the current playback position, this is, advance only the specified ammount of buffers.
void flu_player_uop_get (FluPlayer *thiz
,FluUserOperation *uop
);
Gets the user operations prohibition mask
gboolean flu_player_dvd_is_supported (FluPlayer *thiz
);
Check if DVD playback is supported
gboolean flu_player_auto_switching_is_supported (FluPlayer *thiz
);
Check if the network auto switching is supported
gboolean flu_player_auto_switching_get (FluPlayer *thiz
);
Gets the state of the network auto switching property
void flu_player_auto_switching_set (FluPlayer *thiz
,);
gboolean enable
Sets the state of the network auto switching property
thiz |
The FluPlayer to set the state of the property to |
|
enable |
|
gboolean flu_player_spdif_is_supported (FluPlayer *thiz
);
Check if SPDIF is supported
gboolean flu_player_spdif_get (FluPlayer *thiz
);
Gets the state of the SPDIF property
void flu_player_spdif_set (FluPlayer *thiz
,);
gboolean enable
Sets the state of the SPDIF property
thiz |
The FluPlayer to set the state of the property to |
|
enable |
|
gboolean flu_player_hw_accel_is_supported (FluPlayer *thiz
);
Check if hardware acceleration is supported
gboolean flu_player_hw_accel_get (FluPlayer *thiz
);
Gets the state of the hardware acceleration property
void flu_player_hw_accel_set (FluPlayer *thiz
,);
gboolean enable
Sets the state of the hardware acceleration property
thiz |
The FluPlayer to set the state of the property to |
|
enable |
|
gboolean flu_player_normalize_downmix_get (FluPlayer *thiz
);
Gets the state of the normalize downmix property
void flu_player_normalize_downmix_set (FluPlayer *thiz
,);
gboolean enable
Sets the state of the normalize downmix property
thiz |
The FluPlayer to set the state of the property to |
|
enable |
|
GList * flu_player_streams_get (FluPlayer *thiz
);
Gets the list of available streams
note: Use flu_stream_list_free()
to free the returned list
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
void flu_player_video_active_streams_set (FluPlayer *thiz
,);
GList *streams
Sets the list of active video streams
thiz |
The FluPlayer to set the list of active video streams to |
|
streams |
The list of active video streams. |
[element-type FluStream][transfer full] |
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
void flu_player_video_ignored_streams_set (FluPlayer *thiz
,);
GList *streams
Sets the list of ignored video streams
thiz |
The FluPlayer to set the list of ignored video streams to |
|
streams |
The list of ignored video streams. |
[element-type FluStream][transfer full] |
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
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
void flu_player_audio_active_streams_set (FluPlayer *thiz
,);
GList *streams
Sets the list of active audio streams
thiz |
The FluPlayer to set the list of active audio streams to |
|
streams |
The list of active audio streams. |
[element-type FluStream][transfer full] |
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
void flu_player_audio_ignored_streams_set (FluPlayer *thiz
,);
GList *streams
Sets the list of ignored audio streams
thiz |
The FluPlayer to set the list of ignored audio streams to |
|
streams |
The list of ignored audio streams. |
[element-type FluStream][transfer full] |
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
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
void flu_player_text_active_streams_set (FluPlayer *thiz
,);
GList *streams
Sets the list of active text streams
thiz |
The FluPlayer to set the list of active text streams to |
|
streams |
The list of active text streams. |
[element-type FluStream][transfer full] |
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
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
void flu_player_data_active_streams_set (FluPlayer *thiz
,);
GList *streams
Sets the list of active data streams
thiz |
The FluPlayer to set the list of active data streams to |
|
streams |
The list of active data streams. |
[element-type FluStream][transfer full] |
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
gboolean flu_player_get_seekable_range (FluPlayer *thiz
,,
gboolean *seekable,
gint64 *start);
gint64 *end
Gets the seeking range
thiz |
The FluPlayer to get the seekable range from |
|
seekable |
whether stream is seekable or not |
|
start |
start position of seekable range in nanoseconds |
|
end |
end position of seekable range in nanoseconds |
gint flu_player_buffering_n_get (FluPlayer *thiz
);
Gets 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
thiz |
The FluPlayer to get the buffered segments info from |
|
nth |
Index of the buffered segment to query in the range of 0 to
|
|
start |
The start position of the queried buffered segment expressed in percent of total media duration (always between 0 and 100 inclusive). |
[out] |
stop |
The stop position of the queried buffered segment expressed in percent of total media duration (always between 0 and 100 inclusive). |
[out] |
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
thiz |
The FluPlayer to set the buffering policy |
|
policy |
The FluBufferingPolicy to set |
|
size |
The minimum size in bytes for the buffering queue |
|
time |
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
void flu_player_dot_graph_generate (FluPlayer *thiz
,const
);gchar *filename
Outputs a DOT file representing the current pipeline
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
GList * flu_player_bookmarks_get (FluPlayer *thiz
);
Gets the list of available bookmarks
thiz |
The FluPlayer to get the list of available bookmarks from
note Use |
gboolean flu_player_bookmark_set (FluPlayer *thiz
,FluBookmark *b
);
Sets the current bookmark
FluBookmark *
flu_player_bookmark_get (FluPlayer *thiz
);
Gets the bookmark closest to the current playback position
thiz |
The FluPlayer to get the bookmark from
note: Use |
void flu_player_user_agent_set (FluPlayer *thiz
,const
);gchar *user_agent
Sets the User-Agent HTTP request header filed
void flu_player_user_data_add (FluPlayer *thiz
,const
,gchar *key,
gpointer user_data);
GDestroyNotify destroy
Add user provided data into a player
void flu_player_user_data_remove (FluPlayer *thiz
,const
);gchar *key
Remove user provided data from a player
gpointer flu_player_user_data_get (FluPlayer *thiz
,const
);gchar *key
Get the user provided data from a player
constgchar * flu_player_state_name_get (FluPlayerState state
);
Gets a readable name of a state
void flu_player_event_listener_add (FluPlayer *thiz
,FluPlayerEventType event
,FluPlayerListener listener
,);
gpointer data
Adds an event listener on a FluPlayer
thiz |
The FluPlayer to add the event listener to |
|
event |
The FluPlayerEvent to listen to |
|
listener |
The function to be called whenever an event is received. |
[scope notified] |
data |
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
thiz |
The FluPlayer to remove the event listener from |
|
event |
The FluPlayerEvent to stop listening |
|
listener |
The function used when adding a listener. |
[scope notified] |
data |
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