]> git.sesse.net Git - casparcg/blobdiff - modules/ffmpeg/producer/muxer/frame_muxer.h
[ffmpeg] Removed FFMPEG_Resource to simplify code and documented streaming video...
[casparcg] / modules / ffmpeg / producer / muxer / frame_muxer.h
index 1cbda7a48d42145358d31474373350b8196bb735..97984427ad099f9601e892b3195eff45679ecb16 100644 (file)
 #include <common/forward.h>
 #include <common/memory.h>
 
+#include <core/frame/frame.h>
 #include <core/mixer/audio/audio_mixer.h>
-#include <core/video_format.h>
+#include <core/fwd.h>
 
 #include <boost/noncopyable.hpp>
+#include <boost/rational.hpp>
 
 #include <vector>
 
 struct AVFrame;
 
-FORWARD2(caspar, core, struct pixel_format_desc);
-FORWARD2(caspar, core, class frame);
-FORWARD2(caspar, core, class frame_factory);
-FORWARD2(caspar, core, class draw_frame);
-
 namespace caspar { namespace ffmpeg {
 
 class frame_muxer : boost::noncopyable
 {
 public:
-       frame_muxer(double in_fps, const spl::shared_ptr<core::frame_factory>& frame_factory, const core::video_format_desc& format_desc, const std::wstring& filter = L"");
-       
-       void push_video(const std::shared_ptr<AVFrame>& frame);
-       void push_audio(const std::shared_ptr<AVFrame>& frame);
-       
+       frame_muxer(
+                       boost::rational<int> in_framerate,
+                       const spl::shared_ptr<core::frame_factory>& frame_factory,
+                       const core::video_format_desc& format_desc,
+                       const core::audio_channel_layout& channel_layout,
+                       const std::wstring& filter,
+                       bool multithreaded_filter);
+
+       void push(const std::shared_ptr<AVFrame>& video_frame);
+       void push(const std::shared_ptr<core::mutable_audio_buffer>& audio_samples);
+
        bool video_ready() const;
        bool audio_ready() const;
 
-       void clear();
+       core::draw_frame poll();
 
-       bool empty() const;
-       core::draw_frame front() const;
-       void pop();
+       boost::rational<int> out_framerate() const;
 
        uint32_t calc_nb_frames(uint32_t nb_frames) const;
 private:
@@ -65,4 +66,4 @@ private:
        spl::shared_ptr<impl> impl_;
 };
 
-}}
\ No newline at end of file
+}}