gmerlin
|
Macros | |
#define | BG_PLAY_FLAG_IGNORE_IF_PLAYING (1<<0) |
Ignore play command, if the player is already playing. More... | |
#define | BG_PLAY_FLAG_IGNORE_IF_STOPPED (1<<1) |
Ignore play command, if the player is stopped. More... | |
#define | BG_PLAY_FLAG_INIT_THEN_PAUSE (1<<2) |
Initialize but go to pause status after. More... | |
#define | BG_PLAY_FLAG_RESUME (1<<3) |
If the player is paused, resume currently played track. More... | |
Functions | |
void | bg_player_play (bg_player_t *player, bg_plugin_handle_t *handle, int track, int flags, const char *track_name) |
Play a track. More... | |
void | bg_player_seek (bg_player_t *player, gavl_time_t time, int scale) |
Seek to a specific time. More... | |
void | bg_player_seek_rel (bg_player_t *player, gavl_time_t time) |
Seek relative by a specific time. More... | |
void | bg_player_set_volume (bg_player_t *player, float volume) |
Set the volume. More... | |
void | bg_player_set_volume_rel (bg_player_t *player, float volume) |
Set the volume relative. More... | |
void | bg_player_stop (bg_player_t *player) |
Stop playback. More... | |
void | bg_player_pause (bg_player_t *player) |
Toggle pause. More... | |
void | bg_player_error (bg_player_t *player) |
Trigger an error. More... | |
void | bg_player_set_oa_plugin (bg_player_t *player, bg_plugin_handle_t *handle) |
Set audio output plugin. More... | |
void | bg_player_set_ov_plugin (bg_player_t *player, bg_plugin_handle_t *handle) |
Set video output plugin. More... | |
void | bg_player_set_audio_stream (bg_player_t *player, int stream) |
Set audio stream. More... | |
void | bg_player_set_video_stream (bg_player_t *player, int stream) |
Set video stream. More... | |
void | bg_player_set_subtitle_stream (bg_player_t *player, int stream) |
Set subtitle stream. More... | |
void | bg_player_change (bg_player_t *player, int flags) |
Shut down playback. More... | |
void | bg_player_toggle_mute (bg_player_t *player) |
Toggle mute. More... | |
void | bg_player_set_chapter (bg_player_t *player, int chapter) |
Goto a specified chapter. More... | |
void | bg_player_next_chapter (bg_player_t *player) |
Goto the next chapter. More... | |
void | bg_player_prev_chapter (bg_player_t *player) |
Goto the previous chapter. More... | |
void | bg_player_interrupt (bg_player_t *player) |
Interrupt playback. More... | |
void | bg_player_interrupt_resume (bg_player_t *player) |
Resume an interrupted playback. More... | |
Most of these are called in an aynchronous manner.
#define BG_PLAY_FLAG_IGNORE_IF_PLAYING (1<<0) |
Ignore play command, if the player is already playing.
#define BG_PLAY_FLAG_IGNORE_IF_STOPPED (1<<1) |
Ignore play command, if the player is stopped.
#define BG_PLAY_FLAG_INIT_THEN_PAUSE (1<<2) |
Initialize but go to pause status after.
#define BG_PLAY_FLAG_RESUME (1<<3) |
If the player is paused, resume currently played track.
void bg_player_play | ( | bg_player_t * | player, |
bg_plugin_handle_t * | handle, | ||
int | track, | ||
int | flags, | ||
const char * | track_name | ||
) |
Play a track.
player | A player |
handle | Handle of an open input plugin |
track | Track index to select (starting with 0) |
flags | A combination of BG_PLAY_FLAG_* flags |
track_name | Name of the track to broadcast |
void bg_player_seek | ( | bg_player_t * | player, |
gavl_time_t | time, | ||
int | scale | ||
) |
Seek to a specific time.
player | A player |
time | Time to seek to |
scale | Timescale by which the time is scaled |
void bg_player_seek_rel | ( | bg_player_t * | player, |
gavl_time_t | time | ||
) |
Seek relative by a specific time.
player | A player |
time | Time offset (can be negative to seek backwards) |
void bg_player_set_volume | ( | bg_player_t * | player, |
float | volume | ||
) |
Set the volume.
player | A player |
volume | Volume (in dB, max is 0.0) |
void bg_player_set_volume_rel | ( | bg_player_t * | player, |
float | volume | ||
) |
Set the volume relative.
player | A player |
volume | Volume offset (in dB) |
void bg_player_stop | ( | bg_player_t * | player | ) |
Stop playback.
player | A player |
void bg_player_pause | ( | bg_player_t * | player | ) |
Toggle pause.
player | A player |
void bg_player_error | ( | bg_player_t * | player | ) |
Trigger an error.
player | A player |
void bg_player_set_oa_plugin | ( | bg_player_t * | player, |
bg_plugin_handle_t * | handle | ||
) |
Set audio output plugin.
player | A player |
handle | A plugin handle |
void bg_player_set_ov_plugin | ( | bg_player_t * | player, |
bg_plugin_handle_t * | handle | ||
) |
Set video output plugin.
player | A player |
handle | A plugin handle |
void bg_player_set_audio_stream | ( | bg_player_t * | player, |
int | stream | ||
) |
Set audio stream.
player | A player |
stream | Stream index (starts with 0, -1 means no audio playback) |
void bg_player_set_video_stream | ( | bg_player_t * | player, |
int | stream | ||
) |
Set video stream.
player | A player |
stream | Stream index (starts with 0, -1 means no video playback) |
void bg_player_set_subtitle_stream | ( | bg_player_t * | player, |
int | stream | ||
) |
Set subtitle stream.
player | A player |
stream | Stream index (starts with 0, -1 means no subtitle playback) |
void bg_player_change | ( | bg_player_t * | player, |
int | flags | ||
) |
Shut down playback.
player | A player |
flags | A combination of BG_PLAY_FLAG_* flags |
void bg_player_toggle_mute | ( | bg_player_t * | player | ) |
Toggle mute.
player | A player |
void bg_player_set_chapter | ( | bg_player_t * | player, |
int | chapter | ||
) |
Goto a specified chapter.
player | A player |
chapter | Chapter index (starting with 0) |
void bg_player_next_chapter | ( | bg_player_t * | player | ) |
Goto the next chapter.
player | A player |
void bg_player_prev_chapter | ( | bg_player_t * | player | ) |
Goto the previous chapter.
player | A player |
void bg_player_interrupt | ( | bg_player_t * | player | ) |
Interrupt playback.
player | A player |
This function works synchonously, this means it is garantueed, that all playback threads are stopped until bg_player_interrupt_resume is called.
void bg_player_interrupt_resume | ( | bg_player_t * | player | ) |
Resume an interrupted playback.
player | A player |