]> git.sesse.net Git - casparcg/blob - core/producer/ffmpeg/input.h
3d71404571f659b5be8e1d774c49c4200170ebdf
[casparcg] / core / producer / ffmpeg / input.h
1 #pragma once\r
2 \r
3 #include <tbb/cache_aligned_allocator.h>\r
4 \r
5 #include <memory>\r
6 #include <string>\r
7 \r
8 struct AVCodecContext;\r
9 \r
10 namespace caspar { namespace core { namespace ffmpeg{   \r
11         \r
12 typedef std::vector<unsigned char, tbb::cache_aligned_allocator<unsigned char>> aligned_buffer;\r
13 \r
14 class input : boost::noncopyable\r
15 {\r
16 public:\r
17         explicit input(const std::wstring& filename, bool loop);\r
18         const std::shared_ptr<AVCodecContext>& get_video_codec_context() const;\r
19         const std::shared_ptr<AVCodecContext>& get_audio_codec_context() const;\r
20 \r
21         aligned_buffer get_video_packet();\r
22         aligned_buffer get_audio_packet();\r
23 \r
24         bool is_eof() const;\r
25         double fps() const;\r
26 private:\r
27         struct implementation;\r
28         std::shared_ptr<implementation> impl_;\r
29 };\r
30 \r
31         }\r
32 }}\r