decoder/Client: new interface which wraps struct Decoder

Prepare for a Decoder API redesign based on an abstract class with
virtual methods.
This commit is contained in:
Max Kellermann
2016-11-18 07:13:35 +01:00
parent 595d1942cb
commit fd77acc217
46 changed files with 460 additions and 407 deletions

View File

@@ -22,7 +22,7 @@
#include <FLAC/stream_decoder.h>
struct Decoder;
class DecoderClient;
class InputStream;
/**
@@ -30,17 +30,17 @@ class InputStream;
* callbacks.
*/
class FlacInput {
Decoder *const decoder;
DecoderClient *const client;
InputStream &input_stream;
public:
FlacInput(InputStream &_input_stream,
Decoder *_decoder=nullptr)
:decoder(_decoder), input_stream(_input_stream) {}
DecoderClient *_client=nullptr)
:client(_client), input_stream(_input_stream) {}
Decoder *GetDecoder() {
return decoder;
DecoderClient *GetClient() {
return client;
}
InputStream &GetInputStream() {