Bug 869251 - Disable omx decoder and camera on gonk-JB, r=doublec,glandium

This commit is contained in:
Michael Wu 2013-05-02 17:21:22 -04:00
parent db7eb10d60
commit d59dd9ac0f
10 changed files with 20 additions and 14 deletions

View File

@ -205,6 +205,10 @@ if test -n "$gonkdir" ; then
15)
GONK_INCLUDES="-I$gonkdir/frameworks/base/opengl/include -I$gonkdir/frameworks/base/native/include -I$gonkdir/frameworks/base/include -I$gonkdir/frameworks/base/services/camera -I$gonkdir/frameworks/base/include/media/stagefright -I$gonkdir/frameworks/base/include/media/stagefright/openmax -I$gonkdir/frameworks/base/media/libstagefright/rtsp -I$gonkdir/frameworks/base/media/libstagefright/include -I$gonkdir/external/dbus -I$gonkdir/external/bluetooth/bluez/lib -I$gonkdir/dalvik/libnativehelper/include/nativehelper"
MOZ_B2G_BT=1
MOZ_B2G_CAMERA=1
MOZ_OMX_DECODER=1
AC_DEFINE(MOZ_OMX_DECODER)
AC_SUBST(MOZ_OMX_DECODER)
;;
17)
GONK_INCLUDES="-I$gonkdir/frameworks/native/include"

View File

@ -39,7 +39,7 @@
#include "MediaPluginReader.h"
#include "MediaPluginHost.h"
#endif
#ifdef MOZ_WIDGET_GONK
#ifdef MOZ_OMX_DECODER
#include "MediaOmxDecoder.h"
#include "MediaOmxReader.h"
#include "nsIPrincipal.h"
@ -196,7 +196,7 @@ IsGStreamerSupportedType(const nsACString& aMimeType)
}
#endif
#ifdef MOZ_WIDGET_GONK
#ifdef MOZ_OMX_DECODER
static const char* const gOmxTypes[7] = {
"audio/mpeg",
"audio/mp4",
@ -334,7 +334,7 @@ DecoderTraits::CanHandleMediaType(const char* aMIMEType,
return CANPLAY_MAYBE;
}
#endif
#ifdef MOZ_WIDGET_GONK
#ifdef MOZ_OMX_DECODER
if (IsOmxSupportedType(nsDependentCString(aMIMEType))) {
codecList = gH264Codecs;
result = CANPLAY_MAYBE;
@ -400,7 +400,7 @@ DecoderTraits::CreateDecoder(const nsACString& aType, MediaDecoderOwner* aOwner)
decoder = new WaveDecoder();
}
#endif
#ifdef MOZ_WIDGET_GONK
#ifdef MOZ_OMX_DECODER
if (IsOmxSupportedType(aType)) {
// AMR audio is enabled for MMS, but we are discouraging Web and App
// developers from using AMR, thus we only allow AMR to be played on WebApps.
@ -472,7 +472,7 @@ MediaDecoderReader* DecoderTraits::CreateReader(const nsACString& aType, Abstrac
decoderReader = new WaveReader(aDecoder);
} else
#endif
#ifdef MOZ_WIDGET_GONK
#ifdef MOZ_OMX_DECODER
if (IsOmxSupportedType(aType)) {
decoderReader = new MediaOmxReader(aDecoder);
} else
@ -508,7 +508,7 @@ bool DecoderTraits::IsSupportedInVideoDocument(const nsACString& aType)
#ifdef MOZ_OGG
IsOggType(aType) ||
#endif
#ifdef MOZ_WIDGET_GONK
#ifdef MOZ_OMX_DECODER
IsOmxSupportedType(aType) ||
#endif
#ifdef MOZ_WEBM

View File

@ -1657,7 +1657,7 @@ MediaDecoder::IsGStreamerEnabled()
}
#endif
#ifdef MOZ_WIDGET_GONK
#ifdef MOZ_OMX_DECODER
bool
MediaDecoder::IsOmxEnabled()
{

View File

@ -759,7 +759,7 @@ public:
static bool IsGStreamerEnabled();
#endif
#ifdef MOZ_WIDGET_GONK
#ifdef MOZ_OMX_DECODER
static bool IsOmxEnabled();
#endif

View File

@ -300,7 +300,7 @@ VideoData* VideoData::CreateFromImage(VideoInfo& aInfo,
return v.forget();
}
#ifdef MOZ_WIDGET_GONK
#ifdef MOZ_OMX_DECODER
VideoData* VideoData::Create(VideoInfo& aInfo,
ImageContainer* aContainer,
int64_t aOffset,
@ -366,7 +366,7 @@ VideoData* VideoData::Create(VideoInfo& aInfo,
return v.forget();
}
#endif // MOZ_WIDGET_GONK
#endif // MOZ_OMX_DECODER
void* MediaDecoderReader::VideoQueueMemoryFunctor::operator()(void* anObject) {
const VideoData* v = static_cast<const VideoData*>(anObject);

View File

@ -414,7 +414,7 @@ MediaDecoderStateMachine::MediaDecoderStateMachine(MediaDecoder* aDecoder,
// If we've got more than mAmpleVideoFrames decoded video frames waiting in
// the video queue, we will not decode any more video frames until some have
// been consumed by the play state machine thread.
#if defined(MOZ_WIDGET_GONK) || defined(MOZ_MEDIA_PLUGINS)
#if defined(MOZ_OMX_DECODER) || defined(MOZ_MEDIA_PLUGINS)
// On B2G and Android this is decided by a similar value which varies for
// each OMX decoder |OMX_PARAM_PORTDEFINITIONTYPE::nBufferCountMin|. This
// number must be less than the OMX equivalent or gecko will think it is

View File

@ -32,7 +32,7 @@ if CONFIG['MOZ_WMF']:
PARALLEL_DIRS += ['webrtc']
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
if CONFIG['MOZ_OMX_DECODER']:
PARALLEL_DIRS += ['omx']
if CONFIG['MOZ_WEBSPEECH']:

View File

@ -38,7 +38,7 @@ CPPSRCS += \
AudioParameter.cpp \
GonkRecorderProfiles.cpp \
$(NULL)
else ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
else ifeq ($(MOZ_OMX_DECODER),1)
CPPSRCS += \
FallbackCameraManager.cpp \
FallbackCameraControl.cpp \

View File

@ -178,6 +178,8 @@ LOCAL_INCLUDES += \
-I$(topsrcdir)/content/events/src \
-I$(ANDROID_SOURCE)/frameworks/base/include/media/stagefright \
-I$(ANDROID_SOURCE)/frameworks/base/include/media/stagefright/openmax \
-I$(ANDROID_SOURCE)/frameworks/av/include/media/stagefright \
-I$(ANDROID_SOURCE)/frameworks/native/include/media/openmax \
$(NULL)
CXXFLAGS += $(MOZ_CAIRO_CFLAGS) $(MOZ_PIXMAN_CFLAGS) $(TK_CFLAGS)

View File

@ -116,7 +116,7 @@ LOCAL_INCLUDES += \
$(NULL)
endif
ifeq (gonk,$(MOZ_WIDGET_TOOLKIT)) #{
ifdef MOZ_OMX_DECODER #{
# include OMX decoder
SHARED_LIBRARY_LIBS += \
$(DEPTH)/content/media/omx/$(LIB_PREFIX)gkconomx_s.$(LIB_SUFFIX) \