]> git.sesse.net Git - casparcg/commitdiff
git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches...
authorronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Sun, 27 Nov 2011 19:20:57 +0000 (19:20 +0000)
committerronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Sun, 27 Nov 2011 19:20:57 +0000 (19:20 +0000)
modules/ffmpeg/producer/ffmpeg_producer.cpp
shell/casparcg.config

index 4d6dbf94c3e7e7b06029d0e2f65de1d69cf92ca6..d470f2282061ce1b5059da9ac890d0a0f3e7d484 100644 (file)
@@ -166,16 +166,7 @@ public:
                if(loop_)\r
                        return std::numeric_limits<int64_t>::max();\r
 \r
-               // This function estimates nb_frames until input has read all packets for one loop, at which point the count should be accurate.\r
-\r
-               int64_t nb_frames = input_.nb_frames();\r
-               if(input_.nb_loops() < 1) // input still hasn't counted all frames\r
-               {\r
-                       auto video_nb_frames = video_decoder_ ? video_decoder_->nb_frames() : std::numeric_limits<int64_t>::max();\r
-                       //auto audio_nb_frames = audio_decoder_ ? audio_decoder_->nb_frames() : std::numeric_limits<int64_t>::max();\r
-\r
-                       nb_frames = std::max(nb_frames, video_nb_frames);\r
-               }\r
+               auto nb_frames = file_nb_frames();\r
 \r
                nb_frames = std::min(static_cast<int64_t>(length_), nb_frames);\r
                nb_frames = muxer_->calc_nb_frames(nb_frames);\r
@@ -197,13 +188,28 @@ public:
                        return L"ffmpeg[" + boost::filesystem::wpath(filename_).filename() + L"|" \r
                                                          + boost::lexical_cast<std::wstring>(video_decoder_->width()) + L"x" + boost::lexical_cast<std::wstring>(video_decoder_->height())\r
                                                          + (video_decoder_->is_progressive() ? L"p" : L"i")  + boost::lexical_cast<std::wstring>(video_decoder_->is_progressive() ? video_decoder_->fps() : 2.0 * video_decoder_->fps())\r
-                                                         + L"|" + boost::lexical_cast<std::wstring>(nb_frames()) + L"]";\r
+                                                         + L"|" + boost::lexical_cast<std::wstring>(file_nb_frames()) + L"]";\r
                }\r
                \r
                return L"ffmpeg[" + boost::filesystem::wpath(filename_).filename() + L"]";\r
        }\r
 \r
        // ffmpeg_producer\r
+\r
+       int64_t file_nb_frames() const\r
+       {\r
+               // This function estimates nb_frames until input has read all packets for one loop, at which point the count should be accurate.\r
+\r
+               int64_t nb_frames = input_.nb_frames();\r
+               if(input_.nb_loops() < 1) // input still hasn't counted all frames\r
+               {\r
+                       auto video_nb_frames = video_decoder_ ? video_decoder_->nb_frames() : std::numeric_limits<int64_t>::max();\r
+                       //auto audio_nb_frames = audio_decoder_ ? audio_decoder_->nb_frames() : std::numeric_limits<int64_t>::max();\r
+\r
+                       nb_frames = std::max(nb_frames, video_nb_frames);\r
+               }\r
+               return nb_frames;\r
+       }\r
                                \r
        std::wstring do_call(const std::wstring& param)\r
        {\r
index 012bc52be0006874fcbf25934fe903c26f7e7a0f..69fbb41d76514c6ba82a2eee63f964175dfe5092 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>\r
 <configuration>\r
   <paths>\r
-    <media-path>media\</media-path>\r
+    <media-path>C:\casparmedia\_media\</media-path>\r
     <log-path>log\</log-path>\r
     <data-path>data\</data-path>\r
     <template-path>templates\</template-path>\r
     <channel>\r
       <video-mode>PAL</video-mode>\r
       <consumers>\r
-        <decklink>\r
-          <device>1</device>\r
-          <embedded-audio>true</embedded-audio>\r
-        </decklink>\r
+        <screen>\r
+        </screen>\r
       </consumers>\r
     </channel>\r
   </channels>\r