diff options
Diffstat (limited to '')
-rw-r--r-- | src/Client.hxx | 2 | ||||
-rw-r--r-- | src/OutputAll.cxx | 4 | ||||
-rw-r--r-- | src/OutputAll.hxx | 6 | ||||
-rw-r--r-- | src/OutputControl.hxx | 1 | ||||
-rw-r--r-- | src/OutputInit.cxx | 2 | ||||
-rw-r--r-- | src/OutputInternal.hxx | 7 | ||||
-rw-r--r-- | src/Partition.hxx | 2 | ||||
-rw-r--r-- | src/PlayerControl.cxx | 44 | ||||
-rw-r--r-- | src/PlayerControl.hxx | 14 | ||||
-rw-r--r-- | src/PlayerThread.cxx | 18 | ||||
-rw-r--r-- | src/PlayerThread.hxx | 6 | ||||
-rw-r--r-- | src/Playlist.cxx | 20 | ||||
-rw-r--r-- | src/Playlist.hxx | 64 | ||||
-rw-r--r-- | src/PlaylistControl.cxx | 16 | ||||
-rw-r--r-- | src/PlaylistEdit.cxx | 32 | ||||
-rw-r--r-- | src/PlaylistQueue.cxx | 4 | ||||
-rw-r--r-- | src/PlaylistQueue.hxx | 6 | ||||
-rw-r--r-- | src/PlaylistSave.cxx | 2 | ||||
-rw-r--r-- | src/PlaylistSave.hxx | 4 | ||||
-rw-r--r-- | src/PlaylistState.cxx | 6 | ||||
-rw-r--r-- | src/PlaylistState.hxx | 8 | ||||
-rw-r--r-- | test/run_output.cxx | 6 |
22 files changed, 137 insertions, 137 deletions
diff --git a/src/Client.hxx b/src/Client.hxx index 586c1f264..37a3eb667 100644 --- a/src/Client.hxx +++ b/src/Client.hxx @@ -42,7 +42,7 @@ class Client final : private FullyBufferedSocket, TimeoutMonitor { public: Partition &partition; struct playlist &playlist; - struct player_control &player_control; + struct PlayerControl &player_control; unsigned permission; diff --git a/src/OutputAll.cxx b/src/OutputAll.cxx index 57bc486ce..a1207cd7a 100644 --- a/src/OutputAll.cxx +++ b/src/OutputAll.cxx @@ -103,7 +103,7 @@ audio_output_config_count(void) } void -audio_output_all_init(player_control &pc) +audio_output_all_init(PlayerControl &pc) { const struct config_param *param = nullptr; unsigned int i; @@ -469,7 +469,7 @@ audio_output_all_check(void) } bool -audio_output_all_wait(player_control &pc, unsigned threshold) +audio_output_all_wait(PlayerControl &pc, unsigned threshold) { pc.Lock(); diff --git a/src/OutputAll.hxx b/src/OutputAll.hxx index 55b7a9617..6f3ea4039 100644 --- a/src/OutputAll.hxx +++ b/src/OutputAll.hxx @@ -32,7 +32,7 @@ struct AudioFormat; class MusicBuffer; struct music_chunk; -struct player_control; +struct PlayerControl; class Error; /** @@ -40,7 +40,7 @@ class Error; * file and initialize them. */ void -audio_output_all_init(player_control &pc); +audio_output_all_init(PlayerControl &pc); /** * Global finalization: free memory occupied by audio outputs. All @@ -135,7 +135,7 @@ audio_output_all_check(void); * @return true if there are less than #threshold chunks in the pipe */ bool -audio_output_all_wait(player_control &pc, unsigned threshold); +audio_output_all_wait(PlayerControl &pc, unsigned threshold); /** * Puts all audio outputs into pause mode. Most implementations will diff --git a/src/OutputControl.hxx b/src/OutputControl.hxx index 416b07c39..d8f0b432d 100644 --- a/src/OutputControl.hxx +++ b/src/OutputControl.hxx @@ -28,7 +28,6 @@ struct audio_output; struct AudioFormat; struct config_param; class MusicPipe; -struct player_control; void audio_output_set_replay_gain_mode(struct audio_output *ao, diff --git a/src/OutputInit.cxx b/src/OutputInit.cxx index af777ca17..91f7b306f 100644 --- a/src/OutputInit.cxx +++ b/src/OutputInit.cxx @@ -281,7 +281,7 @@ audio_output_setup(struct audio_output *ao, const config_param ¶m, struct audio_output * audio_output_new(const config_param ¶m, - player_control &pc, + PlayerControl &pc, Error &error) { const struct audio_output_plugin *plugin; diff --git a/src/OutputInternal.hxx b/src/OutputInternal.hxx index a6233c5b5..2b3136f94 100644 --- a/src/OutputInternal.hxx +++ b/src/OutputInternal.hxx @@ -32,6 +32,7 @@ class Error; class Filter; class MusicPipe; struct config_param; +struct PlayerControl; typedef struct _GTimer GTimer; enum audio_output_command { @@ -225,10 +226,10 @@ struct audio_output { Cond cond; /** - * The player_control object which "owns" this output. This + * The PlayerControl object which "owns" this output. This * object is needed to signal command completion. */ - struct player_control *player_control; + PlayerControl *player_control; /** * The #music_chunk which is currently being played. All @@ -264,7 +265,7 @@ audio_output_command_is_finished(const struct audio_output *ao) struct audio_output * audio_output_new(const config_param ¶m, - player_control &pc, + PlayerControl &pc, Error &error); bool diff --git a/src/Partition.hxx b/src/Partition.hxx index dbc79b4ba..512ba3bca 100644 --- a/src/Partition.hxx +++ b/src/Partition.hxx @@ -34,7 +34,7 @@ struct Partition { struct playlist playlist; - player_control pc; + PlayerControl pc; Partition(Instance &_instance, unsigned max_length, diff --git a/src/PlayerControl.cxx b/src/PlayerControl.cxx index a0c72b4c9..c6fb7ad06 100644 --- a/src/PlayerControl.cxx +++ b/src/PlayerControl.cxx @@ -27,8 +27,8 @@ #include <assert.h> -player_control::player_control(unsigned _buffer_chunks, - unsigned _buffered_before_play) +PlayerControl::PlayerControl(unsigned _buffer_chunks, + unsigned _buffered_before_play) :buffer_chunks(_buffer_chunks), buffered_before_play(_buffered_before_play), command(PlayerCommand::NONE), @@ -50,7 +50,7 @@ player_control::player_control(unsigned _buffer_chunks, { } -player_control::~player_control() +PlayerControl::~PlayerControl() { if (next_song != nullptr) next_song->Free(); @@ -60,7 +60,7 @@ player_control::~player_control() } void -player_control::Play(Song *song) +PlayerControl::Play(Song *song) { assert(song != nullptr); @@ -79,14 +79,14 @@ player_control::Play(Song *song) } void -player_control::Cancel() +PlayerControl::Cancel() { LockSynchronousCommand(PlayerCommand::CANCEL); assert(next_song == nullptr); } void -player_control::Stop() +PlayerControl::Stop() { LockSynchronousCommand(PlayerCommand::CLOSE_AUDIO); assert(next_song == nullptr); @@ -95,13 +95,13 @@ player_control::Stop() } void -player_control::UpdateAudio() +PlayerControl::UpdateAudio() { LockSynchronousCommand(PlayerCommand::UPDATE_AUDIO); } void -player_control::Kill() +PlayerControl::Kill() { assert(thread.IsDefined()); @@ -112,7 +112,7 @@ player_control::Kill() } void -player_control::PauseLocked() +PlayerControl::PauseLocked() { if (state != PlayerState::STOP) { SynchronousCommand(PlayerCommand::PAUSE); @@ -121,7 +121,7 @@ player_control::PauseLocked() } void -player_control::Pause() +PlayerControl::Pause() { Lock(); PauseLocked(); @@ -129,7 +129,7 @@ player_control::Pause() } void -player_control::SetPause(bool pause_flag) +PlayerControl::SetPause(bool pause_flag) { Lock(); @@ -152,7 +152,7 @@ player_control::SetPause(bool pause_flag) } void -player_control::SetBorderPause(bool _border_pause) +PlayerControl::SetBorderPause(bool _border_pause) { Lock(); border_pause = _border_pause; @@ -160,7 +160,7 @@ player_control::SetBorderPause(bool _border_pause) } player_status -player_control::GetStatus() +PlayerControl::GetStatus() { player_status status; @@ -182,7 +182,7 @@ player_control::GetStatus() } void -player_control::SetError(PlayerError type, Error &&_error) +PlayerControl::SetError(PlayerError type, Error &&_error) { assert(type != PlayerError::NONE); assert(_error.IsDefined()); @@ -192,7 +192,7 @@ player_control::SetError(PlayerError type, Error &&_error) } void -player_control::ClearError() +PlayerControl::ClearError() { Lock(); @@ -205,7 +205,7 @@ player_control::ClearError() } void -player_control::LockSetTaggedSong(const Song &song) +PlayerControl::LockSetTaggedSong(const Song &song) { Lock(); if (tagged_song != nullptr) @@ -215,7 +215,7 @@ player_control::LockSetTaggedSong(const Song &song) } void -player_control::ClearTaggedSong() +PlayerControl::ClearTaggedSong() { if (tagged_song != nullptr) { tagged_song->Free(); @@ -224,7 +224,7 @@ player_control::ClearTaggedSong() } void -player_control::EnqueueSong(Song *song) +PlayerControl::EnqueueSong(Song *song) { assert(song != nullptr); @@ -234,7 +234,7 @@ player_control::EnqueueSong(Song *song) } bool -player_control::Seek(Song *song, float seek_time) +PlayerControl::Seek(Song *song, float seek_time) { assert(song != nullptr); @@ -256,7 +256,7 @@ player_control::Seek(Song *song, float seek_time) } void -player_control::SetCrossFade(float _cross_fade_seconds) +PlayerControl::SetCrossFade(float _cross_fade_seconds) { if (_cross_fade_seconds < 0) _cross_fade_seconds = 0; @@ -266,7 +266,7 @@ player_control::SetCrossFade(float _cross_fade_seconds) } void -player_control::SetMixRampDb(float _mixramp_db) +PlayerControl::SetMixRampDb(float _mixramp_db) { mixramp_db = _mixramp_db; @@ -274,7 +274,7 @@ player_control::SetMixRampDb(float _mixramp_db) } void -player_control::SetMixRampDelay(float _mixramp_delay_seconds) +PlayerControl::SetMixRampDelay(float _mixramp_delay_seconds) { mixramp_delay_seconds = _mixramp_delay_seconds; diff --git a/src/PlayerControl.hxx b/src/PlayerControl.hxx index bdfc10fec..97e15b06c 100644 --- a/src/PlayerControl.hxx +++ b/src/PlayerControl.hxx @@ -50,18 +50,18 @@ enum class PlayerCommand : uint8_t { */ UPDATE_AUDIO, - /** player_control.next_song has been updated */ + /** PlayerControl.next_song has been updated */ QUEUE, /** - * cancel pre-decoding player_control.next_song; if the player + * cancel pre-decoding PlayerControl.next_song; if the player * has already started playing this song, it will completely * stop */ CANCEL, /** - * Refresh status information in the #player_control struct, + * Refresh status information in the #PlayerControl struct, * e.g. elapsed_time. */ REFRESH, @@ -89,7 +89,7 @@ struct player_status { float elapsed_time; }; -struct player_control { +struct PlayerControl { unsigned buffer_chunks; unsigned int buffered_before_play; @@ -169,9 +169,9 @@ struct player_control { */ bool border_pause; - player_control(unsigned buffer_chunks, - unsigned buffered_before_play); - ~player_control(); + PlayerControl(unsigned buffer_chunks, + unsigned buffered_before_play); + ~PlayerControl(); /** * Locks the object. diff --git a/src/PlayerThread.cxx b/src/PlayerThread.cxx index 19ca23fac..79bfc4018 100644 --- a/src/PlayerThread.cxx +++ b/src/PlayerThread.cxx @@ -51,7 +51,7 @@ enum class CrossFadeState : int8_t { }; class Player { - player_control &pc; + PlayerControl &pc; DecoderControl &dc; @@ -130,7 +130,7 @@ class Player { float elapsed_time; public: - Player(player_control &_pc, DecoderControl &_dc, + Player(PlayerControl &_pc, DecoderControl &_dc, MusicBuffer &_buffer) :pc(_pc), dc(_dc), buffer(_buffer), buffering(false), @@ -275,7 +275,7 @@ public: }; static void -player_command_finished(player_control &pc) +player_command_finished(PlayerControl &pc) { pc.Lock(); pc.CommandFinished(); @@ -349,7 +349,7 @@ Player::WaitForDecoder() pc.Lock(); - /* update player_control's song information */ + /* update PlayerControl's song information */ pc.total_time = pc.next_song->GetDuration(); pc.bit_rate = 0; pc.audio_format.Clear(); @@ -686,7 +686,7 @@ Player::ProcessCommand() } static void -update_song_tag(player_control &pc, Song *song, const Tag &new_tag) +update_song_tag(PlayerControl &pc, Song *song, const Tag &new_tag) { if (song->IsFile()) /* don't update tags of local files, only remote @@ -717,7 +717,7 @@ update_song_tag(player_control &pc, Song *song, const Tag &new_tag) * Player lock is not held. */ static bool -play_chunk(player_control &pc, +play_chunk(PlayerControl &pc, Song *song, struct music_chunk *chunk, MusicBuffer &buffer, const AudioFormat format, @@ -1095,7 +1095,7 @@ Player::Run() } static void -do_play(player_control &pc, DecoderControl &dc, +do_play(PlayerControl &pc, DecoderControl &dc, MusicBuffer &buffer) { Player player(pc, dc, buffer); @@ -1105,7 +1105,7 @@ do_play(player_control &pc, DecoderControl &dc, static void player_task(void *arg) { - player_control &pc = *(player_control *)arg; + PlayerControl &pc = *(PlayerControl *)arg; DecoderControl dc; decoder_thread_start(dc); @@ -1193,7 +1193,7 @@ player_task(void *arg) } void -player_create(player_control &pc) +player_create(PlayerControl &pc) { assert(!pc.thread.IsDefined()); diff --git a/src/PlayerThread.hxx b/src/PlayerThread.hxx index 97e773606..efdcf05ca 100644 --- a/src/PlayerThread.hxx +++ b/src/PlayerThread.hxx @@ -26,7 +26,7 @@ * audio outputs via audio_output_all_play(). * * It is controlled by the main thread (the playlist code), see - * player_control.h. The playlist enqueues new songs into the player + * PlayerControl.hxx. The playlist enqueues new songs into the player * thread and sends it commands. * * The player thread itself does not do any I/O. It synchronizes with @@ -37,9 +37,9 @@ #ifndef MPD_PLAYER_THREAD_HXX #define MPD_PLAYER_THREAD_HXX -struct player_control; +struct PlayerControl; void -player_create(player_control &pc); +player_create(PlayerControl &pc); #endif diff --git a/src/Playlist.cxx b/src/Playlist.cxx index 134abf7ff..8d9ab24a3 100644 --- a/src/Playlist.cxx +++ b/src/Playlist.cxx @@ -49,7 +49,7 @@ playlist::TagModified(Song &&song) * Queue a song, addressed by its order number. */ static void -playlist_queue_song_order(playlist &playlist, player_control &pc, +playlist_queue_song_order(playlist &playlist, PlayerControl &pc, unsigned order) { assert(playlist.queue.IsValidOrder(order)); @@ -71,7 +71,7 @@ playlist_queue_song_order(playlist &playlist, player_control &pc, * Called if the player thread has started playing the "queued" song. */ static void -playlist_song_started(playlist &playlist, player_control &pc) +playlist_song_started(playlist &playlist, PlayerControl &pc) { assert(pc.next_song == nullptr); assert(playlist.queued >= -1); @@ -98,7 +98,7 @@ playlist::GetQueuedSong() const } void -playlist::UpdateQueuedSong(player_control &pc, const Song *prev) +playlist::UpdateQueuedSong(PlayerControl &pc, const Song *prev) { if (!playing) return; @@ -144,7 +144,7 @@ playlist::UpdateQueuedSong(player_control &pc, const Song *prev) } void -playlist::PlayOrder(player_control &pc, int order) +playlist::PlayOrder(PlayerControl &pc, int order) { playing = true; queued = -1; @@ -162,10 +162,10 @@ playlist::PlayOrder(player_control &pc, int order) } static void -playlist_resume_playback(playlist &playlist, player_control &pc); +playlist_resume_playback(playlist &playlist, PlayerControl &pc); void -playlist::SyncWithPlayer(player_control &pc) +playlist::SyncWithPlayer(PlayerControl &pc) { if (!playing) /* this event has reached us out of sync: we aren't @@ -205,7 +205,7 @@ playlist::SyncWithPlayer(player_control &pc) * decide whether to re-start playback */ static void -playlist_resume_playback(playlist &playlist, player_control &pc) +playlist_resume_playback(playlist &playlist, PlayerControl &pc) { assert(playlist.playing); assert(pc.GetState() == PlayerState::STOP); @@ -228,7 +228,7 @@ playlist_resume_playback(playlist &playlist, player_control &pc) } void -playlist::SetRepeat(player_control &pc, bool status) +playlist::SetRepeat(PlayerControl &pc, bool status) { if (status == queue.repeat) return; @@ -255,7 +255,7 @@ playlist_order(playlist &playlist) } void -playlist::SetSingle(player_control &pc, bool status) +playlist::SetSingle(PlayerControl &pc, bool status) { if (status == queue.single) return; @@ -282,7 +282,7 @@ playlist::SetConsume(bool status) } void -playlist::SetRandom(player_control &pc, bool status) +playlist::SetRandom(PlayerControl &pc, bool status) { if (status == queue.random) return; diff --git a/src/Playlist.hxx b/src/Playlist.hxx index ed397eadc..5875ff4d8 100644 --- a/src/Playlist.hxx +++ b/src/Playlist.hxx @@ -23,7 +23,7 @@ #include "Queue.hxx" #include "PlaylistError.hxx" -struct player_control; +struct PlayerControl; struct Song; struct playlist { @@ -105,7 +105,7 @@ struct playlist { * player thread whenever it requests a new queued song, or * when it exits. */ - void SyncWithPlayer(player_control &pc); + void SyncWithPlayer(PlayerControl &pc); protected: /** @@ -123,10 +123,10 @@ protected: * @param prev the song which was previously queued, as * determined by playlist_get_queued_song() */ - void UpdateQueuedSong(player_control &pc, const Song *prev); + void UpdateQueuedSong(PlayerControl &pc, const Song *prev); public: - void Clear(player_control &pc); + void Clear(PlayerControl &pc); /** * A tag in the play queue has been modified by the player @@ -140,7 +140,7 @@ public: */ void DatabaseModified(); - PlaylistResult AppendSong(player_control &pc, + PlaylistResult AppendSong(PlayerControl &pc, Song *song, unsigned *added_id=nullptr); @@ -150,28 +150,28 @@ public: * * Note: the caller is responsible for checking permissions. */ - PlaylistResult AppendFile(player_control &pc, + PlaylistResult AppendFile(PlayerControl &pc, const char *path_utf8, unsigned *added_id=nullptr); - PlaylistResult AppendURI(player_control &pc, + PlaylistResult AppendURI(PlayerControl &pc, const char *uri_utf8, unsigned *added_id=nullptr); protected: - void DeleteInternal(player_control &pc, + void DeleteInternal(PlayerControl &pc, unsigned song, const Song **queued_p); public: - PlaylistResult DeletePosition(player_control &pc, + PlaylistResult DeletePosition(PlayerControl &pc, unsigned position); - PlaylistResult DeleteOrder(player_control &pc, + PlaylistResult DeleteOrder(PlayerControl &pc, unsigned order) { return DeletePosition(pc, queue.OrderToPosition(order)); } - PlaylistResult DeleteId(player_control &pc, unsigned id); + PlaylistResult DeleteId(PlayerControl &pc, unsigned id); /** * Deletes a range of songs from the playlist. @@ -179,49 +179,49 @@ public: * @param start the position of the first song to delete * @param end the position after the last song to delete */ - PlaylistResult DeleteRange(player_control &pc, + PlaylistResult DeleteRange(PlayerControl &pc, unsigned start, unsigned end); - void DeleteSong(player_control &pc, const Song &song); + void DeleteSong(PlayerControl &pc, const Song &song); - void Shuffle(player_control &pc, unsigned start, unsigned end); + void Shuffle(PlayerControl &pc, unsigned start, unsigned end); - PlaylistResult MoveRange(player_control &pc, + PlaylistResult MoveRange(PlayerControl &pc, unsigned start, unsigned end, int to); - PlaylistResult MoveId(player_control &pc, unsigned id, int to); + PlaylistResult MoveId(PlayerControl &pc, unsigned id, int to); - PlaylistResult SwapPositions(player_control &pc, + PlaylistResult SwapPositions(PlayerControl &pc, unsigned song1, unsigned song2); - PlaylistResult SwapIds(player_control &pc, + PlaylistResult SwapIds(PlayerControl &pc, unsigned id1, unsigned id2); - PlaylistResult SetPriorityRange(player_control &pc, + PlaylistResult SetPriorityRange(PlayerControl &pc, unsigned start_position, unsigned end_position, uint8_t priority); - PlaylistResult SetPriorityId(player_control &pc, + PlaylistResult SetPriorityId(PlayerControl &pc, unsigned song_id, uint8_t priority); - void Stop(player_control &pc); + void Stop(PlayerControl &pc); - PlaylistResult PlayPosition(player_control &pc, int position); + PlaylistResult PlayPosition(PlayerControl &pc, int position); - void PlayOrder(player_control &pc, int order); + void PlayOrder(PlayerControl &pc, int order); - PlaylistResult PlayId(player_control &pc, int id); + PlaylistResult PlayId(PlayerControl &pc, int id); - void PlayNext(player_control &pc); + void PlayNext(PlayerControl &pc); - void PlayPrevious(player_control &pc); + void PlayPrevious(PlayerControl &pc); - PlaylistResult SeekSongPosition(player_control &pc, + PlaylistResult SeekSongPosition(PlayerControl &pc, unsigned song_position, float seek_time); - PlaylistResult SeekSongId(player_control &pc, + PlaylistResult SeekSongId(PlayerControl &pc, unsigned song_id, float seek_time); /** @@ -232,26 +232,26 @@ public: * @param relative if true, then the specified time is relative to the * current position */ - PlaylistResult SeekCurrent(player_control &pc, + PlaylistResult SeekCurrent(PlayerControl &pc, float seek_time, bool relative); bool GetRepeat() const { return queue.repeat; } - void SetRepeat(player_control &pc, bool new_value); + void SetRepeat(PlayerControl &pc, bool new_value); bool GetRandom() const { return queue.random; } - void SetRandom(player_control &pc, bool new_value); + void SetRandom(PlayerControl &pc, bool new_value); bool GetSingle() const { return queue.single; } - void SetSingle(player_control &pc, bool new_value); + void SetSingle(PlayerControl &pc, bool new_value); bool GetConsume() const { return queue.consume; diff --git a/src/PlaylistControl.cxx b/src/PlaylistControl.cxx index 97db2a184..2dbd75d6e 100644 --- a/src/PlaylistControl.cxx +++ b/src/PlaylistControl.cxx @@ -30,7 +30,7 @@ #include "Log.hxx" void -playlist::Stop(player_control &pc) +playlist::Stop(PlayerControl &pc) { if (!playing) return; @@ -57,7 +57,7 @@ playlist::Stop(player_control &pc) } PlaylistResult -playlist::PlayPosition(player_control &pc, int song) +playlist::PlayPosition(PlayerControl &pc, int song) { pc.ClearError(); @@ -107,7 +107,7 @@ playlist::PlayPosition(player_control &pc, int song) } PlaylistResult -playlist::PlayId(player_control &pc, int id) +playlist::PlayId(PlayerControl &pc, int id) { if (id == -1) return PlayPosition(pc, id); @@ -120,7 +120,7 @@ playlist::PlayId(player_control &pc, int id) } void -playlist::PlayNext(player_control &pc) +playlist::PlayNext(PlayerControl &pc) { if (!playing) return; @@ -166,7 +166,7 @@ playlist::PlayNext(player_control &pc) } void -playlist::PlayPrevious(player_control &pc) +playlist::PlayPrevious(PlayerControl &pc) { if (!playing) return; @@ -190,7 +190,7 @@ playlist::PlayPrevious(player_control &pc) } PlaylistResult -playlist::SeekSongPosition(player_control &pc, unsigned song, float seek_time) +playlist::SeekSongPosition(PlayerControl &pc, unsigned song, float seek_time) { if (!queue.IsValidPosition(song)) return PlaylistResult::BAD_RANGE; @@ -229,7 +229,7 @@ playlist::SeekSongPosition(player_control &pc, unsigned song, float seek_time) } PlaylistResult -playlist::SeekSongId(player_control &pc, unsigned id, float seek_time) +playlist::SeekSongId(PlayerControl &pc, unsigned id, float seek_time) { int song = queue.IdToPosition(id); if (song < 0) @@ -239,7 +239,7 @@ playlist::SeekSongId(player_control &pc, unsigned id, float seek_time) } PlaylistResult -playlist::SeekCurrent(player_control &pc, float seek_time, bool relative) +playlist::SeekCurrent(PlayerControl &pc, float seek_time, bool relative) { if (!playing) return PlaylistResult::NOT_PLAYING; diff --git a/src/PlaylistEdit.cxx b/src/PlaylistEdit.cxx index 80916adaf..668612a1a 100644 --- a/src/PlaylistEdit.cxx +++ b/src/PlaylistEdit.cxx @@ -46,7 +46,7 @@ playlist::OnModified() } void -playlist::Clear(player_control &pc) +playlist::Clear(PlayerControl &pc) { Stop(pc); @@ -57,7 +57,7 @@ playlist::Clear(player_control &pc) } PlaylistResult -playlist::AppendFile(struct player_control &pc, +playlist::AppendFile(PlayerControl &pc, const char *path_utf8, unsigned *added_id) { Song *song = Song::LoadFile(path_utf8, nullptr); @@ -70,7 +70,7 @@ playlist::AppendFile(struct player_control &pc, } PlaylistResult -playlist::AppendSong(struct player_control &pc, +playlist::AppendSong(PlayerControl &pc, Song *song, unsigned *added_id) { unsigned id; @@ -105,7 +105,7 @@ playlist::AppendSong(struct player_control &pc, } PlaylistResult -playlist::AppendURI(struct player_control &pc, +playlist::AppendURI(PlayerControl &pc, const char *uri, unsigned *added_id) { FormatDebug(playlist_domain, "add to playlist: %s", uri); @@ -134,7 +134,7 @@ playlist::AppendURI(struct player_control &pc, } PlaylistResult -playlist::SwapPositions(player_control &pc, unsigned song1, unsigned song2) +playlist::SwapPositions(PlayerControl &pc, unsigned song1, unsigned song2) { if (!queue.IsValidPosition(song1) || !queue.IsValidPosition(song2)) return PlaylistResult::BAD_RANGE; @@ -165,7 +165,7 @@ playlist::SwapPositions(player_control &pc, unsigned song1, unsigned song2) } PlaylistResult -playlist::SwapIds(player_control &pc, unsigned id1, unsigned id2) +playlist::SwapIds(PlayerControl &pc, unsigned id1, unsigned id2) { int song1 = queue.IdToPosition(id1); int song2 = queue.IdToPosition(id2); @@ -177,7 +177,7 @@ playlist::SwapIds(player_control &pc, unsigned id1, unsigned id2) } PlaylistResult -playlist::SetPriorityRange(player_control &pc, +playlist::SetPriorityRange(PlayerControl &pc, unsigned start, unsigned end, uint8_t priority) { @@ -211,7 +211,7 @@ playlist::SetPriorityRange(player_control &pc, } PlaylistResult -playlist::SetPriorityId(struct player_control &pc, +playlist::SetPriorityId(PlayerControl &pc, unsigned song_id, uint8_t priority) { int song_position = queue.IdToPosition(song_id); @@ -224,7 +224,7 @@ playlist::SetPriorityId(struct player_control &pc, } void -playlist::DeleteInternal(player_control &pc, +playlist::DeleteInternal(PlayerControl &pc, unsigned song, const Song **queued_p) { assert(song < GetLength()); @@ -270,7 +270,7 @@ playlist::DeleteInternal(player_control &pc, } PlaylistResult -playlist::DeletePosition(struct player_control &pc, unsigned song) +playlist::DeletePosition(PlayerControl &pc, unsigned song) { if (song >= queue.GetLength()) return PlaylistResult::BAD_RANGE; @@ -286,7 +286,7 @@ playlist::DeletePosition(struct player_control &pc, unsigned song) } PlaylistResult -playlist::DeleteRange(struct player_control &pc, unsigned start, unsigned end) +playlist::DeleteRange(PlayerControl &pc, unsigned start, unsigned end) { if (start >= queue.GetLength()) return PlaylistResult::BAD_RANGE; @@ -310,7 +310,7 @@ playlist::DeleteRange(struct player_control &pc, unsigned start, unsigned end) } PlaylistResult -playlist::DeleteId(struct player_control &pc, unsigned id) +playlist::DeleteId(PlayerControl &pc, unsigned id) { int song = queue.IdToPosition(id); if (song < 0) @@ -320,7 +320,7 @@ playlist::DeleteId(struct player_control &pc, unsigned id) } void -playlist::DeleteSong(struct player_control &pc, const struct Song &song) +playlist::DeleteSong(PlayerControl &pc, const struct Song &song) { for (int i = queue.GetLength() - 1; i >= 0; --i) if (SongEquals(song, queue.Get(i))) @@ -328,7 +328,7 @@ playlist::DeleteSong(struct player_control &pc, const struct Song &song) } PlaylistResult -playlist::MoveRange(player_control &pc, unsigned start, unsigned end, int to) +playlist::MoveRange(PlayerControl &pc, unsigned start, unsigned end, int to) { if (!queue.IsValidPosition(start) || !queue.IsValidPosition(end - 1)) return PlaylistResult::BAD_RANGE; @@ -381,7 +381,7 @@ playlist::MoveRange(player_control &pc, unsigned start, unsigned end, int to) } PlaylistResult -playlist::MoveId(player_control &pc, unsigned id1, int to) +playlist::MoveId(PlayerControl &pc, unsigned id1, int to) { int song = queue.IdToPosition(id1); if (song < 0) @@ -391,7 +391,7 @@ playlist::MoveId(player_control &pc, unsigned id1, int to) } void -playlist::Shuffle(player_control &pc, unsigned start, unsigned end) +playlist::Shuffle(PlayerControl &pc, unsigned start, unsigned end) { if (end > GetLength()) /* correct the "end" offset */ diff --git a/src/PlaylistQueue.cxx b/src/PlaylistQueue.cxx index 5d7773a86..a8359d427 100644 --- a/src/PlaylistQueue.cxx +++ b/src/PlaylistQueue.cxx @@ -32,7 +32,7 @@ PlaylistResult playlist_load_into_queue(const char *uri, SongEnumerator &e, unsigned start_index, unsigned end_index, - playlist &dest, player_control &pc, + playlist &dest, PlayerControl &pc, bool secure) { const std::string base_uri = uri != nullptr @@ -66,7 +66,7 @@ playlist_load_into_queue(const char *uri, SongEnumerator &e, PlaylistResult playlist_open_into_queue(const char *uri, unsigned start_index, unsigned end_index, - playlist &dest, player_control &pc, + playlist &dest, PlayerControl &pc, bool secure) { Mutex mutex; diff --git a/src/PlaylistQueue.hxx b/src/PlaylistQueue.hxx index 503b6bbb0..fc566ec78 100644 --- a/src/PlaylistQueue.hxx +++ b/src/PlaylistQueue.hxx @@ -28,7 +28,7 @@ class SongEnumerator; struct playlist; -struct player_control; +struct PlayerControl; /** * Loads the contents of a playlist and append it to the specified @@ -42,7 +42,7 @@ struct player_control; PlaylistResult playlist_load_into_queue(const char *uri, SongEnumerator &e, unsigned start_index, unsigned end_index, - playlist &dest, player_control &pc, + playlist &dest, PlayerControl &pc, bool secure); /** @@ -52,7 +52,7 @@ playlist_load_into_queue(const char *uri, SongEnumerator &e, PlaylistResult playlist_open_into_queue(const char *uri, unsigned start_index, unsigned end_index, - playlist &dest, player_control &pc, + playlist &dest, PlayerControl &pc, bool secure); #endif diff --git a/src/PlaylistSave.cxx b/src/PlaylistSave.cxx index bbac33a74..481d9bf75 100644 --- a/src/PlaylistSave.cxx +++ b/src/PlaylistSave.cxx @@ -101,7 +101,7 @@ spl_save_playlist(const char *name_utf8, const playlist &playlist) } bool -playlist_load_spl(struct playlist &playlist, player_control &pc, +playlist_load_spl(struct playlist &playlist, PlayerControl &pc, const char *name_utf8, unsigned start_index, unsigned end_index, Error &error) diff --git a/src/PlaylistSave.hxx b/src/PlaylistSave.hxx index fb1bf2022..983563e3c 100644 --- a/src/PlaylistSave.hxx +++ b/src/PlaylistSave.hxx @@ -27,7 +27,7 @@ struct Song; struct queue; struct playlist; -struct player_control; +struct PlayerControl; class Error; void @@ -53,7 +53,7 @@ spl_save_playlist(const char *name_utf8, const playlist &playlist); * playlist. */ bool -playlist_load_spl(struct playlist &playlist, player_control &pc, +playlist_load_spl(struct playlist &playlist, PlayerControl &pc, const char *name_utf8, unsigned start_index, unsigned end_index, Error &error); diff --git a/src/PlaylistState.cxx b/src/PlaylistState.cxx index 64b30f066..af89bc2d1 100644 --- a/src/PlaylistState.cxx +++ b/src/PlaylistState.cxx @@ -60,7 +60,7 @@ void playlist_state_save(FILE *fp, const struct playlist &playlist, - player_control &pc) + PlayerControl &pc) { const auto player_status = pc.GetStatus(); @@ -128,7 +128,7 @@ playlist_state_load(TextFile &file, struct playlist &playlist) bool playlist_state_restore(const char *line, TextFile &file, - struct playlist &playlist, player_control &pc) + struct playlist &playlist, PlayerControl &pc) { int current = -1; int seek_time = 0; @@ -217,7 +217,7 @@ playlist_state_restore(const char *line, TextFile &file, unsigned playlist_state_get_hash(const playlist &playlist, - player_control &pc) + PlayerControl &pc) { const auto player_status = pc.GetStatus(); diff --git a/src/PlaylistState.hxx b/src/PlaylistState.hxx index 339ac1061..01cc94d03 100644 --- a/src/PlaylistState.hxx +++ b/src/PlaylistState.hxx @@ -28,16 +28,16 @@ #include <stdio.h> struct playlist; -struct player_control; +struct PlayerControl; class TextFile; void playlist_state_save(FILE *fp, const struct playlist &playlist, - player_control &pc); + PlayerControl &pc); bool playlist_state_restore(const char *line, TextFile &file, - struct playlist &playlist, player_control &pc); + struct playlist &playlist, PlayerControl &pc); /** * Generates a hash number for the current state of the playlist and @@ -47,6 +47,6 @@ playlist_state_restore(const char *line, TextFile &file, */ unsigned playlist_state_get_hash(const struct playlist &playlist, - player_control &c); + PlayerControl &c); #endif diff --git a/test/run_output.cxx b/test/run_output.cxx index 0bcad149f..7982bd7de 100644 --- a/test/run_output.cxx +++ b/test/run_output.cxx @@ -72,9 +72,9 @@ find_named_config_block(ConfigOption option, const char *name) return NULL; } -player_control::player_control(gcc_unused unsigned _buffer_chunks, +PlayerControl::PlayerControl(gcc_unused unsigned _buffer_chunks, gcc_unused unsigned _buffered_before_play) {} -player_control::~player_control() {} +PlayerControl::~PlayerControl() {} static struct audio_output * load_audio_output(const char *name) @@ -87,7 +87,7 @@ load_audio_output(const char *name) return nullptr; } - static struct player_control dummy_player_control(32, 4); + static struct PlayerControl dummy_player_control(32, 4); Error error; struct audio_output *ao = |