Bug 1240630: [ffmpeg] P3. Only build FFmpeg on mac and unixes. r=kentuckyfriedtakahe

This is a partial revert of bug 1214462 part2. We don't need FFmpeg support on Android or Windows anymore; instead the functionality is provided by the FFVPX PDM.
Remove support for FFmpeg on Windows.
This commit is contained in:
Jean-Yves Avenard 2016-01-19 22:00:03 +11:00
parent 5e509628ae
commit 47167615df
5 changed files with 20 additions and 32 deletions

View File

@ -3746,7 +3746,7 @@ if test -n "$MOZ_FMP4"; then
else
MOZ_FMP4=
fi
MOZ_FFMPEG=1
MOZ_FFMPEG=
MOZ_WEBRTC=1
MOZ_PEERCONNECTION=
MOZ_SRTP=
@ -5234,6 +5234,14 @@ fi;
dnl ========================================================
dnl FFmpeg H264/AAC Decoding Support
dnl ========================================================
case "$OS_TARGET" in
WINNT|Android)
;;
*)
MOZ_FFMPEG=1
;;
esac
MOZ_ARG_DISABLE_BOOL(ffmpeg,
[ --disable-ffmpeg Disable FFmpeg for fragmented H264/AAC decoding],
MOZ_FFMPEG=,

View File

@ -44,7 +44,6 @@ PRLibrary* FFmpegRuntimeLinker::sLinkedLib = nullptr;
PRLibrary* FFmpegRuntimeLinker::sLinkedUtilLib = nullptr;
static unsigned (*avcodec_version)() = nullptr;
#if !defined(XP_WIN)
#ifdef __GNUC__
#define AV_FUNC(func, ver) void (*func)();
#define LIBAVCODEC_ALLVERSION
@ -53,7 +52,6 @@ static unsigned (*avcodec_version)() = nullptr;
#endif
#include "FFmpegFunctionList.h"
#undef AV_FUNC
#endif
static PRLibrary*
MozAVLink(const char* aName)
@ -70,7 +68,6 @@ FFmpegRuntimeLinker::Link()
if (sLinkStatus) {
return sLinkStatus == LinkStatus_SUCCEEDED;
}
#if !defined(XP_WIN)
MOZ_ASSERT(NS_IsMainThread());
for (size_t i = 0; i < ArrayLength(sLibs); i++) {
@ -94,7 +91,6 @@ FFmpegRuntimeLinker::Link()
FFMPEG_LOG(" ]\n");
Unlink();
#endif
sLinkStatus = LinkStatus_FAILED;
return false;
@ -103,9 +99,6 @@ FFmpegRuntimeLinker::Link()
/* static */ bool
FFmpegRuntimeLinker::Bind(const char* aLibName)
{
#if defined(XP_WIN)
return false;
#else
avcodec_version = (decltype(avcodec_version))PR_FindSymbol(sLinkedLib,
"avcodec_version");
uint32_t major, minor, micro;
@ -152,15 +145,11 @@ FFmpegRuntimeLinker::Bind(const char* aLibName)
#include "FFmpegFunctionList.h"
#undef AV_FUNC
return true;
#endif
}
/* static */ already_AddRefed<PlatformDecoderModule>
FFmpegRuntimeLinker::CreateDecoderModule()
{
#if defined(XP_WIN)
return nullptr;
#else
if (!Link()) {
return nullptr;
}
@ -179,7 +168,6 @@ FFmpegRuntimeLinker::CreateDecoderModule()
default: module = nullptr;
}
return module.forget();
#endif
}
/* static */ void

View File

@ -21,9 +21,5 @@ if CONFIG['CLANG_CXX']:
CXXFLAGS += [
'-Wno-unknown-attributes',
]
if CONFIG['_MSC_VER']:
CXXFLAGS += [
'-wd4996', # deprecated declaration
]
FINAL_LIBRARY = 'xul'

View File

@ -21,9 +21,5 @@ if CONFIG['CLANG_CXX']:
CXXFLAGS += [
'-Wno-unknown-attributes',
]
if CONFIG['_MSC_VER']:
CXXFLAGS += [
'-wd4996', # deprecated declaration
]
FINAL_LIBRARY = 'xul'

View File

@ -38,6 +38,11 @@ if CONFIG['MOZ_WMF']:
if CONFIG['MOZ_EME']:
DIRS += ['agnostic/eme']
if CONFIG['MOZ_FFVPX']:
DIRS += [
'ffmpeg/ffvpx',
]
if CONFIG['MOZ_FFMPEG']:
EXPORTS += [
'ffmpeg/FFmpegRuntimeLinker.h',
@ -45,17 +50,12 @@ if CONFIG['MOZ_FFMPEG']:
UNIFIED_SOURCES += [
'ffmpeg/FFmpegRuntimeLinker.cpp',
]
if CONFIG['MOZ_FFVPX']:
DIRS += [
'ffmpeg/ffvpx',
]
if CONFIG['OS_ARCH'] != 'WINNT':
DIRS += [
'ffmpeg/libav53',
'ffmpeg/libav54',
'ffmpeg/libav55',
'ffmpeg/ffmpeg57',
]
DIRS += [
'ffmpeg/libav53',
'ffmpeg/libav54',
'ffmpeg/libav55',
'ffmpeg/ffmpeg57',
]
if CONFIG['MOZ_APPLEMEDIA']:
EXPORTS += [