X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=core%2Fvideo_channel.h;h=2390819a9b26ea3205134177fcfdf38b3c04a2f8;hb=8c61df76c4b35ab58316f35b6a09a3f977efd596;hp=915766e824467e38de5b05e515a52b9ab24fcd8a;hpb=c156bdd4a87429d670f2f9a6ace3cc021782cd9a;p=casparcg diff --git a/core/video_channel.h b/core/video_channel.h index 915766e82..2390819a9 100644 --- a/core/video_channel.h +++ b/core/video_channel.h @@ -1,80 +1,82 @@ -/* -* Copyright (c) 2011 Sveriges Television AB -* -* This file is part of CasparCG (www.casparcg.com). -* -* CasparCG is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* CasparCG is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with CasparCG. If not, see . -* -* Author: Robert Nagy, ronag89@gmail.com -*/ - -#pragma once - -#include -#include -#include - -#include "monitor/monitor.h" - -#include - -FORWARD3(caspar, core, ogl, class accelerator); -FORWARD2(caspar, core, class stage); -FORWARD2(caspar, core, class mixer); -FORWARD2(caspar, core, class output); -FORWARD2(caspar, core, struct image_mixer); -FORWARD2(caspar, core, struct video_format_desc); -FORWARD2(caspar, core, struct frame_factory); - -namespace caspar { namespace core { - -typedef reactive::observable> frame_observable; - -class video_channel sealed : public frame_observable - , public monitor::observable -{ - video_channel(const video_channel&); - video_channel& operator=(const video_channel&); -public: - explicit video_channel(int index, const video_format_desc& format_desc, spl::unique_ptr image_mixer); - - const core::stage& stage() const; - core::stage& stage(); - const core::mixer& mixer() const; - core::mixer& mixer(); - const core::output& output() const; - core::output& output(); - - core::video_format_desc video_format_desc() const; - void video_format_desc(const core::video_format_desc& format_desc); - - spl::shared_ptr frame_factory(); - - boost::property_tree::wptree info() const; - - // observable> - - virtual void subscribe(const frame_observable::observer_ptr& o) override; - virtual void unsubscribe(const frame_observable::observer_ptr& o) override; - - // monitor::observable - - virtual void subscribe(const monitor::observable::observer_ptr& o) override; - virtual void unsubscribe(const monitor::observable::observer_ptr& o) override; -private: - struct impl; - spl::shared_ptr impl_; -}; - +/* +* Copyright (c) 2011 Sveriges Television AB +* +* This file is part of CasparCG (www.casparcg.com). +* +* CasparCG is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* CasparCG is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with CasparCG. If not, see . +* +* Author: Robert Nagy, ronag89@gmail.com +*/ + +#pragma once + +#include +#include +#include + +#include "monitor/monitor.h" + +#include + +FORWARD3(caspar, core, ogl, class accelerator); +FORWARD2(caspar, core, class stage); +FORWARD2(caspar, core, class mixer); +FORWARD2(caspar, core, class output); +FORWARD2(caspar, core, class image_mixer); +FORWARD2(caspar, core, struct video_format_desc); +FORWARD2(caspar, core, class frame_factory); + +namespace caspar { namespace core { + +class video_channel sealed : public monitor::observable +{ + video_channel(const video_channel&); + video_channel& operator=(const video_channel&); +public: + + // Static Members + + // Constructors + + explicit video_channel(int index, const video_format_desc& format_desc, std::unique_ptr image_mixer); + ~video_channel(); + + // Methods + + // monitor::observable + + void subscribe(const monitor::observable::observer_ptr& o) override; + void unsubscribe(const monitor::observable::observer_ptr& o) override; + + // Properties + + const core::stage& stage() const; + core::stage& stage(); + const core::mixer& mixer() const; + core::mixer& mixer(); + const core::output& output() const; + core::output& output(); + + core::video_format_desc video_format_desc() const; + void video_format_desc(const core::video_format_desc& format_desc); + + spl::shared_ptr frame_factory(); + + boost::property_tree::wptree info() const; +private: + struct impl; + spl::unique_ptr impl_; +}; + }} \ No newline at end of file