X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=core%2Fvideo_channel_context.h;h=f30799147c047ad7595dd07c0c51f54cb28fa376;hb=6158d8cd73c7c53c9b5d933d7527381cceaf493c;hp=9b8bf24dc22f9f47df6df88df3aa11cb969c6a6a;hpb=78d792990549440910cc9c9bfb2af288fd9ced53;p=casparcg diff --git a/core/video_channel_context.h b/core/video_channel_context.h index 9b8bf24dc..f30799147 100644 --- a/core/video_channel_context.h +++ b/core/video_channel_context.h @@ -5,6 +5,8 @@ #include #include +#include + #include #include @@ -12,29 +14,25 @@ namespace caspar { namespace core { -struct video_channel_context +class video_channel_context { - video_channel_context(int index, ogl_device& ogl, const video_format_desc& format_desc) - : index(index) - , format_desc(format_desc) - , execution(print() + L"/execution") - , destruction(print() + L"/destruction") - , ogl(ogl) - { - execution.set_priority_class(above_normal_priority_class); - destruction.set_priority_class(below_normal_priority_class); - } - - const int index; - video_format_desc format_desc; - executor execution; - executor destruction; - ogl_device& ogl; - - std::wstring print() const - { - return L"video_channel[" + boost::lexical_cast(index+1) + L"-" + format_desc.name + L"]"; - } + mutable tbb::spin_rw_mutex mutex_; + const int index_; + video_format_desc format_desc_; + executor execution_; + executor destruction_; + ogl_device& ogl_; + +public: + video_channel_context(int index, ogl_device& ogl, const video_format_desc& format_desc); + + const int index() const; + video_format_desc get_format_desc(); + void set_format_desc(const video_format_desc& format_desc); + executor& execution(); + executor& destruction(); + ogl_device& ogl(); + std::wstring print() const; }; }} \ No newline at end of file