output/Thread: split Open()

Simplify the code, eliminate duplicate rollback code and eliminate the
"goto" kludge.
This commit is contained in:
Max Kellermann
2016-12-13 21:46:27 +01:00
parent 093cb475bb
commit ceba6816de
2 changed files with 53 additions and 33 deletions

View File

@@ -401,6 +401,26 @@ private:
void Disable();
void Open();
/**
* Open the #ChainFilter and call OpenOutputAndConvert().
*
* Caller must not lock the mutex.
*
* @return true on success
*/
bool OpenFilterAndOutput();
/**
* Invoke OutputPlugin::open() and configure the
* #ConvertFilter.
*
* Caller must not lock the mutex.
*
* @return true on success
*/
bool OpenOutputAndConvert(AudioFormat audio_format);
void Close(bool drain);
void Reopen();