]> git.sesse.net Git - casparcg/commitdiff
2.0. ffmpeg_producer: Tweaked input buffer params.
authorronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Fri, 19 Aug 2011 10:54:47 +0000 (10:54 +0000)
committerronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Fri, 19 Aug 2011 10:54:47 +0000 (10:54 +0000)
git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches/2.0.0.2@1227 362d55ac-95cf-4e76-9f9a-cbaa9c17b72d

modules/ffmpeg/producer/format/flv.cpp
modules/ffmpeg/producer/input.cpp
modules/flash/producer/flash_producer.cpp
shell/casparcg.config
shell/shell.vcxproj
shell/shell.vcxproj.filters

index 0e87dcbeaef36befb0a7c978a128ebf46fb91f09..21b917a6581c439a5fb82e09e3a67d7d87dfc7c7 100644 (file)
 \r
 namespace caspar {\r
        \r
-double next_double(std::fstream& fileStream)\r
-{\r
-       std::vector<char> bytes(8);\r
-\r
-       auto tmp2 = fileStream.tellg();\r
-       tmp2;\r
-\r
-    fileStream.read(bytes.data(), 8);\r
-       \r
-       auto tmp3 = fileStream.gcount();\r
-       tmp3;\r
-\r
-       tmp2 = fileStream.tellg();\r
-       tmp2;\r
-\r
-       fileStream.seekg(1, std::ios::cur);\r
-       \r
-       tmp2 = fileStream.tellg();\r
-       tmp2;\r
-\r
-       std::reverse(bytes.begin(), bytes.end());\r
-       double* tmp = (double*)bytes.data();\r
-       \r
-    return *tmp;\r
-} \r
-\r
-bool next_bool(std::fstream& fileStream)\r
-{\r
-       std::vector<char> bytes(1);\r
-    fileStream.read(bytes.data(), bytes.size());\r
-       fileStream.seekg(1, std::ios::cur);\r
-    return bytes[0] != 0;\r
-}\r
-\r
 std::map<std::string, std::string> read_flv_meta_info(const std::string& filename)\r
 {\r
        std::map<std::string, std::string>  values;\r
@@ -84,7 +50,7 @@ std::map<std::string, std::string> read_flv_meta_info(const std::string& filenam
                                char data_type = *ptr++;\r
                                switch(data_type)\r
                                {\r
-                               case 0:\r
+                               case 0: // double\r
                                        {\r
                                                std::reverse(ptr, ptr+8);\r
                                                values[name] = boost::lexical_cast<std::string>(*(double*)(ptr));\r
@@ -92,7 +58,7 @@ std::map<std::string, std::string> read_flv_meta_info(const std::string& filenam
 \r
                                                break;\r
                                        }\r
-                               case 1:\r
+                               case 1: // bool\r
                                        {\r
                                                values[name] = boost::lexical_cast<std::string>(*ptr != 0);\r
                                                ptr += 2;\r
index 44d549fb2ecfedc8818ef593645b939de6dbd3ad..480e7e5d5282057518e78e979879cc32b6f59e05 100644 (file)
@@ -57,9 +57,9 @@ extern "C"
 \r
 namespace caspar {\r
 \r
-static const size_t MAX_BUFFER_COUNT = 50;\r
+static const size_t MAX_BUFFER_COUNT = 100;\r
 static const size_t MIN_BUFFER_COUNT = 4;\r
-static const size_t MAX_BUFFER_SIZE  = 32 * 1000000;\r
+static const size_t MAX_BUFFER_SIZE  = 16 * 1000000;\r
        \r
 struct input::implementation : boost::noncopyable\r
 {              \r
@@ -116,8 +116,8 @@ public:
                        read_next_packet();\r
                                                \r
                graph_->set_color("seek", diagnostics::color(1.0f, 0.5f, 0.0f));        \r
-               graph_->set_color("buffer-count", diagnostics::color(0.4f, 0.8f, 0.8f));\r
-               graph_->set_color("buffer-size", diagnostics::color(0.2f, 0.4f, 0.8f)); \r
+               graph_->set_color("buffer-count", diagnostics::color(0.7f, 0.4f, 0.4f));\r
+               graph_->set_color("buffer-size", diagnostics::color(1.0f, 1.0f, 0.0f)); \r
 \r
                thread_ = boost::thread([this]{run();});\r
        }\r
index cfc4ca7394e6a38cab75c768679a341e67110a41..554ce85e38bd5536e12b828db1bf06cd2404ad83 100644 (file)
@@ -279,7 +279,7 @@ public:
                fps_ = 0;\r
 \r
                graph_ = diagnostics::create_graph([this]{return print();});\r
-               graph_->set_color("output-buffer", diagnostics::color(0.0f, 1.0f, 0.0f));\r
+               graph_->set_color("output-buffer-count", diagnostics::color(1.0f, 1.0f, 0.0f));\r
                \r
                frame_buffer_.set_capacity(frame_factory_->get_video_format_desc().fps > 30.0 ? 2 : 1);\r
 \r
@@ -295,7 +295,7 @@ public:
                \r
        virtual safe_ptr<core::basic_frame> receive(int)\r
        {                               \r
-               graph_->set_value("output-buffer", static_cast<float>(frame_buffer_.size())/static_cast<float>(frame_buffer_.capacity()));\r
+               graph_->set_value("output-buffer-count", static_cast<float>(frame_buffer_.size())/static_cast<float>(frame_buffer_.capacity()));\r
 \r
                auto frame = core::basic_frame::late();\r
                if(frame_buffer_.try_pop(frame))\r
@@ -376,7 +376,7 @@ public:
                                        frame_buffer_.push(frame);\r
                                }\r
 \r
-                               graph_->set_value("output-buffer", static_cast<float>(frame_buffer_.size())/static_cast<float>(frame_buffer_.capacity()));      \r
+                               graph_->set_value("output-buffer-count", static_cast<float>(frame_buffer_.size())/static_cast<float>(frame_buffer_.capacity()));        \r
                                fps_.fetch_and_store(static_cast<int>(context_->fps()*100.0));\r
 \r
                                render(renderer);\r
index 0069a42fd01b638623e3a1ae61a563d71fcca189..20d4ea53e32695fa56d8c345775fb06f98e18414 100644 (file)
   </producers>\r
   <channels>\r
     <channel>\r
-      <video-mode>1080i5000</video-mode>\r
+      <video-mode>1080p5000</video-mode>\r
       <consumers>\r
         <decklink>\r
           <device>1</device>\r
           <low-latency>true</low-latency>\r
           <embedded-audio>true</embedded-audio>\r
         </decklink>\r
-        <screen>\r
-          <device>1</device>\r
-        </screen>\r
+      </consumers>\r
+    </channel>\r
+    <channel>\r
+      <video-mode>1080p5000</video-mode>\r
+      <consumers>\r
+        <decklink>\r
+          <device>2</device>\r
+          <low-latency>true</low-latency>\r
+          <embedded-audio>true</embedded-audio>\r
+        </decklink>\r
       </consumers>\r
     </channel>\r
 </channels>\r
index 244b58fdb95d265b924cb4a8ca5ef5d47f1adc10..03d70ddbdad499b3bbc1bf2337aaa8bdfe9e424d 100644 (file)
@@ -70,9 +70,6 @@
     <ClInclude Include="server.h" />\r
     <ClInclude Include="resource.h" />\r
   </ItemGroup>\r
-  <ItemGroup>\r
-    <ResourceCompile Include="shell.rc" />\r
-  </ItemGroup>\r
   <PropertyGroup Label="Globals">\r
     <ProjectGuid>{8C26C94F-8092-4769-8D84-DEA479721C5B}</ProjectGuid>\r
     <Keyword>Win32Proj</Keyword>\r
index d31f67e1fabcb520945d36bd28810740a8dbd102..8f6e62cc355c3a4c02c2aee910ff3e1e6793b89a 100644 (file)
@@ -20,9 +20,6 @@
       <Filter>source</Filter>\r
     </ClInclude>\r
   </ItemGroup>\r
-  <ItemGroup>\r
-    <ResourceCompile Include="shell.rc" />\r
-  </ItemGroup>\r
   <ItemGroup>\r
     <Filter Include="source">\r
       <UniqueIdentifier>{39e46848-dfec-441d-b0c0-f131380cdc6e}</UniqueIdentifier>\r