14 virtual void FB2KAPI on_playback_seek(
double p_time) = 0;
16 virtual void FB2KAPI on_playback_pause(
bool p_state) = 0;
20 virtual void FB2KAPI on_playback_dynamic_info(
const file_info & p_info) = 0;
22 virtual void FB2KAPI on_playback_dynamic_info_track(
const file_info & p_info) = 0;
24 virtual void FB2KAPI on_playback_time(
double p_time) = 0;
27 virtual void FB2KAPI on_volume_change(
float p_new_val) = 0;
30 flag_on_playback_starting = 1 << 0,
31 flag_on_playback_new_track = 1 << 1,
32 flag_on_playback_stop = 1 << 2,
33 flag_on_playback_seek = 1 << 3,
34 flag_on_playback_pause = 1 << 4,
35 flag_on_playback_edited = 1 << 5,
36 flag_on_playback_dynamic_info = 1 << 6,
37 flag_on_playback_dynamic_info_track = 1 << 7,
38 flag_on_playback_time = 1 << 8,
39 flag_on_volume_change = 1 << 9,
41 flag_on_playback_all = flag_on_playback_starting | flag_on_playback_new_track |
42 flag_on_playback_stop | flag_on_playback_seek |
43 flag_on_playback_pause | flag_on_playback_edited |
44 flag_on_playback_dynamic_info | flag_on_playback_dynamic_info_track | flag_on_playback_time,
61 virtual void FB2KAPI register_callback(
play_callback * p_callback,
unsigned p_flags,
bool p_forward_status_on_register) = 0;
64 virtual void FB2KAPI unregister_callback(
play_callback * p_callback) = 0;
80 api->unregister_callback(
this);
81 api->register_callback(
this,flags,refresh);
101 virtual unsigned get_flags() = 0;
131 t_uint32 flags = flag_on_playback_starting | flag_on_playback_new_track | flag_on_playback_stop | flag_on_playback_pause | flag_on_playback_edited | flag_on_volume_change;
~play_callback_impl_base()
void on_playback_dynamic_info(const file_info &p_info)
Dynamic info (VBR bitrate etc) change.
void on_volume_change(float p_new_val)
User changed volume settings. Possibly called when not playing.
static t_uint32 GrabCBFlags(playback_control::t_display_level level)
display_level_basic + dynamic track titles on e.g. live streams
void on_playback_new_track(metadb_handle_ptr p_track)
Playback advanced to new track.
void on_playback_seek(double p_time)
User has seeked to specific time.
play_callback_impl_base(unsigned p_flags=~0)
void on_playback_time(double p_time)
Called every second, for time display.
void on_playback_starting(play_control::t_track_command p_command, bool p_paused)
Playback process is being initialized. on_playback_new_track() should be called soon after this when ...
display_level_titles + timing + VBR bitrate display etc
void on_playback_dynamic_info_track(const file_info &p_info)
Per-track dynamic info (stream track titles etc) change. Happens less often than on_playback_dynamic_...
void on_playback_pause(bool p_state)
Called on pause/unpause.
Main interface class for information about some playable object.
void on_volume_change(float p_new_val)
User changed volume settings. Possibly called when not playing.
Gets notified about tracks being played. Notification occurs when at least 60s of the track has been ...
virtual void on_playback_event()
void on_volume_change(float p_new_val)
User changed volume settings. Possibly called when not playing.
Base class for all service classes. Provides interfaces for reference counter and querying for differ...
void play_callback_reregister(unsigned flags, bool refresh=false)
Standard API (always present); manages registrations of dynamic play_callbacks. Usage: use static_api...
void on_playback_stop(play_control::t_stop_reason p_reason)
Playback stopped.
t_display_level
Type used to indicate level of dynamic playback-related info displayed. Safe to use with <> opereator...
void on_playback_edited(metadb_handle_ptr p_track)
Called when currently played file gets edited.
void on_playback_time(double p_time)
Called every second, for time display.
void on_playback_seek(double p_time)
User has seeked to specific time.
Static (autoregistered) version of play_callback. Use play_callback_static_factory_t to register...
void on_playback_new_track(metadb_handle_ptr p_track)
Playback advanced to new track.
playback_event_notify(playback_control::t_display_level level=playback_control::display_level_all)
void on_playback_dynamic_info(const file_info &p_info)
Dynamic info (VBR bitrate etc) change.
Helper template used to easily access core services. Usage: static_api_ptr_t<myclass> api; api->doso...
void on_playback_pause(bool p_state)
Called on pause/unpause.
Helper providing a simplified interface for receiving playback events, in case your code does not car...
void on_playback_starting(play_control::t_track_command p_command, bool p_paused)
Playback process is being initialized. on_playback_new_track() should be called soon after this when ...
void on_playback_stop(play_control::t_stop_reason p_reason)
Playback stopped.
void on_playback_edited(metadb_handle_ptr p_track)
Called when currently played file gets edited.
void on_playback_dynamic_info_track(const file_info &p_info)
Per-track dynamic info (stream track titles etc) change. Happens less often than on_playback_dynamic_...