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

Commit 26c2a6bf authored by James Dong's avatar James Dong Committed by Android Git Automerger
Browse files

am d70c64db: Revert the following patches because they may lead to power...

am d70c64db: Revert the following patches because they may lead to power regression because SHA/MD5 module is stuck 1. Revert "Fix drm flag setting missed in false drm recognition fix."    This reverts commit 9f704f6c46a171357e49c411c83458b9d4565f3b.

* commit 'd70c64db9f67dbe8f888de6b1bdcc835226ec526':
  Revert the following patches because they may lead to power regression because SHA/MD5 module is stuck 1. Revert "Fix drm flag setting missed in false drm recognition fix."    This reverts commit 9f704f6c46a171357e49c411c83458b9d4565f3b.
parents 50845c90 785ee06d
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -99,12 +99,11 @@ void DrmManager::removeUniqueId(int uniqueId) {

status_t DrmManager::loadPlugIns() {

    String8 pluginDirPath("/system/lib/drm");
    loadPlugIns(pluginDirPath);

    String8 vendorPluginDirPath("/vendor/lib/drm");
    loadPlugIns(vendorPluginDirPath);

    String8 pluginDirPath("/system/lib/drm");
    loadPlugIns(pluginDirPath);
    return DRM_NO_ERROR;

}
+11 −18
Original line number Diff line number Diff line
@@ -335,7 +335,6 @@ status_t AwesomePlayer::setDataSource_l(
        return UNKNOWN_ERROR;
    }

    if (extractor->getDrmFlag()) {
    dataSource->getDrmInfo(mDecryptHandle, &mDrmManagerClient);
    if (mDecryptHandle != NULL) {
        CHECK(mDrmManagerClient);
@@ -343,7 +342,6 @@ status_t AwesomePlayer::setDataSource_l(
            notifyListener_l(MEDIA_ERROR, MEDIA_ERROR_UNKNOWN, ERROR_DRM_NO_LICENSE);
        }
    }
    }

    return setDataSource_l(extractor);
}
@@ -2093,7 +2091,7 @@ status_t AwesomePlayer::finishSetDataSource_l() {
        String8 mimeType;
        float confidence;
        sp<AMessage> dummy;
        bool success = SniffWVM(dataSource, &mimeType, &confidence, &dummy);
        bool success = SniffDRM(dataSource, &mimeType, &confidence, &dummy);

        if (!success
                || strcasecmp(
@@ -2101,11 +2099,8 @@ status_t AwesomePlayer::finishSetDataSource_l() {
            return ERROR_UNSUPPORTED;
        }

        dataSource->DrmInitialization();

        mWVMExtractor = new WVMExtractor(dataSource);
        mWVMExtractor->setAdaptiveStreamingMode(true);
        mWVMExtractor->setDrmFlag(true);
        extractor = mWVMExtractor;
    } else {
        extractor = MediaExtractor::Create(
@@ -2116,7 +2111,6 @@ status_t AwesomePlayer::finishSetDataSource_l() {
        }
    }

    if (extractor->getDrmFlag()) {
    dataSource->getDrmInfo(mDecryptHandle, &mDrmManagerClient);

    if (mDecryptHandle != NULL) {
@@ -2125,7 +2119,6 @@ status_t AwesomePlayer::finishSetDataSource_l() {
            notifyListener_l(MEDIA_ERROR, MEDIA_ERROR_UNKNOWN, ERROR_DRM_NO_LICENSE);
        }
    }
    }

    status_t err = setDataSource_l(extractor);

+4 −4
Original line number Diff line number Diff line
@@ -282,13 +282,13 @@ bool SniffDRM(
    if (decryptHandle != NULL) {
        if (decryptHandle->decryptApiType == DecryptApiType::CONTAINER_BASED) {
            *mimeType = String8("drm+container_based+") + decryptHandle->mimeType;
            *confidence = 10.0f;
        } else if (decryptHandle->decryptApiType == DecryptApiType::ELEMENTARY_STREAM_BASED) {
            *mimeType = String8("drm+es_based+") + decryptHandle->mimeType;
            *confidence = 10.0f;
        } else {
            return false;
        } else if (decryptHandle->decryptApiType == DecryptApiType::WV_BASED) {
            *mimeType = MEDIA_MIMETYPE_CONTAINER_WVM;
            LOGW("SniffWVM: found match\n");
        }
        *confidence = 10.0f;

        return true;
    }
+0 −2
Original line number Diff line number Diff line
@@ -26,7 +26,6 @@
#include "include/DRMExtractor.h"
#include "include/FLACExtractor.h"
#include "include/AACExtractor.h"
#include "include/WVMExtractor.h"

#include "matroska/MatroskaExtractor.h"

@@ -114,7 +113,6 @@ void DataSource::RegisterDefaultSniffers() {
    RegisterSniffer(SniffMP3);
    RegisterSniffer(SniffAAC);
    RegisterSniffer(SniffMPEG2PS);
    RegisterSniffer(SniffWVM);

    char value[PROPERTY_VALUE_MAX];
    if (property_get("drm.service.enabled", value, NULL)
+0 −3
Original line number Diff line number Diff line
@@ -111,9 +111,6 @@ sp<MediaExtractor> MediaExtractor::Create(
        ret = new MPEG2TSExtractor(source);
    } else if (!strcasecmp(mime, MEDIA_MIMETYPE_CONTAINER_WVM)) {
        ret = new WVMExtractor(source);
        if (ret != NULL) {
            isDrm = true;
        }
    } else if (!strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_AAC_ADTS)) {
        ret = new AACExtractor(source);
    } else if (!strcasecmp(mime, MEDIA_MIMETYPE_CONTAINER_MPEG2PS)) {
Loading