Bug 1038564: Fix MediaCodecProxy build fail on flatfish device. r=cpearce

Although android::MediaCodec has been added into AOSP in level 16,
some APIs (ex. signalEndOfInputStream) we used in MediaCodecReader
were added into AOSP in level 18.
This commit is contained in:
Bruce Sun 2014-07-22 15:35:15 +08:00
parent 1af097e889
commit fe4865aafc
2 changed files with 4 additions and 4 deletions

View File

@ -42,7 +42,7 @@
#include "MediaOmxReader.h"
#include "nsIPrincipal.h"
#include "mozilla/dom/HTMLMediaElement.h"
#if ANDROID_VERSION >= 16
#if ANDROID_VERSION >= 18
#include "MediaCodecDecoder.h"
#include "MediaCodecReader.h"
#endif
@ -541,7 +541,7 @@ InstantiateDecoder(const nsACString& aType, MediaDecoderOwner* aOwner)
return nullptr;
}
}
#if ANDROID_VERSION >= 16
#if ANDROID_VERSION >= 18
decoder = MediaDecoder::IsOmxAsyncEnabled()
? static_cast<MediaDecoder*>(new MediaCodecDecoder())
: static_cast<MediaDecoder*>(new MediaOmxDecoder());
@ -637,7 +637,7 @@ MediaDecoderReader* DecoderTraits::CreateReader(const nsACString& aType, Abstrac
#endif
#ifdef MOZ_OMX_DECODER
if (IsOmxSupportedType(aType)) {
#if ANDROID_VERSION >= 16
#if ANDROID_VERSION >= 18
decoderReader = MediaDecoder::IsOmxAsyncEnabled()
? static_cast<MediaDecoderReader*>(new MediaCodecReader(aDecoder))
: static_cast<MediaDecoderReader*>(new MediaOmxReader(aDecoder));

View File

@ -48,7 +48,7 @@ if 'rtsp' in CONFIG['NECKO_PROTOCOLS']:
'RtspOmxReader.cpp',
]
if CONFIG['ANDROID_VERSION'] >= '16':
if CONFIG['ANDROID_VERSION'] and int(CONFIG['ANDROID_VERSION']) >= 18:
EXPORTS += [
'I420ColorConverterHelper.h',
'MediaCodecDecoder.h',