]> git.sesse.net Git - casparcg/blobdiff - core/video_channel_context.h
2.0 image_mixer: Refactored, core: Fixed destruction proxy usage.
[casparcg] / core / video_channel_context.h
index 9b8bf24dc22f9f47df6df88df3aa11cb969c6a6a..4c06e3a9f3801dd9fafee0c48bd8232bec31d2c3 100644 (file)
@@ -2,39 +2,39 @@
 \r
 #include <common/concurrency/executor.h>\r
 \r
-#include <core/mixer/gpu/ogl_device.h>\r
 #include <core/video_format.h>\r
 \r
+#include <tbb/spin_rw_mutex.h>\r
+\r
 #include <boost/noncopyable.hpp>\r
 #include <boost/lexical_cast.hpp>\r
 \r
 #include <string>\r
 \r
-namespace caspar { namespace core {\r
+namespace caspar { \r
+\r
+class executor;\r
+\r
+namespace core {\r
 \r
-struct video_channel_context\r
+class ogl_device;\r
+\r
+class video_channel_context\r
 {\r
-       video_channel_context(int index,  ogl_device& ogl, const video_format_desc& format_desc) \r
-               : index(index)\r
-               , format_desc(format_desc)\r
-               , execution(print() + L"/execution")\r
-               , destruction(print() + L"/destruction")\r
-               , ogl(ogl)\r
-       {\r
-               execution.set_priority_class(above_normal_priority_class);\r
-               destruction.set_priority_class(below_normal_priority_class);\r
-       }\r
-\r
-       const int                       index;\r
-       video_format_desc       format_desc;\r
-       executor                        execution;\r
-       executor                        destruction;\r
-       ogl_device&                     ogl;\r
-\r
-       std::wstring print() const\r
-       {\r
-               return L"video_channel[" + boost::lexical_cast<std::wstring>(index+1) + L"-" +  format_desc.name + L"]";\r
-       }\r
+\r
+public:\r
+       video_channel_context(int index, ogl_device& ogl, const video_format_desc& format_desc);\r
+\r
+       const int                       index() const;\r
+       video_format_desc       get_format_desc();\r
+       void                            set_format_desc(const video_format_desc& format_desc);\r
+       executor&                       execution();\r
+       executor&                       destruction();\r
+       ogl_device&                     ogl();\r
+       std::wstring            print() const;\r
+private:\r
+       struct implementation;\r
+       std::shared_ptr<implementation> impl_;\r
 };\r
        \r
 }}
\ No newline at end of file