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

Commit 989201fa authored by dhacker29's avatar dhacker29
Browse files

ifeq QCOM: video: Add support for extended media listener

Bulid fails with error: 'MEDIA_QOE' was not declared in
this scope on other targets
Change-Id: Ic83be8f1acc4188b81fb903911023b39c614775b
parent 525c2c35
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -10,7 +10,6 @@ LOCAL_SRC_FILES:= \
    android_media_MediaExtractor.cpp \
    android_media_MediaMuxer.cpp \
    android_media_MediaPlayer.cpp \
    android_media_ExtMediaPlayer.cpp \
    android_media_MediaRecorder.cpp \
    android_media_MediaScanner.cpp \
    android_media_MediaMetadataRetriever.cpp \
@@ -22,6 +21,11 @@ LOCAL_SRC_FILES:= \
    android_mtp_MtpDevice.cpp \
    android_mtp_MtpServer.cpp \

ifeq ($(BOARD_USES_QCOM_HARDWARE),true)
    LOCAL_SRC_FILES += \
    android_media_ExtMediaPlayer.cpp
endif

LOCAL_SHARED_LIBRARIES := \
    libandroid_runtime \
    libnativehelper \
+4 −0
Original line number Diff line number Diff line
@@ -36,7 +36,9 @@
#include "utils/KeyedVector.h"
#include "utils/String8.h"
#include "android_media_Utils.h"
#ifdef QCOM_HARDWARE
#include "android_media_ExtMediaPlayer.h"
#endif

#include "android_os_Parcel.h"
#include "android_util_Binder.h"
@@ -649,12 +651,14 @@ android_media_MediaPlayer_native_setup(JNIEnv *env, jobject thiz, jobject weak_t
    // create new listener and give it to MediaPlayer
    sp<JNIMediaPlayerListener> listener = new JNIMediaPlayerListener(env, thiz, weak_this);
    mp->setListener(listener);
#ifdef QCOM_HARDWARE
    if (JNIExtMediaPlayerListener::checkExtMedia(env, thiz)) {
      ALOGD("QCMediaPlayer mediaplayer present");
       sp<JNIExtMediaPlayerListener> extmedialistener = new JNIExtMediaPlayerListener(
                                                            env, thiz, weak_this, listener);
       mp->setListener(extmedialistener);
    }
#endif

    // Stow our new C++ MediaPlayer in an opaque field in the Java object.
    setMediaPlayer(env, thiz, mp);