\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 <string>\r
\r
-namespace caspar { namespace core {\r
+namespace caspar { \r
+\r
+class executor;\r
+\r
+namespace core {\r
+\r
+class ogl_device;\r
\r
class video_channel_context\r
{\r
- mutable tbb::spin_rw_mutex mutex_;\r
- const int index_;\r
- video_format_desc format_desc_;\r
- executor execution_;\r
- executor destruction_;\r
- ogl_device& ogl_;\r
\r
public:\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() const {return index_;}\r
-\r
- video_format_desc get_format_desc()\r
- {\r
- tbb::spin_rw_mutex::scoped_lock lock(mutex_, false);\r
- return format_desc_;\r
- }\r
-\r
- void set_format_desc(const video_format_desc& format_desc)\r
- {\r
- tbb::spin_rw_mutex::scoped_lock lock(mutex_, true);\r
- format_desc_ = format_desc;\r
- }\r
-\r
- executor& execution() {return execution_;}\r
- executor& destruction() {return destruction_;}\r
- ogl_device& ogl() { return 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
+ 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