Merge pull request #2829 from akallabeth/mf_compile_option

media foundation support now a compile time option.
This commit is contained in:
Marc-André Moreau 2015-08-27 10:00:47 -04:00
commit f7ea8d1832
3 changed files with 5 additions and 2 deletions

View File

@ -43,6 +43,8 @@ endif()
if(NOT WIN32)
option(WITH_VALGRIND_MEMCHECK "Compile with valgrind helpers." OFF)
else()
option(WITH_MEDIA_FOUNDATION "Enable H264 media foundation decoder." ON)
endif()
if(MSVC)

View File

@ -63,6 +63,7 @@
#cmakedefine WITH_IOSAUDIO
#cmakedefine WITH_OPENSLES
#cmakedefine WITH_GSM
#cmakedefine WITH_MEDIA_FOUNDATION
/* Plugins */
#cmakedefine STATIC_CHANNELS

View File

@ -62,7 +62,7 @@ static H264_CONTEXT_SUBSYSTEM g_Subsystem_dummy =
* Media Foundation subsystem
*/
#ifdef _WIN32
#if defined(_WIN32) && defined(WITH_MEDIA_FOUNDATION)
#include <ks.h>
#include <codecapi.h>
@ -1479,7 +1479,7 @@ error_1:
BOOL h264_context_init(H264_CONTEXT* h264)
{
#ifdef _WIN32
#if defined(_WIN32) && defined(WITH_MEDIA_FOUNDATION)
if (g_Subsystem_MF.Init(h264))
{
h264->subsystem = &g_Subsystem_MF;