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
218d9383
Commit
218d9383
authored
Sep 21, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/Thread: move decoder_thread_start() into DecoderControl
parent
af64bd50
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
41 deletions
+10
-41
Makefile.am
Makefile.am
+1
-1
DecoderControl.hxx
src/decoder/DecoderControl.hxx
+8
-0
DecoderThread.cxx
src/decoder/DecoderThread.cxx
+0
-10
DecoderThread.hxx
src/decoder/DecoderThread.hxx
+0
-28
Thread.cxx
src/player/Thread.cxx
+1
-2
No files found.
Makefile.am
View file @
218d9383
...
...
@@ -102,7 +102,7 @@ libmpd_a_SOURCES = \
src/Idle.cxx src/Idle.hxx
\
src/IdleFlags.cxx src/IdleFlags.hxx
\
src/decoder/DecoderError.cxx src/decoder/DecoderError.hxx
\
src/decoder/DecoderThread.cxx
src/decoder/DecoderThread.hxx
\
src/decoder/DecoderThread.cxx
\
src/decoder/DecoderCommand.hxx
\
src/decoder/DecoderControl.cxx src/decoder/DecoderControl.hxx
\
src/decoder/Client.hxx
\
...
...
src/decoder/DecoderControl.hxx
View file @
218d9383
...
...
@@ -179,6 +179,14 @@ struct DecoderControl final : InputStreamHandler {
~
DecoderControl
()
noexcept
;
/**
* Throws on error.
*/
void
StartThread
()
{
quit
=
false
;
thread
.
Start
();
}
/**
* Locks the object.
*/
void
Lock
()
const
noexcept
{
...
...
src/decoder/DecoderThread.cxx
View file @
218d9383
...
...
@@ -18,7 +18,6 @@
*/
#include "config.h"
#include "DecoderThread.hxx"
#include "DecoderControl.hxx"
#include "Bridge.hxx"
#include "DecoderError.hxx"
...
...
@@ -565,12 +564,3 @@ DecoderControl::RunThread() noexcept
}
}
while
(
command
!=
DecoderCommand
::
NONE
||
!
quit
);
}
void
decoder_thread_start
(
DecoderControl
&
dc
)
{
assert
(
!
dc
.
thread
.
IsDefined
());
dc
.
quit
=
false
;
dc
.
thread
.
Start
();
}
src/decoder/DecoderThread.hxx
deleted
100644 → 0
View file @
af64bd50
/*
* Copyright 2003-2017 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef MPD_DECODER_THREAD_HXX
#define MPD_DECODER_THREAD_HXX
struct
DecoderControl
;
void
decoder_thread_start
(
DecoderControl
&
dc
);
#endif
src/player/Thread.cxx
View file @
218d9383
...
...
@@ -21,7 +21,6 @@
#include "Thread.hxx"
#include "Outputs.hxx"
#include "Listener.hxx"
#include "decoder/DecoderThread.hxx"
#include "decoder/DecoderControl.hxx"
#include "MusicPipe.hxx"
#include "MusicBuffer.hxx"
...
...
@@ -1089,7 +1088,7 @@ PlayerControl::RunThread() noexcept
DecoderControl
dc
(
mutex
,
cond
,
configured_audio_format
,
replay_gain_config
);
d
ecoder_thread_start
(
dc
);
d
c
.
StartThread
(
);
MusicBuffer
buffer
(
buffer_chunks
);
...
...
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