X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fffmpeg%2Fproducer%2Fvideo%2Fvideo_decoder.h;h=743bf749ae449323b84bca289a7b24a6dd44f663;hb=0d225c5442d5a127b0eefd08c1cf723a37357211;hp=7676bafd9e4f7026f096f76c14c208db5c42a786;hpb=a46c2bbab800d78ac60caa7da775acf1dcc65332;p=casparcg diff --git a/modules/ffmpeg/producer/video/video_decoder.h b/modules/ffmpeg/producer/video/video_decoder.h index 7676bafd9..743bf749a 100644 --- a/modules/ffmpeg/producer/video/video_decoder.h +++ b/modules/ffmpeg/producer/video/video_decoder.h @@ -21,19 +21,38 @@ #include -#include +#include -struct AVCodecContext; +#include + +#include + +struct AVFormatContext; +struct AVFrame; +struct AVPacket; namespace caspar { - -typedef std::vector> aligned_buffer; + +namespace core { + struct frame_factory; + class write_frame; +} class video_decoder : boost::noncopyable { public: - explicit video_decoder(AVCodecContext* codec_context, const safe_ptr& frame_factory); - std::shared_ptr execute(void* tag, const aligned_buffer& video_packet); + explicit video_decoder(const safe_ptr& context, const safe_ptr& frame_factory, const std::wstring& filter); + + void push(const std::shared_ptr& packet); + bool ready() const; + std::vector> poll(); + + size_t width() const; + size_t height() const; + + int64_t nb_frames() const; + + double fps() const; private: struct implementation; safe_ptr impl_;