encoder: write audio in segments

I'll be honest, this probably makes no noticeable difference at all. It should be faster and more efficient, but whether that translates into any tangible improvement is yet to be seen.
This commit is contained in:
itsmattkc
2021-05-10 00:44:08 +10:00
parent 27653f10dc
commit 15556c64ae
12 changed files with 295 additions and 152 deletions
+2 -4
View File
@@ -29,6 +29,7 @@
#include "codec/exportcodec.h"
#include "codec/exportformat.h"
#include "codec/frame.h"
#include "codec/samplebuffer.h"
#include "common/timerange.h"
#include "render/audioparams.h"
#include "render/videoparams.h"
@@ -172,10 +173,7 @@ public slots:
virtual bool Open() = 0;
virtual bool WriteFrame(olive::FramePtr frame, olive::rational time) = 0;
virtual void WriteAudio(olive::AudioParams pcm_info,
QIODevice *file) = 0;
void WriteAudio(olive::AudioParams pcm_info,
const QString& pcm_filename);
virtual bool WriteAudio(olive::SampleBufferPtr audio) = 0;
virtual void Close() = 0;