Commands, which can be sent to the player
[Player]


Defines

#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.

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.
void bg_player_seek (bg_player_t *player, gavl_time_t time)
 Seek to a specific time.
void bg_player_seek_rel (bg_player_t *player, gavl_time_t time)
 Seek relative by a specific time.
void bg_player_set_volume (bg_player_t *player, float volume)
 Set the volume.
void bg_player_set_volume_rel (bg_player_t *player, float volume)
 Set the volume relative.
void bg_player_stop (bg_player_t *player)
 Stop playback.
void bg_player_pause (bg_player_t *player)
 Toggle pause.
void bg_player_error (bg_player_t *player)
 Trigger an error.
void bg_player_set_oa_plugin (bg_player_t *player, bg_plugin_handle_t *handle)
 Set audio output plugin.
void bg_player_set_ov_plugin (bg_player_t *player, bg_plugin_handle_t *handle)
 Set video output plugin.
void bg_player_set_audio_stream (bg_player_t *player, int stream)
 Set audio stream.
void bg_player_set_video_stream (bg_player_t *player, int stream)
 Set video stream.
void bg_player_set_subtitle_stream (bg_player_t *player, int stream)
 Set subtitle stream.
void bg_player_change (bg_player_t *player, int flags)
 Shut down playback.
void bg_player_toggle_mute (bg_player_t *player)
 Toggle mute.
void bg_player_set_chapter (bg_player_t *player, int chapter)
 Goto a specified chapter.
void bg_player_next_chapter (bg_player_t *player)
 Goto the next chapter.
void bg_player_prev_chapter (bg_player_t *player)
 Goto the previous chapter.
void bg_player_interrupt (bg_player_t *player)
 Interrupt playback.
void bg_player_interrupt_resume (bg_player_t *player)
 Resume an interrupted playback.

Detailed Description

Most of these are called in an aynchronous manner.

Define Documentation

#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.


Function Documentation

void bg_player_play ( bg_player_t *  player,
bg_plugin_handle_t handle,
int  track,
int  flags,
const char *  track_name 
)

Play a track.

Parameters:
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 
)

Seek to a specific time.

Parameters:
player A player
time Time to seek to

void bg_player_seek_rel ( bg_player_t *  player,
gavl_time_t  time 
)

Seek relative by a specific time.

Parameters:
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.

Parameters:
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.

Parameters:
player A player
volume Volume offset (in dB)

void bg_player_stop ( bg_player_t *  player  ) 

Stop playback.

Parameters:
player A player

void bg_player_pause ( bg_player_t *  player  ) 

Toggle pause.

Parameters:
player A player

void bg_player_error ( bg_player_t *  player  ) 

Trigger an error.

Parameters:
player A player

void bg_player_set_oa_plugin ( bg_player_t *  player,
bg_plugin_handle_t handle 
)

Set audio output plugin.

Parameters:
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.

Parameters:
player A player
handle A plugin handle

void bg_player_set_audio_stream ( bg_player_t *  player,
int  stream 
)

Set audio stream.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
player A player
flags A combination of BG_PLAY_FLAG_* flags

void bg_player_toggle_mute ( bg_player_t *  player  ) 

Toggle mute.

Parameters:
player A player

void bg_player_set_chapter ( bg_player_t *  player,
int  chapter 
)

Goto a specified chapter.

Parameters:
player A player
chapter Chapter index (starting with 0)

void bg_player_next_chapter ( bg_player_t *  player  ) 

Goto the next chapter.

Parameters:
player A player

void bg_player_prev_chapter ( bg_player_t *  player  ) 

Goto the previous chapter.

Parameters:
player A player

void bg_player_interrupt ( bg_player_t *  player  ) 

Interrupt playback.

Parameters:
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.

Parameters:
player A player


Generated on Thu Dec 18 08:24:29 2008 for gmerlin by  doxygen 1.5.7.1