]> git.sesse.net Git - casparcg/blobdiff - modules/ffmpeg/producer/muxer/frame_muxer.h
[ffmpeg] Ported 2.0.7 ffmpeg producer to 2.1.0 while still keeping the usage of the...
[casparcg] / modules / ffmpeg / producer / muxer / frame_muxer.h
index 6e0d83dfd37cfc94b2ebe690aad5686b5d689fbc..651cbb4412cf4987c132133d9a87ee5c8150ece4 100644 (file)
@@ -1,63 +1,69 @@
-/*\r
-* Copyright (c) 2011 Sveriges Television AB <info@casparcg.com>\r
-*\r
-* This file is part of CasparCG (www.casparcg.com).\r
-*\r
-* CasparCG is free software: you can redistribute it and/or modify\r
-* it under the terms of the GNU General Public License as published by\r
-* the Free Software Foundation, either version 3 of the License, or\r
-* (at your option) any later version.\r
-*\r
-* CasparCG is distributed in the hope that it will be useful,\r
-* but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
-* GNU General Public License for more details.\r
-*\r
-* You should have received a copy of the GNU General Public License\r
-* along with CasparCG. If not, see <http://www.gnu.org/licenses/>.\r
-*\r
-* Author: Robert Nagy, ronag89@gmail.com\r
-*/\r
-\r
-#pragma once\r
-\r
-#include "display_mode.h"\r
-\r
-#include <common/forward.h>\r
-#include <common/spl/memory.h>\r
-\r
-#include <core/mixer/audio/audio_mixer.h>\r
-\r
-#include <boost/noncopyable.hpp>\r
-\r
-#include <vector>\r
-\r
-struct AVFrame;\r
-\r
-FORWARD2(caspar, core, struct pixel_format_desc);\r
-FORWARD2(caspar, core, class data_frame);\r
-FORWARD2(caspar, core, class frame_factory);\r
-FORWARD2(caspar, core, class draw_frame);\r
-\r
-namespace caspar { namespace ffmpeg {\r
-\r
-class frame_muxer : boost::noncopyable\r
-{\r
-public:\r
-       frame_muxer(double in_fps, const spl::shared_ptr<core::frame_factory>& frame_factory, const std::wstring& filter = L"");\r
-       \r
-       void push(const std::shared_ptr<AVFrame>& video_frame, int flags = 0);\r
-       void push(const std::shared_ptr<core::audio_buffer>& audio_samples);\r
-       \r
-       bool video_ready() const;\r
-       bool audio_ready() const;\r
-\r
-       std::shared_ptr<core::draw_frame> poll();\r
-\r
-       uint32_t calc_nb_frames(uint32_t nb_frames) const;\r
-private:\r
-       struct impl;\r
-       spl::shared_ptr<impl> impl_;\r
-};\r
-\r
+/*
+* Copyright (c) 2011 Sveriges Television AB <info@casparcg.com>
+*
+* This file is part of CasparCG (www.casparcg.com).
+*
+* CasparCG is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* CasparCG is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with CasparCG. If not, see <http://www.gnu.org/licenses/>.
+*
+* Author: Robert Nagy, ronag89@gmail.com
+*/
+
+#pragma once
+
+#include "display_mode.h"
+
+#include <common/forward.h>
+#include <common/memory.h>
+
+#include <core/frame/frame.h>
+#include <core/mixer/audio/audio_mixer.h>
+#include <core/fwd.h>
+
+#include <boost/noncopyable.hpp>
+#include <boost/rational.hpp>
+
+#include <vector>
+
+struct AVFrame;
+
+namespace caspar { namespace ffmpeg {
+
+class frame_muxer : boost::noncopyable
+{
+public:
+       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;
+
+       core::draw_frame poll();
+
+       boost::rational<int> out_framerate() const;
+
+       uint32_t calc_nb_frames(uint32_t nb_frames) const;
+private:
+       struct impl;
+       spl::shared_ptr<impl> impl_;
+};
+
 }}
\ No newline at end of file