]> git.sesse.net Git - casparcg/commitdiff
2.0.2: ct-producer uses complete path.
authorronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Thu, 3 Nov 2011 18:39:14 +0000 (18:39 +0000)
committerronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Thu, 3 Nov 2011 18:39:14 +0000 (18:39 +0000)
       No template-host node found in config is no longer considered an error.

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

modules/decklink/interop/DeckLinkAPI_h.h
modules/decklink/interop/DeckLinkAPI_i.c
modules/flash/producer/cg_producer.cpp
modules/flash/producer/flash_producer.cpp
shell/casparcg.config

index df6064712e08e7ac64700698689610146c9e68b4..d499559cd4210f1ca4169f60e93449e1ccd2e9a7 100644 (file)
@@ -4,7 +4,7 @@
 \r
 \r
  /* File created by MIDL compiler version 7.00.0555 */\r
-/* at Wed Sep 21 23:31:49 2011\r
+/* at Mon Oct 31 09:47:48 2011\r
  */\r
 /* Compiler settings for interop\DeckLinkAPI.idl:\r
     Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 7.00.0555 \r
index 86e24837f50616ac7a8ab03eb3b957add041630a..3d4f6ea71ce7cd94a8e22708137cf56374c65282 100644 (file)
@@ -6,7 +6,7 @@
 \r
 \r
  /* File created by MIDL compiler version 7.00.0555 */\r
-/* at Wed Sep 21 23:31:49 2011\r
+/* at Mon Oct 31 09:47:48 2011\r
  */\r
 /* Compiler settings for interop\DeckLinkAPI.idl:\r
     Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 7.00.0555 \r
index da983e7515a7ff1c1b37189f4bba63f1f2380632..f3dbadcaf1c1a49669140dc243bd24f93949a4ae 100644 (file)
@@ -129,11 +129,11 @@ safe_ptr<core::frame_producer> create_ct_producer(const safe_ptr<core::frame_fac
        std::wstring filename = env::media_folder() + L"\\" + params[0] + L".ct";\r
        if(!boost::filesystem::exists(filename))\r
                return core::frame_producer::empty();\r
-       \r
-       boost::algorithm::replace_all(filename, L"\\", L"/");\r
-       boost::algorithm::replace_all(filename, L"//", L"/");\r
-       boost::algorithm::replace_all(filename, L"///", L"/");\r
-       \r
+               \r
+       boost::filesystem2::wpath path(filename);\r
+       path = boost::filesystem2::complete(path);\r
+       filename = path.file_string();\r
+\r
        auto flash_producer = flash::create_producer(frame_factory, boost::assign::list_of<std::wstring>());    \r
        auto producer = make_safe<cg_producer>(flash_producer);\r
        producer->add(0, filename, 1);\r
index a93e70f08784c6e5efc6f081e67b715a30bc0e8a..9ac975017b3b4aa683611be3aee444a7ebe42d5e 100644 (file)
@@ -95,28 +95,35 @@ struct template_host
 \r
 template_host get_template_host(const core::video_format_desc& desc)\r
 {\r
-       std::vector<template_host> template_hosts;\r
-       BOOST_FOREACH(auto& xml_mapping, env::properties().get_child("configuration.producers.template-hosts"))\r
+       try\r
        {\r
-               try\r
+               std::vector<template_host> template_hosts;\r
+               BOOST_FOREACH(auto& xml_mapping, env::properties().get_child("configuration.producers.template-hosts"))\r
                {\r
-                       template_host template_host;\r
-                       template_host.field_mode                = xml_mapping.second.get("video-mode", narrow(desc.name));\r
-                       template_host.filename                  = xml_mapping.second.get("filename", "cg.fth");\r
-                       template_host.width                             = xml_mapping.second.get("width", desc.width);\r
-                       template_host.height                    = xml_mapping.second.get("height", desc.height);\r
-                       template_hosts.push_back(template_host);\r
+                       try\r
+                       {\r
+                               template_host template_host;\r
+                               template_host.field_mode                = xml_mapping.second.get("video-mode", narrow(desc.name));\r
+                               template_host.filename                  = xml_mapping.second.get("filename", "cg.fth");\r
+                               template_host.width                             = xml_mapping.second.get("width", desc.width);\r
+                               template_host.height                    = xml_mapping.second.get("height", desc.height);\r
+                               template_hosts.push_back(template_host);\r
+                       }\r
+                       catch(...){}\r
                }\r
-               catch(...){}\r
-       }\r
 \r
-       auto template_host_it = boost::find_if(template_hosts, [&](template_host template_host){return template_host.field_mode == narrow(desc.name);});\r
-       if(template_host_it == template_hosts.end())\r
-               template_host_it = boost::find_if(template_hosts, [&](template_host template_host){return template_host.field_mode == "";});\r
+               auto template_host_it = boost::find_if(template_hosts, [&](template_host template_host){return template_host.field_mode == narrow(desc.name);});\r
+               if(template_host_it == template_hosts.end())\r
+                       template_host_it = boost::find_if(template_hosts, [&](template_host template_host){return template_host.field_mode == "";});\r
+\r
+               if(template_host_it != template_hosts.end())\r
+                       return *template_host_it;\r
+       }\r
+       catch(...)\r
+       {\r
+               CASPAR_LOG(info) << L" Found no correct template-host configuration. Using cg.fth.";\r
+       }\r
 \r
-       if(template_host_it != template_hosts.end())\r
-               return *template_host_it;\r
-       \r
        template_host template_host;\r
        template_host.filename = "cg.fth";\r
        template_host.width = desc.width;\r
index fd68da33d44d25098273c54831a476005604778f..1e09cf3bc144168835b1e42bd6a5e14002adedae 100644 (file)
@@ -9,39 +9,32 @@
   <diagnostics>\r
     <graphs>true</graphs>\r
   </diagnostics>\r
-  <consumers>\r
-    <buffer-depth>3</buffer-depth>\r
-  </consumers>\r
   <mixers>\r
     <blend-modes>false</blend-modes>\r
   </mixers>\r
   <producers>\r
-    <buffer-depth>1</buffer-depth>\r
     <auto-transcode>true</auto-transcode>\r
-    <template-hosts>\r
-      <template-host>\r
-        <video-mode>1080i5994</video-mode>\r
-        <filename>cg.fth.18.6000</filename>\r
-      </template-host>\r
-      <template-host>\r
-        <video-mode>1080p5000</video-mode>\r
-        <filename>cg.fth.18</filename>\r
-        <width>1280</width>\r
-        <height>720</height>\r
-      </template-host>\r
-    </template-hosts>\r
-    </producers>\r
-    <channels>\r
-      <channel>\r
-        <video-mode>1080p5000</video-mode>\r
-        <consumers>\r
-          <decklink>\r
-            <device>1</device>\r
-            <embedded-audio>true</embedded-audio>\r
-          </decklink>\r
-        </consumers>\r
-      </channel>\r
-    </channels>\r
+  </producers>\r
+  <channels>\r
+    <channel>\r
+      <video-mode>PAL</video-mode>\r
+      <consumers>\r
+        <bluefish>\r
+          <device>1</device>\r
+          <embedded-audio>true</embedded-audio>\r
+        </bluefish>\r
+      </consumers>\r
+    </channel>\r
+    <channel>\r
+      <video-mode>PAL</video-mode>\r
+      <consumers>\r
+        <screen>\r
+          <device>1</device>\r
+        </screen>\r
+        <system-audio/>\r
+      </consumers>\r
+    </channel>\r
+  </channels>\r
   <controllers>\r
     <tcp>\r
       <port>5250</port>\r
       </screen>\r
     </consumers>\r
 </channel>  \r
--->  \r
-  \r
+-->\r
+\r
 \r