X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=core%2Fconsumer%2Fframe_consumer.h;h=4e6fef7323ae9a5c4de4c62d3609952eba78ac1c;hb=ef45ae47b4f50ef057041b5122d0f34c1659cc11;hp=a5fe5d4e4a4e03141a340c823e1d4a7202969d65;hpb=ff6d30a547b05bcc55d2c8201e70bb016c7c8afd;p=casparcg diff --git a/core/consumer/frame_consumer.h b/core/consumer/frame_consumer.h index a5fe5d4e4..4e6fef732 100644 --- a/core/consumer/frame_consumer.h +++ b/core/consumer/frame_consumer.h @@ -19,6 +19,8 @@ */ #pragma once +#include "../video_format.h" + #include #include @@ -32,23 +34,28 @@ namespace caspar { namespace core { class read_frame; struct video_format_desc; +size_t consumer_buffer_depth(); + struct frame_consumer : boost::noncopyable { virtual ~frame_consumer() {} - virtual void send(const safe_ptr& frame) = 0; - virtual size_t buffer_depth() const = 0; + virtual bool send(const safe_ptr& frame) = 0; virtual void initialize(const video_format_desc& format_desc) = 0; virtual std::wstring print() const = 0; + virtual bool has_synchronization_clock() const {return true;} + virtual const core::video_format_desc& get_video_format_desc() const = 0; // nothrow static const safe_ptr& empty() { struct empty_frame_consumer : public frame_consumer { - virtual void send(const safe_ptr&){} - virtual size_t buffer_depth() const{return 0;} + core::video_format_desc format_desc; + virtual bool send(const safe_ptr&){return false;} virtual void initialize(const video_format_desc&){} virtual std::wstring print() const {return L"empty";} + virtual bool has_synchronization_clock() const {return false;} + virtual const core::video_format_desc& get_video_format_desc() const{return format_desc;}; // nothrow }; static safe_ptr consumer = make_safe(); return consumer;