Commit f7141c92 authored by Max Kellermann's avatar Max Kellermann

decoder/Control: convert to class, make various attributes private

parent c2a2573a
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
class PcmConvert; class PcmConvert;
struct MusicChunk; struct MusicChunk;
struct DecoderControl; class DecoderControl;
struct Tag; struct Tag;
/** /**
......
...@@ -61,12 +61,13 @@ enum class DecoderState : uint8_t { ...@@ -61,12 +61,13 @@ enum class DecoderState : uint8_t {
ERROR, ERROR,
}; };
struct DecoderControl final : InputStreamHandler { class DecoderControl final : public InputStreamHandler {
/** /**
* The handle of the decoder thread. * The handle of the decoder thread.
*/ */
Thread thread; Thread thread;
public:
/** /**
* This lock protects #state and #command. * This lock protects #state and #command.
* *
...@@ -103,8 +104,10 @@ struct DecoderControl final : InputStreamHandler { ...@@ -103,8 +104,10 @@ struct DecoderControl final : InputStreamHandler {
*/ */
std::exception_ptr error; std::exception_ptr error;
private:
bool quit; bool quit;
public:
/** /**
* Is the client currently waiting for the DecoderThread? If * Is the client currently waiting for the DecoderThread? If
* false, the DecoderThread may omit invoking Cond::signal(), * false, the DecoderThread may omit invoking Cond::signal(),
...@@ -116,11 +119,13 @@ struct DecoderControl final : InputStreamHandler { ...@@ -116,11 +119,13 @@ struct DecoderControl final : InputStreamHandler {
bool seekable; bool seekable;
SongTime seek_time; SongTime seek_time;
private:
/** /**
* The "audio_output_format" setting. * The "audio_output_format" setting.
*/ */
const AudioFormat configured_audio_format; const AudioFormat configured_audio_format;
public:
/** the format of the song file */ /** the format of the song file */
AudioFormat in_audio_format; AudioFormat in_audio_format;
...@@ -167,8 +172,10 @@ struct DecoderControl final : InputStreamHandler { ...@@ -167,8 +172,10 @@ struct DecoderControl final : InputStreamHandler {
float replay_gain_db = 0; float replay_gain_db = 0;
float replay_gain_prev_db = 0; float replay_gain_prev_db = 0;
private:
MixRampInfo mix_ramp, previous_mix_ramp; MixRampInfo mix_ramp, previous_mix_ramp;
public:
/** /**
* @param _mutex see #mutex * @param _mutex see #mutex
* @param _client_cond see #client_cond * @param _client_cond see #client_cond
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment