]> git.sesse.net Git - casparcg/commitdiff
2.1.0: use UTF16 regex until we have a ICU build.
authorronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Tue, 6 Dec 2011 02:16:03 +0000 (02:16 +0000)
committerronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Tue, 6 Dec 2011 02:16:03 +0000 (02:16 +0000)
git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches/2.1.0@1801 362d55ac-95cf-4e76-9f9a-cbaa9c17b72d

core/producer/playlist/playlist_producer.cpp
modules/ffmpeg/producer/ffmpeg_producer.cpp
modules/flash/producer/cg_producer.cpp
version.tmpl

index 2c3f485839c8c39153448c8380f1546328826056..e4457bbbbad024913809d87b5af87b9f9ac5376a 100644 (file)
@@ -98,25 +98,26 @@ struct playlist_producer : public frame_producer
 \r
        // playlist_producer\r
 \r
-       std::string do_call(const std::string& param)\r
+       std::string do_call(const std::string& param2)\r
        {               \r
-               static const boost::regex push_front_exp        ("PUSH_FRONT (?<PARAM>.+)");            \r
-               static const boost::regex push_back_exp ("(PUSH_BACK|PUSH) (?<PARAM>.+)");\r
-               static const boost::regex pop_front_exp ("POP_FRONT");          \r
-               static const boost::regex pop_back_exp          ("(POP_BACK|POP)");\r
-               static const boost::regex clear_exp             ("CLEAR");\r
-               static const boost::regex next_exp                      ("NEXT");\r
-               static const boost::regex insert_exp            ("INSERT (?<POS>\\d+) (?<PARAM>.+)");   \r
-               static const boost::regex remove_exp            ("REMOVE (?<POS>\\d+) (?<PARAM>.+)");   \r
-               static const boost::regex list_exp                      ("LIST");                       \r
-               static const boost::regex loop_exp                      ("LOOP\\s*(?<VALUE>\\d?)");\r
+               auto param = u16(param2);\r
+               static const boost::wregex push_front_exp       (L"PUSH_FRONT (?<PARAM>.+)");           \r
+               static const boost::wregex push_back_exp        (L"(PUSH_BACK|PUSH) (?<PARAM>.+)");\r
+               static const boost::wregex pop_front_exp        (L"POP_FRONT");         \r
+               static const boost::wregex pop_back_exp         (L"(POP_BACK|POP)");\r
+               static const boost::wregex clear_exp            (L"CLEAR");\r
+               static const boost::wregex next_exp                     (L"NEXT");\r
+               static const boost::wregex insert_exp           (L"INSERT (?<POS>\\d+) (?<PARAM>.+)");  \r
+               static const boost::wregex remove_exp           (L"REMOVE (?<POS>\\d+) (?<PARAM>.+)");  \r
+               static const boost::wregex list_exp                     (L"LIST");                      \r
+               static const boost::wregex loop_exp                     (L"LOOP\\s*(?<VALUE>\\d?)");\r
                \r
-               boost::smatch what;\r
+               boost::wsmatch what;\r
 \r
                if(boost::regex_match(param, what, push_front_exp))\r
-                       return push_front(what["PARAM"].str()); \r
+                       return push_front(u8(what["PARAM"].str())); \r
                else if(boost::regex_match(param, what, push_back_exp))\r
-                       return push_back(what["PARAM"].str()); \r
+                       return push_back(u8(what["PARAM"].str())); \r
                if(boost::regex_match(param, what, pop_front_exp))\r
                        return pop_front(); \r
                else if(boost::regex_match(param, what, pop_back_exp))\r
@@ -126,7 +127,7 @@ struct playlist_producer : public frame_producer
                else if(boost::regex_match(param, what, next_exp))\r
                        return next(); \r
                else if(boost::regex_match(param, what, insert_exp))\r
-                       return insert(boost::lexical_cast<size_t>(what["POS"].str()), what["PARAM"].str());\r
+                       return insert(boost::lexical_cast<size_t>(what["POS"].str()), u8(what["PARAM"].str()));\r
                else if(boost::regex_match(param, what, remove_exp))\r
                        return erase(boost::lexical_cast<size_t>(what["POS"].str()));\r
                else if(boost::regex_match(param, what, list_exp))\r
index 8ad472d12d339bdc0e2f834fc83a892d17c1194c..f7a1cd149c6e3dfd9b8d134d760b6f0cb9afb1d3 100644 (file)
@@ -237,17 +237,17 @@ public:
                                        \r
        std::string do_call(const std::string& param)\r
        {\r
-               static const boost::regex loop_exp("LOOP\\s*(?<VALUE>\\d?)", boost::regex::icase);\r
-               static const boost::regex seek_exp("SEEK\\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::smatch what;\r
-               if(boost::regex_match(param, what, loop_exp))\r
+               boost::wsmatch what;\r
+               if(boost::regex_match(u16(param), what, loop_exp))\r
                {\r
                        if(!what["VALUE"].str().empty())\r
                                input_.loop(boost::lexical_cast<bool>(what["VALUE"].str()));\r
                        return boost::lexical_cast<std::string>(input_.loop());\r
                }\r
-               if(boost::regex_match(param, what, seek_exp))\r
+               if(boost::regex_match(u16(param), what, seek_exp))\r
                {\r
                        input_.seek(boost::lexical_cast<uint32_t>(what["VALUE"].str()));\r
                        return "";\r
index adbe00ff7970059c9d9c074464943cb5b900cbb6..7df2f8a873a29609380a1a6accb5785a67a4f656 100644 (file)
@@ -112,21 +112,22 @@ public:
                return flash_producer_->call(str);\r
        }\r
 \r
-       boost::unique_future<std::string> call(const std::string& str)\r
+       boost::unique_future<std::string> call(const std::string& str2)\r
        {               \r
-               static const boost::regex add_exp                       ("ADD (?<LAYER>\\d+) (?<FILENAME>[^\\s]+) (?<PLAY_ON_LOAD>\\d)( (?<DATA>.*))?");\r
-               static const boost::regex remove_exp            ("REMOVE (?<LAYER>\\d+)");\r
-               static const boost::regex play_exp                      ("PLAY (?<LAYER>\\d+)");\r
-               static const boost::regex stop_exp                      ("STOP (?<LAYER>\\d+)");\r
-               static const boost::regex next_exp                      ("NEXT (?<LAYER>\\d+)");\r
-               static const boost::regex update_exp            ("UPDATE (?<LAYER>\\d+) (?<DATA>.+)");\r
-               static const boost::regex invoke_exp            ("INVOKE (?<LAYER>\\d+) (?<LABEL>.+)");\r
-               static const boost::regex description_exp       ("INFO (?<LAYER>\\d+)");\r
-               static const boost::regex info_exp                      ("INFO");\r
+               auto str = u16(str2);\r
+               static const boost::wregex add_exp                      (L"ADD (?<LAYER>\\d+) (?<FILENAME>[^\\s]+) (?<PLAY_ON_LOAD>\\d)( (?<DATA>.*))?");\r
+               static const boost::wregex remove_exp           (L"REMOVE (?<LAYER>\\d+)");\r
+               static const boost::wregex play_exp                     (L"PLAY (?<LAYER>\\d+)");\r
+               static const boost::wregex stop_exp                     (L"STOP (?<LAYER>\\d+)");\r
+               static const boost::wregex next_exp                     (L"NEXT (?<LAYER>\\d+)");\r
+               static const boost::wregex update_exp           (L"UPDATE (?<LAYER>\\d+) (?<DATA>.+)");\r
+               static const boost::wregex invoke_exp           (L"INVOKE (?<LAYER>\\d+) (?<LABEL>.+)");\r
+               static const boost::wregex description_exp      (L"INFO (?<LAYER>\\d+)");\r
+               static const boost::wregex info_exp                     (L"INFO");\r
                \r
-               boost::smatch what;\r
+               boost::wsmatch what;\r
                if(boost::regex_match(str, what, add_exp))\r
-                       return add(boost::lexical_cast<int>(what["LAYER"].str()), flash::find_template(env::template_folder() + what["FILENAME"].str()), boost::lexical_cast<bool>(what["PLAY_ON_LOAD"].str()), "", what["DATA"].str()); \r
+                       return add(boost::lexical_cast<int>(what["LAYER"].str()), flash::find_template(env::template_folder() + u8(what["FILENAME"].str())), boost::lexical_cast<bool>(what["PLAY_ON_LOAD"].str()), "", u8(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, stop_exp))\r
@@ -134,15 +135,15 @@ public:
                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
+                       return update(boost::lexical_cast<int>(what["LAYER"].str()), u8(what["DATA"].str())); \r
                else if(boost::regex_match(str, what, next_exp))\r
-                       return invoke(boost::lexical_cast<int>(what["LAYER"].str()), what["LABE"].str()); \r
+                       return invoke(boost::lexical_cast<int>(what["LAYER"].str()), u8(what["LABE"].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 template_host_info(); \r
 \r
-               return flash_producer_->call(str);\r
+               return flash_producer_->call(str2);\r
        }\r
 \r
        safe_ptr<core::basic_frame> receive(int hints)\r
index 0dd05f7362b6091350408a438d18c11683d6d7ad..fecc8e0bf9344d69b300e47383853415a3efe6bc 100644 (file)
@@ -1,5 +1,5 @@
-#define CASPAR_GEN L"2"\r
-#define CASPAR_MAYOR L"0"\r
-#define CASPAR_MINOR L"2"\r
-#define CASPAR_REV L"$WCREV$"\r
-#define CASPAR_TAG L"BETA 3"\r
+#define CASPAR_GEN "2"\r
+#define CASPAR_MAYOR "1"\r
+#define CASPAR_MINOR "0"\r
+#define CASPAR_REV "$WCREV$"\r
+#define CASPAR_TAG "BETA 3"\r