]> git.sesse.net Git - casparcg/commitdiff
2.0. amcp: List more file extension.
authorronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Tue, 14 Jun 2011 07:03:13 +0000 (07:03 +0000)
committerronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Tue, 14 Jun 2011 07:03:13 +0000 (07:03 +0000)
     ffmpeg: Enabled multithreaded H264 decoding.
     ffmpeg: Change extension appending for loading files.

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

modules/ffmpeg/producer/ffmpeg_producer.cpp
modules/ffmpeg/tbb_avcodec.cpp
protocol/StdAfx.h
protocol/amcp/AMCPCommandsImpl.cpp

index 9f315c640d7627824a6ca057ed51f759d23694e7..676b4a28efc6ef619f9772c0f167908ac12a1efe 100644 (file)
@@ -184,7 +184,7 @@ safe_ptr<core::frame_producer> create_ffmpeg_producer(const safe_ptr<core::frame
        \r
        auto ext = boost::find_if(extensions, [&](const std::wstring& ex)\r
        {                                       \r
-               return boost::filesystem::is_regular_file(boost::filesystem::wpath(filename).replace_extension(ex));\r
+               return boost::filesystem::is_regular_file(boost::filesystem::wpath(filename + L"." + ex));\r
        });\r
 \r
        if(ext == extensions.end())\r
index f88bac0c4003268699466d4100bfa22ae125d4f6..2e01cd87a50b6724490e85c10c0ab1ab96598110 100644 (file)
@@ -86,7 +86,8 @@ int tbb_avcodec_open(AVCodecContext* avctx, AVCodec* codec)
 {\r
        avctx->thread_count = 1;\r
        // Some codecs don't like to have multiple multithreaded decoding instances. Only enable for those we know work.\r
-       if(codec->id == CODEC_ID_MPEG2VIDEO && \r
+       if((codec->id == CODEC_ID_MPEG2VIDEO ||\r
+               codec->id == CODEC_ID_H264) && \r
          (codec->capabilities & CODEC_CAP_SLICE_THREADS) && \r
          (avctx->thread_type & FF_THREAD_SLICE))\r
        {\r
index 39c0419061f40358338c05301cebcbfdc7e3ccb8..6f7d529d73f169eac1172f4300b3eb4cff029f7e 100644 (file)
 \r
 #pragma once\r
 \r
+#include "../common/compiler/vs/disable_silly_warnings.h"\r
+\r
+#define NOMINMAX\r
+\r
+#if defined(_MSC_VER)\r
+#      ifndef _SCL_SECURE_NO_WARNINGS\r
+#              define _SCL_SECURE_NO_WARNINGS\r
+#      endif\r
+#      ifndef _CRT_SECURE_NO_WARNINGS\r
+#              define _CRT_SECURE_NO_WARNINGS\r
+#      endif\r
+#endif\r
+\r
+#if !defined(AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_)\r
+#define AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_\r
+\r
+#define BOOST_PARAMETER_MAX_ARITY 7\r
+\r
 #ifdef _DEBUG\r
 #include <crtdbg.h>\r
 #endif\r
 \r
-#define NOMINMAX\r
-\r
 #include <cstdint>\r
 #include <winsock2.h>\r
 #include <tchar.h>\r
 #include <string>\r
 #include <math.h>\r
 \r
+#include <tbb/atomic.h>\r
+#include <tbb/concurrent_queue.h>\r
+#include <tbb/concurrent_unordered_map.h>\r
+#include <tbb/parallel_invoke.h>\r
+#include <tbb/parallel_for.h>\r
+#include <tbb/parallel_for_each.h>\r
+\r
 #include <boost/assign.hpp>\r
 #include <boost/filesystem.hpp>\r
 #include <boost/foreach.hpp>\r
@@ -56,3 +79,7 @@
 #include "../common/log/Log.h"\r
 #include "../common/exception/exceptions.h"\r
 #include "../common/exception/win32_exception.h"\r
+\r
+#include <assert.h>\r
+\r
+#endif\r
index 59a059baf30482f173afe04a8cbafbe8e03ce623..f64c36066d6d06258a806219e53e14967d0aa2c7 100644 (file)
@@ -88,10 +88,13 @@ std::wstring ListMedia()
                {\r
                        std::wstring clipttype = TEXT(" N/A ");\r
                        std::wstring extension = boost::to_upper_copy(itr->path().extension());\r
-                       if(extension == TEXT(".TGA") || extension == TEXT(".COL"))\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
                                clipttype = TEXT(" STILL ");\r
                        else if(extension == TEXT(".SWF") || extension == TEXT(".DV") || extension == TEXT(".MOV") || extension == TEXT(".MPG") || \r
-                                       extension == TEXT(".AVI") || extension == TEXT(".FLV") || extension == TEXT(".F4V") || extension == TEXT(".MP4"))\r
+                                       extension == TEXT(".AVI") || extension == TEXT(".FLV") || extension == TEXT(".F4V") || extension == TEXT(".MP4") ||\r
+                                       extension == L".M2V" || extension == L".H264" || extension == L".MKV" || extension == L".WMV" || extension == L".DIVX" || \r
+                                       extension == L".XVID" || extension == L".OGG")\r
                                clipttype = TEXT(" MOVIE ");\r
                        else if(extension == TEXT(".WAV") || extension == TEXT(".MP3"))\r
                                clipttype = TEXT(" STILL ");\r