codec system rework

Codecs are now much cleaner and thread safe by design.
This commit is contained in:
itsmattkc
2020-11-10 11:23:25 +11:00
parent 6ecdb02fd0
commit 94c0914e50
17 changed files with 932 additions and 1376 deletions
+10 -13
View File
@@ -35,23 +35,18 @@ class OIIODecoder : public Decoder
public:
OIIODecoder();
virtual ~OIIODecoder() override;
virtual QString id() override;
virtual bool SupportsVideo() override{return true;}
virtual FootagePtr Probe(const QString& filename, const QAtomicInt* cancelled) const override;
virtual bool Open() override;
virtual FramePtr RetrieveVideo(const rational &timecode, const int& divider) override;
virtual void Close() override;
virtual bool SupportsVideo() override;
static void FrameToBuffer(FramePtr frame, OIIO::ImageBuf* buf);
static void BufferToFrame(OIIO::ImageBuf* buf, FramePtr frame);
static PixelFormat::Format GetFormatFromOIIOBasetype(const OIIO::ImageSpec& spec);
static rational GetPixelAspectRatioFromOIIO(const OIIO::ImageSpec& spec);
protected:
virtual bool OpenInternal() override;
virtual FramePtr RetrieveVideoInternal(const rational &timecode, const int& divider) override;
virtual void CloseInternal() override;
private:
#if OIIO_VERSION < 10903
@@ -66,6 +61,8 @@ private:
void CloseImageHandle();
int64_t last_sequence_index_;
PixelFormat::Format pix_fmt_;
bool is_rgba_;