X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=core%2Fconsumer%2Foutput.h;h=b6dc929ad2c53260d3a888486a1881148b3e2ed5;hb=3d90acb484ffd68d2a5cb7ea6b800d1fbba3eb2b;hp=0e1dd645aa90f1f387c989b844d6f3a784d964a9;hpb=860bb47e6bb1c08150b54909a722066306ba78e2;p=casparcg diff --git a/core/consumer/output.h b/core/consumer/output.h index 0e1dd645a..b6dc929ad 100644 --- a/core/consumer/output.h +++ b/core/consumer/output.h @@ -1,50 +1,69 @@ -/* -* copyright (c) 2010 Sveriges Television AB -* -* This file is part of CasparCG. -* -* 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 . -* -*/ -#pragma once - -#include "../consumer/frame_consumer.h" - -#include - -#include - -namespace caspar { - -class executor; - -namespace core { - -class video_channel_context;; - -class output : boost::noncopyable -{ -public: - explicit output(video_channel_context& video_channel); - - void add(int index, safe_ptr&& consumer); - void remove(int index); - - void execute(const safe_ptr& frame); // nothrow -private: - struct implementation; - safe_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 "../monitor/monitor.h" + +#include +#include +#include +#include + +#include + +FORWARD2(caspar, diagnostics, class graph); + +namespace caspar { namespace core { + +class output final +{ + output(const output&); + output& operator=(const output&); +public: + + // Static Members + + // Constructors + + explicit output(spl::shared_ptr graph, const struct video_format_desc& format_desc, int channel_index); + + // Methods + + void operator()(class const_frame frame, const struct video_format_desc& format_desc); + + void add(const spl::shared_ptr& consumer); + void add(int index, const spl::shared_ptr& consumer); + void remove(const spl::shared_ptr& consumer); + void remove(int index); + + monitor::subject& monitor_output(); + + // Properties + + std::future info() const; + +private: + struct impl; + spl::shared_ptr impl_; +}; + }} \ No newline at end of file