]> git.sesse.net Git - casparcg/blobdiff - core/producer/frame_producer.h
* Upgraded to Visual Studio 2013
[casparcg] / core / producer / frame_producer.h
index 14a391466e20dccb381d8d5826ff862a8ce3158f..f07852feb5d8cabdd9a896d53fcdd4dbac17d967 100644 (file)
@@ -56,7 +56,7 @@ struct constraints
 };
        
 // Interface
-class frame_producer : public monitor::observable, public interaction_sink
+class frame_producer : public interaction_sink
 {
        frame_producer(const frame_producer&);
        frame_producer& operator=(const frame_producer&);
@@ -74,14 +74,13 @@ public:
        // Methods      
 
        virtual class draw_frame                                        receive() = 0;
-       virtual boost::unique_future<std::wstring>      call(const std::vector<std::wstring>& params) = 0;
+       virtual std::future<std::wstring>                       call(const std::vector<std::wstring>& params) = 0;
        virtual variable&                                                       get_variable(const std::wstring& name) = 0;
        virtual const std::vector<std::wstring>&        get_variables() const = 0;
        
        // monitor::observable
 
-       virtual void subscribe(const monitor::observable::observer_ptr& o) = 0;
-       virtual void unsubscribe(const monitor::observable::observer_ptr& o) = 0;
+       virtual monitor::subject& monitor_output() = 0;
 
        // interaction_sink
        virtual void on_interaction(const interaction_event::ptr& event) override { }
@@ -97,6 +96,7 @@ public:
        virtual uint32_t                                                        nb_frames() const = 0;
        virtual uint32_t                                                        frame_number() const = 0;
        virtual class draw_frame                                        last_frame() = 0;
+       virtual class draw_frame                                        create_thumbnail_frame() = 0;
        virtual constraints&                                            pixel_constraints() = 0;
        virtual void                                                            leading_producer(const spl::shared_ptr<frame_producer>&) {}  
 };
@@ -109,7 +109,7 @@ public:
 
        // Methods      
 
-       virtual boost::unique_future<std::wstring>      call(const std::vector<std::wstring>& params) override;
+       virtual std::future<std::wstring>                       call(const std::vector<std::wstring>& params) override;
        virtual variable&                                                       get_variable(const std::wstring& name) override;
        virtual const std::vector<std::wstring>&        get_variables() const override;
        
@@ -121,6 +121,7 @@ public:
        uint32_t                                        nb_frames() const override;
        uint32_t                                        frame_number() const override;
        virtual class draw_frame        last_frame() override;
+       virtual class draw_frame        create_thumbnail_frame() override;
 
 private:
        virtual class draw_frame        receive() override;
@@ -133,10 +134,12 @@ private:
 
 typedef std::function<spl::shared_ptr<core::frame_producer>(const spl::shared_ptr<class frame_factory>&, const video_format_desc& format_desc, const std::vector<std::wstring>&)> producer_factory_t;
 void register_producer_factory(const producer_factory_t& factory); // Not thread-safe.
+void register_thumbnail_producer_factory(const producer_factory_t& factory); // Not thread-safe.
 
 spl::shared_ptr<core::frame_producer> create_producer(const spl::shared_ptr<frame_factory>&, const video_format_desc& format_desc, const std::vector<std::wstring>& params);
 spl::shared_ptr<core::frame_producer> create_producer(const spl::shared_ptr<frame_factory>&, const video_format_desc& format_desc, const std::wstring& params);
 
 spl::shared_ptr<core::frame_producer> create_destroy_proxy(spl::shared_ptr<core::frame_producer> producer);
+spl::shared_ptr<core::frame_producer> create_thumbnail_producer(const spl::shared_ptr<frame_factory>&, const video_format_desc& format_desc, const std::wstring& media_file);
 
 }}