#pragma once
#include "../monitor/monitor.h"
+#include "../fwd.h"
#include <common/forward.h>
#include <common/future_fwd.h>
#include <common/memory.h>
-#include <common/reactive.h>
#include <boost/property_tree/ptree_fwd.hpp>
+#include <future>
+
FORWARD2(caspar, diagnostics, class graph);
namespace caspar { namespace core {
-
+
class output final
{
output(const output&);
// Constructors
- explicit output(spl::shared_ptr<diagnostics::graph> graph, const struct video_format_desc& format_desc, int channel_index);
-
+ explicit output(spl::shared_ptr<caspar::diagnostics::graph> graph, const video_format_desc& format_desc, const core::audio_channel_layout& channel_layout, int channel_index);
+
// Methods
- void operator()(class const_frame frame, const struct video_format_desc& format_desc);
-
- void add(const spl::shared_ptr<class frame_consumer>& consumer);
- void add(int index, const spl::shared_ptr<class frame_consumer>& consumer);
- void remove(const spl::shared_ptr<class frame_consumer>& consumer);
+ // Returns when submitted to consumers, but the future indicates when the consumers are ready for a new frame.
+ std::future<void> operator()(const_frame frame, const video_format_desc& format_desc, const core::audio_channel_layout& channel_layout);
+
+ void add(const spl::shared_ptr<frame_consumer>& consumer);
+ void add(int index, const spl::shared_ptr<frame_consumer>& consumer);
+ void remove(const spl::shared_ptr<frame_consumer>& consumer);
void remove(int index);
-
+
monitor::subject& monitor_output();
// Properties
std::future<boost::property_tree::wptree> info() const;
+ std::future<boost::property_tree::wptree> delay_info() const;
+ std::vector<spl::shared_ptr<const frame_consumer>> get_consumers() const;
private:
struct impl;
spl::shared_ptr<impl> impl_;
};
-}}
\ No newline at end of file
+}}