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

Commit 7ede9d80 authored by Steve Kondik's avatar Steve Kondik
Browse files

stagefright: Remove wrongly ifdeffed parsing code

 * This code was actually meant to depend on FFMPEG, not QCOM, as
   it enables support for several additional codecs.
 * These are now defined in Stagefright now that FFMPEG is in.

Change-Id: I6f22c185e84176201d7e5f90a92e1b4a26008efd
parent d0d7f876
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -9,11 +9,6 @@ LOCAL_C_INCLUDES:= \
        $(TOP)/frameworks/native/include/media/openmax \
        $(TOP)/frameworks/av/media/libstagefright/include \

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_MODULE:= libstagefright_matroska
+0 −9
Original line number Diff line number Diff line
@@ -35,7 +35,6 @@

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

namespace android {
@@ -154,13 +153,11 @@ private:
    enum Type {
        AVC,
        AAC,
#ifdef ENABLE_AV_ENHANCEMENTS
        MP3,
        AC3,
        EAC3,
        DTS,
        MPEG4,
#endif
        OTHER
    };

@@ -261,7 +258,6 @@ MatroskaSource::MatroskaSource(
        ALOGV("mNALSizeLen = %zu", mNALSizeLen);
    } else if (!strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_AAC)) {
        mType = AAC;
#ifdef ENABLE_AV_ENHANCEMENTS
    } else if (!strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_AC3)) {
        mType = AC3;
    } else if (!strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_EAC3)) {
@@ -272,7 +268,6 @@ MatroskaSource::MatroskaSource(
        mType = MPEG4;
    } else if (!strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_DTS)) {
        mType = DTS;
#endif
    }
}

@@ -1034,7 +1029,6 @@ void MatroskaExtractor::addTracks() {
                    meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_VIDEO_VP8);
                } else if (!strcmp("V_VP9", codecID)) {
                    meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_VIDEO_VP9);
#ifdef ENABLE_AV_ENHANCEMENTS
                } else if (!strcmp("V_MS/VFW/FOURCC", codecID)) {
                    if (codecPrivateSize >= sizeof(BITMAPINFOHEADER)) {
                        char *fourcc = (char *) &((BITMAPINFOHEADER *) codecPrivate)->biCompression;
@@ -1078,7 +1072,6 @@ void MatroskaExtractor::addTracks() {
                        ALOGW("fourcc size: %d is not supported\n", codecPrivateSize);
                        continue;
                    }
#endif
                } else {
                    ALOGW("%s is not supported.", codecID);
                    continue;
@@ -1113,14 +1106,12 @@ void MatroskaExtractor::addTracks() {
                    mSeekPreRollNs = track->GetSeekPreRoll();
                } else if (!strcmp("A_MPEG/L3", codecID)) {
                    meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_AUDIO_MPEG);
#ifdef ENABLE_AV_ENHANCEMENTS
                } else if (!strcmp("A_AC3", codecID)) {
                    meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_AUDIO_AC3);
                } else if (!strcmp("A_EAC3", codecID)) {
                    meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_AUDIO_EAC3);
                } else if (!strcmp("A_DTS", codecID)) {
                    meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_AUDIO_DTS);
#endif
                } else {
                    ALOGW("%s is not supported.", codecID);
                    continue;