]> git.sesse.net Git - casparcg/blobdiff - protocol/amcp/AMCPCommandQueue.h
Merged INFO QUEUES from 2.0
[casparcg] / protocol / amcp / AMCPCommandQueue.h
index f1fb2c63c522f089d54992ae8e6fed41c508b472..ff78f3e04c05f71511624a605897cd8699886a41 100644 (file)
@@ -25,6 +25,9 @@
 
 #include <common/executor.h>
 #include <common/memory.h>
+#include <common/timer.h>
+
+#include <boost/property_tree/ptree_fwd.hpp>
 
 #include <tbb/mutex.h>
 
@@ -37,13 +40,21 @@ class AMCPCommandQueue
 public:
        typedef spl::shared_ptr<AMCPCommandQueue> ptr_type;
 
-       AMCPCommandQueue();
+       AMCPCommandQueue(const std::wstring& name);
        ~AMCPCommandQueue();
 
        void AddCommand(AMCPCommand::ptr_type pCommand);
 
+       boost::property_tree::wptree info() const;
+
+       static boost::property_tree::wptree info_all_queues();
 private:
-       executor                        executor_;
+       executor                                executor_;
+       mutable tbb::spin_mutex running_command_mutex_;
+       bool                                    running_command_                = false;
+       std::wstring                    running_command_name_;
+       std::wstring                    running_command_params_;
+       caspar::timer                   running_command_since_;
 };
 
 }}}