Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 680f8c77 authored by Jean-Baptiste Queru's avatar Jean-Baptiste Queru
Browse files

Deal better with situations where OpenCORE is disabled.

parent 2a73de7b
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
ifneq ($(BUILD_WITHOUT_PV),true)
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

ifneq ($(BUILD_WITHOUT_PV),true)

LOCAL_SRC_FILES:= \
	android_media_MediaPlayer.cpp \
	android_media_MediaRecorder.cpp \
@@ -38,6 +39,7 @@ LOCAL_MODULE:= libmedia_jni

include $(BUILD_SHARED_LIBRARY)

endif

# build libsoundpool.so
include $(LOCAL_PATH)/soundpool/Android.mk
endif
+15 −3
Original line number Diff line number Diff line
@@ -7,12 +7,16 @@ LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_SRC_FILES:=               \
	MediaRecorderClient.cpp \
	MediaPlayerService.cpp \
	MetadataRetrieverClient.cpp \
	VorbisPlayer.cpp \
	MidiFile.cpp

ifneq ($(BUILD_WITHOUT_PV),true)
LOCAL_SRC_FILES+=               \
	MediaRecorderClient.cpp
endif

ifeq ($(TARGET_OS)-$(TARGET_SIMULATOR),linux-true)
LOCAL_LDLIBS += -ldl -lpthread
endif
@@ -22,14 +26,22 @@ LOCAL_SHARED_LIBRARIES := \
	libutils \
	libvorbisidec \
	libsonivox \
	libopencore_player \
	libopencore_author \
	libmedia \
	libandroid_runtime

ifneq ($(BUILD_WITHOUT_PV),true)
LOCAL_SHARED_LIBRARIES += \
	libopencore_player \
	libopencore_author
endif

LOCAL_C_INCLUDES := external/tremor/Tremor \
	$(call include-path-for, graphics corecg)

ifeq ($(BUILD_WITHOUT_PV),true)
LOCAL_CFLAGS := -DNO_OPENCORE
endif

LOCAL_MODULE:= libmediaplayerservice

include $(BUILD_SHARED_LIBRARY)
+6 −0
Original line number Diff line number Diff line
@@ -105,7 +105,11 @@ MediaPlayerService::~MediaPlayerService()

sp<IMediaRecorder> MediaPlayerService::createMediaRecorder(pid_t pid)
{
#ifndef NO_OPENCORE
    sp<MediaRecorderClient> recorder = new MediaRecorderClient(pid);
#else
    sp<MediaRecorderClient> recorder = NULL;
#endif
    LOGV("Create new media recorder client from pid %d", pid);
    return recorder;
}
@@ -531,10 +535,12 @@ static sp<MediaPlayerBase> createPlayer(player_type playerType, void* cookie,
{
    sp<MediaPlayerBase> p;
    switch (playerType) {
#ifndef NO_OPENCORE
        case PV_PLAYER:
            LOGV(" create PVPlayer");
            p = new PVPlayer();
            break;
#endif
        case SONIVOX_PLAYER:
            LOGV(" create MidiFile");
            p = new MidiFile();
+4 −0
Original line number Diff line number Diff line
@@ -49,7 +49,11 @@ MetadataRetrieverClient::MetadataRetrieverClient(pid_t pid)
    mThumbnail = NULL;
    mAlbumArt = NULL;

#ifndef NO_OPENCORE
    mRetriever = new PVMetadataRetriever();
#else
    mRetriever = NULL;
#endif
    if (mRetriever == NULL) {
        LOGE("failed to initialize the retriever");
    }
+0 −3
Original line number Diff line number Diff line
@@ -177,9 +177,6 @@ android.graphics.drawable.TransitionDrawable$TransitionState
android.graphics.drawable.shapes.RoundRectShape
android.location.ILocationManager$Stub
android.media.AudioManager
android.media.MediaPlayer
android.media.MediaRecorder
android.media.MediaScanner
android.net.LocalSocket
android.net.LocalSocketAddress
android.net.LocalSocketAddress$Namespace