#include <playback_control.h>

Public Types | |
| enum | t_stop_reason { stop_reason_user = 0, stop_reason_eof, stop_reason_starting_another, stop_reason_shutting_down } |
| enum | t_track_command { track_command_default = 0, track_command_play, track_command_next, track_command_prev, track_command_settrack, track_command_rand, track_command_resume } |
| enum | t_display_level { display_level_none, display_level_basic, display_level_titles, display_level_all } |
| Type used to indicate level of dynamic playback-related info displayed. Safe to use with <> opereators, e.g. level above N always includes information rendered by level N. More... | |
| typedef playback_control | t_interface_entrypoint |
| typedef playback_control | t_interface |
| typedef service_base | t_interface_parent |
Public Member Functions | |
| virtual bool | get_now_playing (metadb_handle_ptr &p_out)=0 |
| virtual void | start (t_track_command p_command=track_command_play, bool p_paused=false)=0 |
| virtual void | stop ()=0 |
| Stops playback. | |
| virtual bool | is_playing ()=0 |
| Returns whether playback is active. | |
| virtual bool | is_paused ()=0 |
| Returns whether playback is active and in paused state. | |
| virtual void | pause (bool p_state)=0 |
| virtual bool | get_stop_after_current ()=0 |
| Retrieves stop-after-current-track option state. | |
| virtual void | set_stop_after_current (bool p_state)=0 |
| Alters stop-after-current-track option state. | |
| virtual void | set_volume (float p_value)=0 |
| virtual float | get_volume ()=0 |
| virtual void | volume_up ()=0 |
| Alters playback volume level one step up. | |
| virtual void | volume_down ()=0 |
| Alters playback volume level one step down. | |
| virtual void | volume_mute_toggle ()=0 |
| Toggles playback mute state. | |
| virtual void | playback_seek (double p_time)=0 |
| virtual void | playback_seek_delta (double p_delta)=0 |
| virtual bool | playback_can_seek ()=0 |
| Returns whether currently played track is seekable. If it's not, playback_seek/playback_seek_delta calls will be ignored. | |
| virtual double | playback_get_position ()=0 |
| Returns current playback position within currently played track, in seconds. | |
| virtual bool | playback_format_title (titleformat_hook *p_hook, pfc::string_base &p_out, const service_ptr_t< class titleformat_object > &p_script, titleformat_text_filter *p_filter, t_display_level p_level)=0 |
| bool | playback_format_title_ex (metadb_handle_ptr p_item, titleformat_hook *p_hook, pfc::string_base &p_out, const service_ptr_t< class titleformat_object > &p_script, titleformat_text_filter *p_filter, t_display_level p_level) |
| Helper; renders info about any item, including currently playing item info if the item is currently played. | |
| double | playback_get_length () |
| Helper; retrieves length of currently playing item. | |
| void | toggle_stop_after_current () |
| Toggles stop-after-current state. | |
| void | toggle_pause () |
| Toggles pause state. | |
| void | play_or_pause () |
| Starts playback if playback is inactive, otherwise toggles pause. | |
| void | play_start (t_track_command p_command=track_command_play, bool p_paused=false) |
| void | play_stop () |
Static Public Attributes | |
| static const GUID | class_guid |
Reimplemented in playback_control_v2.
Type used to indicate level of dynamic playback-related info displayed. Safe to use with <> opereators, e.g. level above N always includes information rendered by level N.
| virtual bool playback_control::get_now_playing | ( | metadb_handle_ptr & | p_out | ) | [pure virtual] |
Retrieves now playing item handle.
| virtual void playback_control::start | ( | t_track_command | p_command = track_command_play, |
|
| bool | p_paused = false | |||
| ) | [pure virtual] |
Starts playback. If playback is already active, existing process is stopped first.
| p_command | Specifies what track to start playback from. See t_track_Command enum for more info. | |
| p_paused | Specifies whether playback should be started as paused. |
| virtual void playback_control::stop | ( | ) | [pure virtual] |
Stops playback.
| virtual bool playback_control::is_playing | ( | ) | [pure virtual] |
Returns whether playback is active.
| virtual bool playback_control::is_paused | ( | ) | [pure virtual] |
Returns whether playback is active and in paused state.
| virtual void playback_control::pause | ( | bool | p_state | ) | [pure virtual] |
Toggles pause state if playback is active.
| p_state | set to true when pausing or to false when unpausing. |
| virtual bool playback_control::get_stop_after_current | ( | ) | [pure virtual] |
Retrieves stop-after-current-track option state.
| virtual void playback_control::set_stop_after_current | ( | bool | p_state | ) | [pure virtual] |
Alters stop-after-current-track option state.
| virtual void playback_control::set_volume | ( | float | p_value | ) | [pure virtual] |
Alters playback volume level.
| p_value | volume in dB; 0 for full volume. |
| virtual float playback_control::get_volume | ( | ) | [pure virtual] |
Retrieves playback volume level.
| virtual void playback_control::volume_up | ( | ) | [pure virtual] |
Alters playback volume level one step up.
| virtual void playback_control::volume_down | ( | ) | [pure virtual] |
Alters playback volume level one step down.
| virtual void playback_control::volume_mute_toggle | ( | ) | [pure virtual] |
Toggles playback mute state.
| virtual void playback_control::playback_seek | ( | double | p_time | ) | [pure virtual] |
Seeks in currenly played track to specified time.
| p_time | target time in seconds. |
| virtual void playback_control::playback_seek_delta | ( | double | p_delta | ) | [pure virtual] |
Seeks in currently played track by specified time forward or back.
| p_delta | time in seconds to seek by; can be positive to seek forward or negative to seek back. |
| virtual bool playback_control::playback_can_seek | ( | ) | [pure virtual] |
Returns whether currently played track is seekable. If it's not, playback_seek/playback_seek_delta calls will be ignored.
| virtual double playback_control::playback_get_position | ( | ) | [pure virtual] |
Returns current playback position within currently played track, in seconds.
| virtual bool playback_control::playback_format_title | ( | titleformat_hook * | p_hook, | |
| pfc::string_base & | p_out, | |||
| const service_ptr_t< class titleformat_object > & | p_script, | |||
| titleformat_text_filter * | p_filter, | |||
| t_display_level | p_level | |||
| ) | [pure virtual] |
Renders information about currently playing item.
| p_hook | Optional callback object overriding fields and functions; set to NULL if not used. | |
| p_out | String receiving the output on success. | |
| p_script | Titleformat script to use. Use titleformat_compiler service to create one. | |
| p_filter | Optional callback object allowing input to be filtered according to context (i.e. removal of linebreak characters present in tags when rendering playlist lines). Set to NULL when not used. | |
| p_level | Indicates level of dynamic playback-related info displayed. See t_display_level enum for more details. |
| bool playback_control::playback_format_title_ex | ( | metadb_handle_ptr | p_item, | |
| titleformat_hook * | p_hook, | |||
| pfc::string_base & | p_out, | |||
| const service_ptr_t< class titleformat_object > & | p_script, | |||
| titleformat_text_filter * | p_filter, | |||
| t_display_level | p_level | |||
| ) | [inline] |
Helper; renders info about any item, including currently playing item info if the item is currently played.
| double playback_control::playback_get_length | ( | ) |
Helper; retrieves length of currently playing item.
| void playback_control::toggle_stop_after_current | ( | ) | [inline] |
Toggles stop-after-current state.
| void playback_control::toggle_pause | ( | ) | [inline] |
Toggles pause state.
| void playback_control::play_or_pause | ( | ) | [inline] |
Starts playback if playback is inactive, otherwise toggles pause.
| void playback_control::play_start | ( | t_track_command | p_command = track_command_play, |
|
| bool | p_paused = false | |||
| ) | [inline] |
| void playback_control::play_stop | ( | ) | [inline] |
const GUID playback_control::class_guid [static] |
Initial value:
{ 0xbf803668, 0x2977, 0x4c71, { 0xb9, 0xab, 0x5c, 0x77, 0xc3, 0x38, 0xc9, 0x70 } }
Reimplemented in playback_control_v2.
1.5.5