This was a more comprehensive set of changes than a simple bug fix. The original issue highlighted a pretty nasty issue in the way we were dealing with multi-frame packets. The entire plugin was refactored, and now uses modern, non-deprecated APIs like `avcodec_send_packet` and `avcodec_receive_frame`, and also utilizes `AVAudioFifo` and `av_audio_fifo_*` APIs to ensure stable buffer sizes are returned to the caller.
* Added new `FffmpegEncoder` and removed old `OggEncoder`. The new `FfmpegEncoder` can be used to encode to `ogg`, `flac`, `opus`, `wavepack`, and `wma` formats.
* Created new `IStreamingEncoder` and `IBlockingEncoder` interfaces that both extend `IEncoder`. The former is preferred, but not always possible depending on how the output format works.
* Updated `IDataStream::Open` interface to take `OpenFlags` bitmask. Plumbed this change through multiple layers of the system.
* Updated `LocalFileStream` to allow for opening files in `OpenFlags::Write` and `OpenFlags::Read | OpenFlags::Write` modes. This is used for plugins that want to write files and share file handles.
* Added `HttpServer` auth bypass via new environment variable `MUSIKCUBE_DISABLE_HTTP_SERVER_AUTH=1`. This is useful for testing encoders without requiring client auth.
* Bumped SDK's version to `17`.
In file included from src/core/audio/Stream.cpp:37:
src/core/audio/Stream.h:78:26: error: no template named 'deque' in namespace 'std'
typedef std::deque<Buffer*> BufferList;
~~~~~^
src/core/audio/Stream.cpp:75:25: error: invalid range expression of type 'int'; no viable 'begin'
function available
for (Buffer* buffer : this->recycledBuffers) {
^ ~~~~
src/core/audio/Stream.cpp:79:25: error: invalid range expression of type 'int'; no viable 'begin'
function available
for (Buffer* buffer : this->filledBuffers) {
^ ~~~~
src/core/audio/Stream.cpp:98:38: error: member reference base type
'musik::core::audio::Stream::BufferList' (aka 'int') is not a structure or union
auto it = this->filledBuffers.begin();
~~~~~~~~~~~~~~~~~~~^~~~~~
src/core/audio/Stream.cpp:99:41: error: member reference base type
'musik::core::audio::Stream::BufferList' (aka 'int') is not a structure or union
while (it != this->filledBuffers.end()) {
~~~~~~~~~~~~~~~~~~~^~~~
src/core/audio/Stream.cpp💯34: error: member reference base type
'musik::core::audio::Stream::BufferList' (aka 'int') is not a structure or union
this->recycledBuffers.push_back(*it);
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
src/core/audio/Stream.cpp:104:28: error: member reference base type
'musik::core::audio::Stream::BufferList' (aka 'int') is not a structure or union
this->filledBuffers.clear();
~~~~~~~~~~~~~~~~~~~^~~~~~
src/core/audio/Stream.cpp:150:26: error: member reference base type
'musik::core::audio::Stream::BufferList' (aka 'int') is not a structure or union
this->recycledBuffers.push_back(buffer);
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
src/core/audio/Stream.cpp:174:34: error: member reference base type
'musik::core::audio::Stream::BufferList' (aka 'int') is not a structure or union
this->recycledBuffers.push_back(buffer);
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
src/core/audio/Stream.cpp:183:24: error: member reference base type
'musik::core::audio::Stream::BufferList' (aka 'int') is not a structure or union
if (recycledBuffers.size()) {
~~~~~~~~~~~~~~~^~~~~
src/core/audio/Stream.cpp:184:41: error: member reference base type
'musik::core::audio::Stream::BufferList' (aka 'int') is not a structure or union
Buffer* target = recycledBuffers.front();
~~~~~~~~~~~~~~~^~~~~~
src/core/audio/Stream.cpp:185:24: error: member reference base type
'musik::core::audio::Stream::BufferList' (aka 'int') is not a structure or union
recycledBuffers.pop_front();
~~~~~~~~~~~~~~~^~~~~~~~~~
src/core/audio/Stream.cpp:195:28: error: member reference base type
'musik::core::audio::Stream::BufferList' (aka 'int') is not a structure or union
if (this->filledBuffers.size()) {
~~~~~~~~~~~~~~~~~~~^~~~~
src/core/audio/Stream.cpp:196:45: error: member reference base type
'musik::core::audio::Stream::BufferList' (aka 'int') is not a structure or union
Buffer* buffer = this->filledBuffers.front();
~~~~~~~~~~~~~~~~~~~^~~~~~
src/core/audio/Stream.cpp:197:28: error: member reference base type
'musik::core::audio::Stream::BufferList' (aka 'int') is not a structure or union
this->filledBuffers.pop_front();
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
src/core/audio/Stream.cpp:210:41: error: member reference base type
'musik::core::audio::Stream::BufferList' (aka 'int') is not a structure or union
int recycled = this->recycledBuffers.size();
~~~~~~~~~~~~~~~~~~~~~^~~~~
src/core/audio/Stream.cpp:267:26: error: member reference base type
'musik::core::audio::Stream::BufferList' (aka 'int') is not a structure or union
filledBuffers.push_back(target);
~~~~~~~~~~~~~^~~~~~~~~~