]> git.sesse.net Git - casparcg/blobdiff - core/consumer/output.h
Created a consumer that provides sync to a channel based on the pace of another chann...
[casparcg] / core / consumer / output.h
index 7af724adcdd940e0eb026be0824a0e5bf49792b8..bd75385c715a7119e2be6315e76f785b2f3c8351 100644 (file)
 #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&);
@@ -45,27 +46,29 @@ public:
 
        // Constructors
 
-       explicit output(spl::shared_ptr<diagnostics::graph> graph, const 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()(const_frame frame, const video_format_desc& format_desc);
-       
+       // 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
+}}