Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
ccea6dd7
Commit
ccea6dd7
authored
Oct 28, 2015
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
player/Thread: rename WaitForDecoder() to ActivateDecoder()
.. and fix its API documentation.
parent
166b490e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
10 deletions
+15
-10
Thread.cxx
src/player/Thread.cxx
+15
-10
No files found.
src/player/Thread.cxx
View file @
ccea6dd7
...
...
@@ -195,7 +195,7 @@ private:
/**
* The decoder has acknowledged the "START" command (see
*
player::WaitFor
Decoder()). This function checks if the decoder
*
Activate
Decoder()). This function checks if the decoder
* initialization has completed yet.
*
* The player lock is not held.
...
...
@@ -248,14 +248,19 @@ private:
bool
ForwardDecoderError
();
/**
* After the decoder has been started asynchronously, wait for
* the "START" command to finish. The decoder may not be
* initialized yet, i.e. there is no audio_format information
* yet.
* After the decoder has been started asynchronously, activate
* it for playback. That is, make the currently decoded song
* active (assign it to #song), clear PlayerControl::next_song
* and #queued, initialize #elapsed_time, and set
* #decoder_starting.
*
* When returning, the decoder may not have completed startup
* yet, therefore we don't know the audio format yet. To
* finish decoder startup, call CheckDecoderStartup().
*
* The player lock is not held.
*/
bool
WaitFor
Decoder
();
bool
Activate
Decoder
();
/**
* Wrapper for MultipleOutputs::Open(). Upon failure, it
...
...
@@ -365,7 +370,7 @@ Player::ForwardDecoderError()
}
bool
Player
::
WaitFor
Decoder
()
Player
::
Activate
Decoder
()
{
assert
(
queued
||
pc
.
command
==
PlayerCommand
::
SEEK
);
assert
(
pc
.
next_song
!=
nullptr
);
...
...
@@ -574,7 +579,7 @@ Player::SeekDecoder()
/* re-start the decoder */
StartDecoder
(
*
pipe
);
if
(
!
WaitFor
Decoder
())
{
if
(
!
Activate
Decoder
())
{
/* decoder failure */
player_command_finished
(
pc
);
return
false
;
...
...
@@ -937,7 +942,7 @@ Player::SongBorder()
pc
.
outputs
.
SongBorder
();
if
(
!
WaitFor
Decoder
())
if
(
!
Activate
Decoder
())
return
false
;
pc
.
Lock
();
...
...
@@ -962,7 +967,7 @@ Player::Run()
pipe
=
new
MusicPipe
();
StartDecoder
(
*
pipe
);
if
(
!
WaitFor
Decoder
())
{
if
(
!
Activate
Decoder
())
{
assert
(
song
==
nullptr
);
StopDecoder
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment