X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=core%2Fconsumer%2Fframe_consumer.h;h=be4215349d95d4f9ba24e00080f87cec9dff9527;hb=f11a9a8f6a62a0adabba8aa485802df974085db5;hp=e199abba757aeaf3ca1c08735bdc3161e53d2777;hpb=623472e30864f882aa703c04ca916148d33a77cd;p=casparcg diff --git a/core/consumer/frame_consumer.h b/core/consumer/frame_consumer.h index e199abba7..be4215349 100644 --- a/core/consumer/frame_consumer.h +++ b/core/consumer/frame_consumer.h @@ -1,22 +1,24 @@ /* -* copyright (c) 2010 Sveriges Television AB +* Copyright (c) 2011 Sveriges Television AB * -* This file is part of CasparCG. +* 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 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 . +* 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 @@ -30,29 +32,25 @@ namespace caspar { namespace core { -class read_frame; -struct video_format_desc; - struct frame_consumer : boost::noncopyable { + frame_consumer(){} virtual ~frame_consumer() {} - virtual bool send(const safe_ptr& frame) = 0; - virtual void initialize(const video_format_desc& format_desc, int channel_index) = 0; + virtual bool send(const safe_ptr& frame) = 0; + virtual void initialize(const struct video_format_desc& format_desc, int channel_index) = 0; virtual std::wstring print() const = 0; virtual boost::property_tree::wptree info() const = 0; virtual bool has_synchronization_clock() const {return true;} - virtual size_t buffer_depth() const = 0; + virtual int buffer_depth() const = 0; virtual int index() const = 0; static const safe_ptr& empty(); }; -safe_ptr create_consumer_cadence_guard(const safe_ptr& consumer); - -typedef std::function(const std::vector&)> consumer_factory_t; +typedef std::function(const std::vector&)> consumer_factory_t; void register_consumer_factory(const consumer_factory_t& factory); -safe_ptr create_consumer(const std::vector& params); +safe_ptr create_consumer(const std::vector& params); }} \ No newline at end of file