]> git.sesse.net Git - casparcg/blobdiff - core/producer/ffmpeg/input.h
2.0.0.2: Started on ffmpeg_consumer. Known problems, sound is incorrect, color is...
[casparcg] / core / producer / ffmpeg / input.h
index acb30f668dfc8f432fd348f68885637ecc94ece2..3d71404571f659b5be8e1d774c49c4200170ebdf 100644 (file)
@@ -1,36 +1,32 @@
 #pragma once\r
 \r
-#include "packet.h"\r
+#include <tbb/cache_aligned_allocator.h>\r
 \r
-#include <system_error>\r
-#include "../../frame/frame_fwd.h"\r
+#include <memory>\r
+#include <string>\r
+\r
+struct AVCodecContext;\r
 \r
 namespace caspar { namespace core { namespace ffmpeg{  \r
        \r
-typedef std::shared_ptr<AVFormatContext> AVFormatContextPtr;\r
+typedef std::vector<unsigned char, tbb::cache_aligned_allocator<unsigned char>> aligned_buffer;\r
 \r
 class input : boost::noncopyable\r
 {\r
 public:\r
-       input(const frame_format_desc& format_desc);\r
-       void load(const std::string& filename);\r
+       explicit input(const std::wstring& filename, bool loop);\r
        const std::shared_ptr<AVCodecContext>& get_video_codec_context() const;\r
        const std::shared_ptr<AVCodecContext>& get_audio_codec_context() const;\r
 \r
-       video_packet_ptr get_video_packet();\r
-       audio_packet_ptr get_audio_packet();\r
-\r
-       bool seek(unsigned long long frame);\r
-       void start();\r
+       aligned_buffer get_video_packet();\r
+       aligned_buffer get_audio_packet();\r
 \r
        bool is_eof() const;\r
-       void set_loop(bool value);\r
+       double fps() const;\r
 private:\r
        struct implementation;\r
        std::shared_ptr<implementation> impl_;\r
 };\r
-typedef std::shared_ptr<input> input_ptr;\r
-typedef std::unique_ptr<input> input_uptr;\r
 \r
        }\r
 }}\r