3 #include "video_channel_context.h"
\r
5 namespace caspar { namespace core {
\r
7 video_channel_context::video_channel_context(int index, ogl_device& ogl, const video_format_desc& format_desc)
\r
9 , format_desc_(format_desc)
\r
10 , execution_(print() + L"/execution")
\r
11 , destruction_(print() + L"/destruction")
\r
14 execution_.set_priority_class(above_normal_priority_class);
\r
15 destruction_.set_priority_class(below_normal_priority_class);
\r
18 const int video_channel_context::index() const {return index_;}
\r
20 video_format_desc video_channel_context::get_format_desc()
\r
22 tbb::spin_rw_mutex::scoped_lock lock(mutex_, false);
\r
23 return format_desc_;
\r
26 void video_channel_context::set_format_desc(const video_format_desc& format_desc)
\r
28 tbb::spin_rw_mutex::scoped_lock lock(mutex_, true);
\r
29 format_desc_ = format_desc;
\r
32 executor& video_channel_context::execution() {return execution_;}
\r
33 executor& video_channel_context::destruction() {return destruction_;}
\r
34 ogl_device& video_channel_context::ogl() { return ogl_;}
\r
36 std::wstring video_channel_context::print() const
\r
38 return L"video_channel[" + boost::lexical_cast<std::wstring>(index_+1) + L"|" + format_desc_.name + L"]";
\r