]> git.sesse.net Git - casparcg/blobdiff - core/producer/layer.cpp
2.0. Applied tk3 patch, STATUS command for layer status querying.
[casparcg] / core / producer / layer.cpp
index 9ba6acaa5360094278f057d4cb138de55702c89f..9010954f4b587c8ac020c214d94b0ae205aedeef 100644 (file)
@@ -120,6 +120,18 @@ public:
                }\r
        }\r
 \r
+       layer_status status() const\r
+       {\r
+               layer_status status;\r
+               status.foreground        = foreground_->print();\r
+               status.background        = background_->print();\r
+               status.is_paused         = is_paused_;\r
+               status.total_frames      = foreground_->nb_frames();\r
+               status.current_frame = frame_number_;\r
+\r
+               return status;\r
+       }\r
+\r
        bool empty() const\r
        {\r
                return background_ == core::frame_producer::empty() && foreground_ == core::frame_producer::empty();\r
@@ -148,6 +160,9 @@ void layer::load(const safe_ptr<frame_producer>& frame_producer, bool preview, i
 void layer::play(){impl_->play();}\r
 void layer::pause(){impl_->pause();}\r
 void layer::stop(){impl_->stop();}\r
+bool layer::is_paused() const{return impl_->is_paused_;}\r
+int64_t layer::frame_number() const{return impl_->frame_number_;}\r
+layer_status layer::status() const {return impl_->status();}\r
 safe_ptr<basic_frame> layer::receive() {return impl_->receive();}\r
 safe_ptr<frame_producer> layer::foreground() const { return impl_->foreground_;}\r
 safe_ptr<frame_producer> layer::background() const { return impl_->background_;}\r