test/DumpDecoderClient: convert to class
This commit is contained in:
parent
5909502a13
commit
cc3c1f31d0
@ -29,11 +29,16 @@
|
|||||||
* A #DecoderClient implementation which dumps metadata to stderr and
|
* A #DecoderClient implementation which dumps metadata to stderr and
|
||||||
* decoded data to stdout.
|
* decoded data to stdout.
|
||||||
*/
|
*/
|
||||||
struct DumpDecoderClient final : DecoderClient {
|
class DumpDecoderClient final : public DecoderClient {
|
||||||
|
bool initialized = false;
|
||||||
|
|
||||||
|
public:
|
||||||
Mutex mutex;
|
Mutex mutex;
|
||||||
Cond cond;
|
Cond cond;
|
||||||
|
|
||||||
bool initialized = false;
|
bool IsInitialized() const noexcept {
|
||||||
|
return initialized;
|
||||||
|
}
|
||||||
|
|
||||||
/* virtual methods from DecoderClient */
|
/* virtual methods from DecoderClient */
|
||||||
void Ready(AudioFormat audio_format,
|
void Ready(AudioFormat audio_format,
|
||||||
|
@ -131,7 +131,7 @@ try {
|
|||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!client.initialized) {
|
if (!client.IsInitialized()) {
|
||||||
fprintf(stderr, "Decoding failed\n");
|
fprintf(stderr, "Decoding failed\n");
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user