]> git.sesse.net Git - casparcg/commitdiff
- Fixed inconsistent INFO xml with transition producer.
authorronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Thu, 15 Dec 2011 16:14:12 +0000 (16:14 +0000)
committerronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Thu, 15 Dec 2011 16:14:12 +0000 (16:14 +0000)
- Fixed LOOP query.
- Send error on failed CALL.

git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/trunk@1895 362d55ac-95cf-4e76-9f9a-cbaa9c17b72d

core/producer/frame_producer.h
core/producer/layer.cpp
modules/ffmpeg/producer/ffmpeg_producer.cpp
protocol/amcp/AMCPCommandsImpl.cpp
protocol/amcp/AMCPCommandsImpl.h
shell/casparcg.config

index 5375707c37625cdc6ba1500b8fb65a4bfc9a353e..e26432d6770f32d73aebb0e15b89aba694292008 100644 (file)
@@ -22,6 +22,7 @@
 #pragma once\r
 \r
 #include <common/memory/safe_ptr.h>\r
+#include <common/exception/exceptions.h>\r
 \r
 #include <boost/noncopyable.hpp>\r
 \r
@@ -61,9 +62,7 @@ public:
 \r
        virtual boost::unique_future<std::wstring> call(const std::wstring&) \r
        {\r
-               boost::promise<std::wstring> promise;\r
-               promise.set_value(L"");\r
-               return promise.get_future();\r
+               BOOST_THROW_EXCEPTION(not_supported());\r
        }\r
 \r
        virtual safe_ptr<frame_producer> get_following_producer() const {return frame_producer::empty();}  // nothrow\r
index 2a5cfe5368a2fb8fed943562dfdc3550435b1c8b..c9a6f0516dd47065a91d7ef0d9a5f6c14ce80461 100644 (file)
@@ -148,8 +148,8 @@ public:
 \r
                info.add(L"nb_frames",   nb_frames == std::numeric_limits<int64_t>::max() ? -1 : nb_frames);\r
                info.add(L"frames-left", nb_frames == std::numeric_limits<int64_t>::max() ? -1 : (foreground_->nb_frames() - frame_number_ - auto_play_delta_));\r
-               info.add_child(L"foreground", foreground_->info());\r
-               info.add_child(L"background", background_->info());\r
+               info.add_child(L"foreground.producer", foreground_->info());\r
+               info.add_child(L"background.producer", background_->info());\r
                return info;\r
        }\r
 };\r
index 6975901a2516809bc4536fe9839b3601756da1fa..c555fe2534232ba0e01c7f6a87fee782dc383f89 100644 (file)
@@ -234,7 +234,7 @@ public:
                                        \r
        std::wstring do_call(const std::wstring& param)\r
        {\r
-               static const boost::wregex loop_exp(L"LOOP\\s*(?<VALUE>\\d?)", boost::regex::icase);\r
+               static const boost::wregex loop_exp(L"LOOP\\s*(?<VALUE>\\d?)?", boost::regex::icase);\r
                static const boost::wregex seek_exp(L"SEEK\\s+(?<VALUE>\\d+)", boost::regex::icase);\r
                \r
                boost::wsmatch what;\r
index 64382752c9267f3359969ece0c74c05b81486106..02fdffd51c12df16ad5972b2d451fb718aab54d7 100644 (file)
@@ -227,19 +227,23 @@ bool CallCommand::DoExecute()
        try\r
        {\r
                auto what = _parameters.at(0);\r
-\r
-               std::wstring param = _parameters2.at(1);\r
-               for(auto it = std::begin(_parameters2)+2; it != std::end(_parameters2); ++it)\r
-                       param += L" " + *it;\r
-               \r
+                               \r
                boost::unique_future<std::wstring> result;\r
-               if(what == L"B")\r
-                       result = GetChannel()->stage()->call(GetLayerIndex(), false, param);\r
-               else if(what == L"F")\r
-                       result = GetChannel()->stage()->call(GetLayerIndex(), true, param);\r
+               if(what == L"B" || what == L"F")\r
+               {\r
+                       std::wstring param;\r
+                       for(auto it = std::begin(_parameters2)+1; it != std::end(_parameters2); ++it, param += L" ")\r
+                               param += *it;\r
+                       result = GetChannel()->stage()->call(GetLayerIndex(), what == L"F", boost::trim_copy(param));\r
+               }\r
                else\r
-                       result = GetChannel()->stage()->call(GetLayerIndex(), true, _parameters.at(0) + L" " + param);\r
-       \r
+               {\r
+                       std::wstring param;\r
+                       for(auto it = std::begin(_parameters2); it != std::end(_parameters2); ++it, param += L" ")\r
+                               param += *it;\r
+                       result = GetChannel()->stage()->call(GetLayerIndex(), true, boost::trim_copy(param));\r
+               }\r
+\r
                if(!result.timed_wait(boost::posix_time::seconds(2)))\r
                        BOOST_THROW_EXCEPTION(timed_out());\r
 \r
index 1e5be6eb7cf1305b117674a30aee696b0b0f7ff5..c17766880ed5a0e85224ff33614e92cdef2bae40 100644 (file)
@@ -38,7 +38,7 @@ class DiagnosticsCommand : public AMCPCommandBase<false, AddToQueue, 0>
        bool DoExecute();\r
 };\r
 \r
-class CallCommand : public AMCPCommandBase<true, AddToQueue, 2>\r
+class CallCommand : public AMCPCommandBase<true, AddToQueue, 1>\r
 {\r
        std::wstring print() const { return L"CallCommand";}\r
        bool DoExecute();\r
index 021f01bd6fffe0f1dda71d1f2705a470bedea387..07893501e4de44f2cf832b3661eb67743334f901 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>\r
 <configuration>\r
   <paths>\r
-    <media-path>D:\casparcg\_media\</media-path>\r
+    <media-path>C:\casparmedia\_media\</media-path>\r
     <log-path>D:\casparcg\_log\</log-path>\r
     <data-path>D:\casparcg\_data\</data-path>\r
     <template-path>D:\casparcg\_templates\</template-path>\r