]> git.sesse.net Git - casparcg/blobdiff - modules/ffmpeg/producer/video/video_decoder.h
[ffmpeg] Ported 2.0.7 ffmpeg producer to 2.1.0 while still keeping the usage of the...
[casparcg] / modules / ffmpeg / producer / video / video_decoder.h
index 5cc1aea1dcca1ab2867ee8bc5553e328003049a8..d954dc05b05610a1d8b24d26b8cd03b7a75e573a 100644 (file)
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2011 Sveriges Television AB <info@casparcg.com>
+* Copyright 2013 Sveriges Television AB http://casparcg.com/
 *
 * This file is part of CasparCG (www.casparcg.com).
 *
 #pragma once
 
 #include <common/memory.h>
-#include <common/forward.h>
-
-#include <core/monitor/monitor.h>
 
 #include <boost/noncopyable.hpp>
-#include <boost/rational.hpp>
 
 struct AVFormatContext;
 struct AVFrame;
 struct AVPacket;
 
-namespace caspar { namespace ffmpeg {
+namespace caspar {
+
+namespace core {
+       class frame_factory;
+       class write_frame;
+}
 
-class video_decoder : public boost::noncopyable
+namespace ffmpeg {
+
+class video_decoder : boost::noncopyable
 {
 public:
-       explicit video_decoder(class input& input, bool single_threaded);
+       explicit video_decoder(const spl::shared_ptr<AVFormatContext>& context);
        
-       video_decoder(video_decoder&& other);
-       video_decoder& operator=(video_decoder&& other);
-
-       std::shared_ptr<AVFrame> operator()();
+       bool                                            ready() const;
+       void                                            push(const std::shared_ptr<AVPacket>& packet);
+       std::shared_ptr<AVFrame>        poll();
        
-       int      width() const;
-       int      height() const;
-       bool is_progressive() const;
-       uint32_t file_frame_number() const;
-       boost::rational<int> framerate() const;
+       int                                                     width() const;
+       int                                                     height() const;
 
-       uint32_t nb_frames() const;
+       uint32_t                                        nb_frames() const;
+       uint32_t                                        file_frame_number() const;
+       bool                                            is_progressive() const;
 
-       std::wstring print() const;
-               
-       core::monitor::subject& monitor_output();
+       std::wstring                            print() const;
 
 private:
-       struct impl;
-       spl::shared_ptr<impl> impl_;
+       struct implementation;
+       spl::shared_ptr<implementation> impl_;
 };
 
 }}
\ No newline at end of file