use IDs for multiple decoders

This commit is contained in:
itsmattkc
2019-08-08 15:38:58 +10:00
parent 8730da4b43
commit f3b60369aa
9 changed files with 203 additions and 53 deletions
+8
View File
@@ -37,14 +37,20 @@ extern "C" {
class FFmpegDecoder : public Decoder
{
public:
// Constructor
FFmpegDecoder();
// Destructor
virtual ~FFmpegDecoder() override;
virtual bool Probe(Footage *f) override;
virtual bool Open() override;
virtual FramePtr Retrieve(const rational &timecode, const rational &length = 0) override;
virtual void Close() override;
virtual QString id() override;
private:
/**
* @brief Handle an error
@@ -118,6 +124,8 @@ private:
*/
AVPixelFormat GetCompatiblePixelFormat(const AVPixelFormat& pix_fmt);
int64_t GetClosestTimestampInIndex(const int64_t& ts);
AVFormatContext* fmt_ctx_;
AVCodecContext* codec_ctx_;
AVStream* avstream_;