]> git.sesse.net Git - casparcg/blobdiff - core/producer/scene/scene_producer.h
[scene_producer] Made it possible for keyframe values to be expressions instead of...
[casparcg] / core / producer / scene / scene_producer.h
index 533091cd4d362dfc1687c576c81d0bd2d7a5b451..aca30f6b60fb720b191d178d585e36d19e95815c 100644 (file)
 #include <common/log.h>
 
 #include "../frame_producer.h"
+#include "../../fwd.h"
 
 #include "../binding.h"
 #include "../variable.h"
 
-namespace caspar { namespace core {
-
-class frame_factory;
-
-namespace scene {
+namespace caspar { namespace core { namespace scene {
 
 struct coord
 {
@@ -63,10 +60,14 @@ struct adjustments
 
 struct chroma_key
 {
-       binding<core::chroma::type>     key;
-       binding<double>                         threshold;
+       binding<bool>                           enable;
+       binding<double>                         target_hue;
+       binding<double>                         hue_width;
+       binding<double>                         min_saturation;
+       binding<double>                         min_brightness;
        binding<double>                         softness;
        binding<double>                         spill;
+       binding<double>                         spill_darken;
 };
 
 struct layer
@@ -114,10 +115,10 @@ mark_action get_mark_action(const std::wstring& name);
 class scene_producer : public frame_producer_base
 {
 public:
-       scene_producer(int width, int height, const video_format_desc& format_desc);
+       scene_producer(std::wstring producer_name, int width, int height, const video_format_desc& format_desc);
        ~scene_producer();
 
-       class draw_frame receive_impl() override;
+       draw_frame receive_impl() override;
        constraints& pixel_constraints() override;
        void on_interaction(const interaction_event::ptr& event) override;
        bool collides(double x, double y) const override;
@@ -131,7 +132,9 @@ public:
                        const spl::shared_ptr<frame_producer>& producer, int x, int y, const std::wstring& name);
        layer& create_layer(
                        const spl::shared_ptr<frame_producer>& producer, const std::wstring& name);
-       binding<int64_t> frame();
+       void reverse_layers();
+
+       binding<int64_t> timeline_frame();
        binding<double> speed();
 
        template<typename T> binding<T>& create_variable(
@@ -196,7 +199,7 @@ public:
                                                        static_cast<double>(duration)));
 
                                        to_affect.set(tweened);
-                                       
+
                                        //CASPAR_LOG(info) << relative_frame << L" " << *start_value << L" " << duration << L" " << tweened;
                                };
 
@@ -235,6 +238,4 @@ private:
        std::unique_ptr<impl> impl_;
 };
 
-spl::shared_ptr<frame_producer> create_dummy_scene_producer(const spl::shared_ptr<frame_factory>& frame_factory, const video_format_desc& format_desc, const std::vector<std::wstring>& params);
-
 }}}