#include <core/producer/transition/transition_producer.h>\r
#include <core/producer/frame/image_transform.h>\r
#include <core/producer/frame/audio_transform.h>\r
+#include <core/producer/stage.h>\r
+#include <core/producer/layer.h>\r
#include <core/mixer/mixer.h>\r
#include <core/consumer/output.h>\r
\r
return true;\r
}\r
\r
+bool StatusCommand::DoExecute()\r
+{ \r
+ if (GetLayerIndex() > -1)\r
+ {\r
+ auto status = GetChannel()->stage()->get_status(GetLayerIndex());\r
+ std::wstringstream status_text;\r
+ status_text\r
+ << L"202 STATUS OK\r\n"\r
+ << L"FOREGROUND:" << status.foreground << L"\r\n"\r
+ << L"BACKGROUND:" << status.background << L"\r\n"\r
+ << L"STATUS:" << (status.is_paused ? L"PAUSED" : L"PLAYING") << L"\r\n"\r
+ << L"TOTAL FRAMES:" << (status.total_frames == std::numeric_limits<int64_t>::max() ? 0 : status.total_frames) << L"\r\n"\r
+ << L"CURRENT FRAME:" << status.current_frame << L"\r\n";\r
+\r
+ SetReplyString(status_text.str());\r
+ return true;\r
+ }\r
+ else\r
+ {\r
+ //NOTE: Possible to extend soo that "channel" status is returned when no layer is specified.\r
+\r
+ SetReplyString(TEXT("403 LAYER MUST BE SPECIFIED\r\n"));\r
+ return false;\r
+ }\r
+}\r
+\r
bool LogCommand::DoExecute()\r
{\r
if(_parameters.at(0) == L"LEVEL")\r