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

Commit a255913b authored by Dan Pasanen's avatar Dan Pasanen
Browse files

libstagefright: matroska: ifdef out MEDIA_MIMETYPE_AUDIO_DTS for non-qcom

Change-Id: Ib31f25393883f556c3ed529dca1d61916fbd228c
parent 2a640efb
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -8,7 +8,11 @@ LOCAL_C_INCLUDES:= \
        $(TOP)/external/libvpx/libwebm \
        $(TOP)/external/libvpx/libwebm \
        $(TOP)/frameworks/native/include/media/openmax \
        $(TOP)/frameworks/native/include/media/openmax \
        $(TOP)/frameworks/av/media/libstagefright/include \
        $(TOP)/frameworks/av/media/libstagefright/include \
        $(TOP)/$(call project-path-for,qcom-media)/mm-core/inc \

ifeq ($(TARGET_ENABLE_QC_AV_ENHANCEMENTS),true)
        LOCAL_CFLAGS     += -DENABLE_AV_ENHANCEMENTS
        LOCAL_C_INCLUDES+= $(TOP)/$(call project-path-for,qcom-media)/mm-core/inc
endif


LOCAL_CFLAGS += -Wno-multichar -Werror
LOCAL_CFLAGS += -Wno-multichar -Werror


+6 −0
Original line number Original line Diff line number Diff line
@@ -34,7 +34,9 @@
#include <inttypes.h>
#include <inttypes.h>


#include <ExtendedUtils.h>
#include <ExtendedUtils.h>
#ifdef ENABLE_AV_ENHANCEMENTS
#include <QCMediaDefs.h>
#include <QCMediaDefs.h>
#endif


namespace android {
namespace android {


@@ -265,8 +267,10 @@ MatroskaSource::MatroskaSource(
        mType = MP3;
        mType = MP3;
    } else if (!strcasecmp (mime, MEDIA_MIMETYPE_VIDEO_MPEG4)) {
    } else if (!strcasecmp (mime, MEDIA_MIMETYPE_VIDEO_MPEG4)) {
        mType = MPEG4;
        mType = MPEG4;
#ifdef ENABLE_AV_ENHANCEMENTS
    } else if (!strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_DTS)) {
    } else if (!strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_DTS)) {
        mType = DTS;
        mType = DTS;
#endif
    }
    }
}
}


@@ -1107,8 +1111,10 @@ void MatroskaExtractor::addTracks() {
                    meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_AUDIO_AC3);
                    meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_AUDIO_AC3);
                } else if (!strcmp("A_EAC3", codecID)) {
                } else if (!strcmp("A_EAC3", codecID)) {
                    meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_AUDIO_EAC3);
                    meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_AUDIO_EAC3);
#ifdef ENABLE_AV_ENHANCEMENTS
                } else if (!strcmp("A_DTS", codecID)) {
                } else if (!strcmp("A_DTS", codecID)) {
                    meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_AUDIO_DTS);
                    meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_AUDIO_DTS);
#endif
                } else {
                } else {
                    ALOGW("%s is not supported.", codecID);
                    ALOGW("%s is not supported.", codecID);
                    continue;
                    continue;