]> git.sesse.net Git - casparcg/blobdiff - modules/flash/producer/cg_producer.cpp
#297 Fixed support for flash templates with spaces in the file name.
[casparcg] / modules / flash / producer / cg_producer.cpp
index 42a22421d58e1d84a81eb67aa348962427e43c47..85cd830f23e3c3db93287232c7863267e748325d 100644 (file)
@@ -118,7 +118,7 @@ public:
 \r
        boost::unique_future<std::wstring> call(const std::wstring& str)\r
        {               \r
-               static const boost::wregex add_exp                      (L"ADD (?<LAYER>\\d+) (?<FILENAME>[^\\s]+) (?<PLAY_ON_LOAD>\\d)( (?<DATA>.*))?", boost::regex::perl|boost::regex::icase);\r
+               static const boost::wregex add_exp                      (L"ADD (?<LAYER>\\d+) \"(?<FILENAME>[^\"]*)\" (?<PLAY_ON_LOAD>\\d)( (?<DATA>.*))?", boost::regex::perl|boost::regex::icase);\r
                static const boost::wregex remove_exp           (L"REMOVE (?<LAYER>\\d+)", boost::regex::perl|boost::regex::icase);\r
                static const boost::wregex play_exp                     (L"PLAY (?<LAYER>\\d+)", boost::regex::perl|boost::regex::icase);\r
                static const boost::wregex stop_exp                     (L"STOP (?<LAYER>\\d+)", boost::regex::perl|boost::regex::icase);\r
@@ -138,18 +138,18 @@ public:
                                        what["DATA"].str());\r
                else if(boost::regex_match(str, what, remove_exp))\r
                        return remove(boost::lexical_cast<int>(what["LAYER"].str()));\r
+               else if(boost::regex_match(str, what, play_exp))\r
+                       return play(boost::lexical_cast<int>(what["LAYER"].str()));\r
                else if(boost::regex_match(str, what, stop_exp))\r
                        return stop(boost::lexical_cast<int>(what["LAYER"].str()), 0);\r
                else if(boost::regex_match(str, what, next_exp))\r
                        return next(boost::lexical_cast<int>(what["LAYER"].str()));\r
                else if(boost::regex_match(str, what, update_exp))\r
                        return update(boost::lexical_cast<int>(what["LAYER"].str()), what["DATA"].str());\r
-               else if(boost::regex_match(str, what, next_exp))\r
+               else if(boost::regex_match(str, what, invoke_exp))\r
                        return invoke(boost::lexical_cast<int>(what["LAYER"].str()), what["LABEL"].str());\r
                else if(boost::regex_match(str, what, description_exp))\r
                        return description(boost::lexical_cast<int>(what["LAYER"].str()));\r
-               else if(boost::regex_match(str, what, invoke_exp))\r
-                       return invoke(boost::lexical_cast<int>(what["LAYER"].str()), what["LABEL"].str());\r
                else if(boost::regex_match(str, what, info_exp))\r
                        return template_host_info(); \r
 \r