#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
-namespace caspar{ namespace ffmpeg{ \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
- void initialize(const frame_factory_ptr& factory);\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
+}}\r