]> git.sesse.net Git - casparcg/blobdiff - core/mixer/read_frame.h
2.0. audio: Audio pipeline is now in 32 bit.
[casparcg] / core / mixer / read_frame.h
index 9e7b05f273c0078455519255d02f62b940343628..a3afc36cd14b22d255008618067635d818aa2b17 100644 (file)
 \r
 #include <boost/noncopyable.hpp>\r
 #include <boost/range/iterator_range.hpp>\r
-#include <boost/thread/future.hpp>\r
 \r
+#include <cstdint>\r
 #include <memory>\r
 #include <vector>\r
 \r
 namespace caspar { namespace core {\r
        \r
 class host_buffer;\r
+class ogl_device;\r
 \r
 class read_frame : boost::noncopyable\r
 {\r
-       read_frame(){}\r
 public:\r
-       read_frame(boost::unique_future<safe_ptr<host_buffer>>&& image_data, std::vector<int16_t>&& audio_data);\r
-       read_frame(safe_ptr<host_buffer>&& image_data, std::vector<int16_t>&& audio_data);\r
+       read_frame();\r
+       read_frame(ogl_device& ogl, size_t size, safe_ptr<host_buffer>&& image_data, std::vector<int32_t>&& audio_data);\r
 \r
-       virtual const boost::iterator_range<const uint8_t*> image_data() const;\r
-       virtual const boost::iterator_range<const int16_t*> audio_data() const;\r
-       \r
-       static safe_ptr<const read_frame> empty()\r
-       {\r
-               struct empty : public read_frame\r
-               {                       \r
-                       virtual const boost::iterator_range<const uint8_t*> image_data() const {return boost::iterator_range<const uint8_t*>();}\r
-                       virtual const boost::iterator_range<const int16_t*> audio_data() const {return boost::iterator_range<const int16_t*>();}\r
-               };\r
-               static safe_ptr<const empty> frame;\r
-               return frame;\r
-       }\r
+       virtual const boost::iterator_range<const uint8_t*> image_data();\r
+       virtual const boost::iterator_range<const int32_t*> audio_data();\r
+\r
+       virtual size_t image_size() const;\r
+               \r
 private:\r
        struct implementation;\r
        std::shared_ptr<implementation> impl_;\r