]> git.sesse.net Git - casparcg/commitdiff
Updated CHANGES.txt and fixed minor problems
authorHelge Norberg <helge.norberg@gmail.com>
Tue, 12 Nov 2013 16:44:52 +0000 (17:44 +0100)
committerHelge Norberg <helge.norberg@gmail.com>
Tue, 12 Nov 2013 16:44:52 +0000 (17:44 +0100)
CHANGES.txt
modules/ffmpeg/producer/util/util.cpp
protocol/amcp/AMCPCommandsImpl.cpp

index 0829abd816f8f906ebbbe0369ad2e40495252861..c9f448fc4ed802428cbf0415cf1d458e52e2d9f9 100644 (file)
@@ -32,6 +32,8 @@ General
     corresponding layer existed.\r
   o Screen consumer: Added borderless option and correct handling of name\r
     option.\r
+  o AMCP: CLS now reports duration and framerate for MOVIE files were\r
+    information is possible to extract.\r
   o Version bump to keep up with CasparCG Client version.\r
 \r
 \r
index 79cacf0d81d71fa4d650c54aa5c4e925a41e3fef..92fd8c7f0e29ed4e5aac086782acf16d9e5dea14 100644 (file)
@@ -492,6 +492,10 @@ bool try_get_duration(const std::wstring filename, std::int64_t& duration, boost
        const auto rational_fps = boost::rational<std::int64_t>(static_cast<int>(fps * AV_TIME_BASE), AV_TIME_BASE);\r
        \r
        duration = boost::rational_cast<std::int64_t>(context->duration * rational_fps / AV_TIME_BASE);\r
+\r
+       if (rational_fps == 0)\r
+               return false;\r
+\r
        time_base = 1/rational_fps;\r
 \r
        return true;\r
index 2d1d12bccf8395c684c5e80927f0bfea941936f1..193c69f073869d3eac0bb227023df6e8a697f0af 100644 (file)
@@ -207,7 +207,7 @@ std::wstring MediaInfo(const boost::filesystem::wpath& path)
                std::wstring clipttype = TEXT(" N/A ");\r
                std::wstring extension = boost::to_upper_copy(path.extension());\r
                if(extension == TEXT(".TGA") || extension == TEXT(".COL") || extension == L".PNG" || extension == L".JPEG" || extension == L".JPG" ||\r
-                       extension == L"GIF" || extension == L"BMP")\r
+                       extension == L".GIF" || extension == L".BMP")\r
                {\r
                        clipttype = TEXT(" STILL ");                    \r
                }\r
@@ -215,11 +215,13 @@ std::wstring MediaInfo(const boost::filesystem::wpath& path)
                {\r
                        clipttype = TEXT(" AUDIO ");\r
                }\r
-               else if(extension == TEXT(".SWF") || extension == TEXT(".CT") || \r
-                           extension == TEXT(".DV") || extension == TEXT(".MOV") || \r
+               else if(extension == TEXT(".SWF") || extension == TEXT(".CT"))\r
+               {\r
+                       clipttype = TEXT(" MOVIE ");\r
+               }\r
+               else if(extension == TEXT(".DV") || extension == TEXT(".MOV") || \r
                                extension == TEXT(".MPG") || extension == TEXT(".AVI") || \r
                                extension == TEXT(".MP4") || extension == TEXT(".FLV") || \r
-                               extension == TEXT(".STGA") || \r
                                caspar::ffmpeg::is_valid_file(path.file_string()))\r
                {\r
                        ffmpeg::try_get_duration(path.file_string(), duration, time_base);\r