]> git.sesse.net Git - casparcg/blob - core/video_channel_context.h
2.0.0.2: decklink_consumer: Fixed prerolling bug which caused audio to be out of...
[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         }\r
26 \r
27         const int                       index;\r
28         video_format_desc       format_desc;\r
29         executor                        execution;\r
30         executor                        destruction;\r
31         ogl_device&                     ogl;\r
32 \r
33         std::wstring print() const\r
34         {\r
35                 return L"video_channel[" + boost::lexical_cast<std::wstring>(index+1) + L"-" +  format_desc.name + L"]";\r
36         }\r
37 };\r
38         \r
39 }}