]> git.sesse.net Git - casparcg/blob - core/video_channel_context.h
2.0.0.2:
[casparcg] / core / video_channel_context.h
1 #pragma once\r
2 \r
3 #include <common/concurrency/executor.h>\r
4 \r
5 #include <core/mixer/gpu/ogl_device.h>\r
6 #include <core/video_format.h>\r
7 \r
8 #include <boost/noncopyable.hpp>\r
9 #include <boost/lexical_cast.hpp>\r
10 \r
11 #include <string>\r
12 \r
13 namespace caspar { namespace core {\r
14 \r
15 struct video_channel_context\r
16 {\r
17         video_channel_context(int index,  ogl_device& ogl, const video_format_desc& format_desc) \r
18                 : index(index)\r
19                 , format_desc(format_desc)\r
20                 , execution(print() + L"/execution")\r
21                 , destruction(print() + L"/destruction")\r
22                 , ogl(ogl)\r
23         {\r
24                 execution.set_priority_class(above_normal_priority_class);\r
25                 destruction.set_priority_class(below_normal_priority_class);\r
26         }\r
27 \r
28         const int                       index;\r
29         video_format_desc       format_desc;\r
30         executor                        execution;\r
31         executor                        destruction;\r
32         ogl_device&                     ogl;\r
33 \r
34         std::wstring print() const\r
35         {\r
36                 return L"video_channel[" + boost::lexical_cast<std::wstring>(index+1) + L"-" +  format_desc.name + L"]";\r
37         }\r
38 };\r
39         \r
40 }}