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

Commit 79ed227b authored by vivek mehta's avatar vivek mehta Committed by Ricardo Cerqueira
Browse files

framework\base:: remove decrypt handle

Decrypt context will be created directly in decoder so remove the code
that was used to copy the decrypt context pointer from parser.

(cherry picked from commit 5bb0aa03232513255ee22607f6995040a6b19cb7)

Change-Id: I01e540a0c28f0039f037a5045b4b1da78c12550c
parent 8e452111
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -76,9 +76,10 @@ LOCAL_SRC_FILES:= \
ifeq ($(BOARD_USES_QCOM_HARDWARE),true)
        LOCAL_SRC_FILES += ExtendedExtractor.cpp
        LOCAL_SRC_FILES += ExtendedWriter.cpp
	LOCAL_C_INCLUDES += $(TOP)/hardware/qcom/display/libqcomui
endif

LOCAL_C_INCLUDES:= \
LOCAL_C_INCLUDES+= \
	$(JNI_H_INCLUDE) \
        $(TOP)/frameworks/base/include/media/stagefright/openmax \
        $(TOP)/external/flac/include \
+2 −58
Original line number Diff line number Diff line
/*
 * Copyright (C) 2009 The Android Open Source Project
 * Copyright (C) 2010-2011 Code Aurora Forum
 * Copyright (c) 2011 - 2012, Code Aurora Forum. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
@@ -862,67 +862,11 @@ status_t OMXCodec::configureCodec(const sp<MetaData> &meta) {
        }
        paramDivX.eProfile = (QOMX_VIDEO_DIVXPROFILETYPE)0;    //Not used for now.

        paramDivX.pDrmHandle = NULL;
        if (meta->findPointer(kKeyDivXDrm, &paramDivX.pDrmHandle) ) {
            if( paramDivX.pDrmHandle != NULL ) {
                LOGV("This DivX Clip is DRM encrypted, set the DRM handle ");
            }
            else {
                LOGV("This DivX Clip is not DRM encrypted ");
            }
        }
        status_t err =  mOMX->setParameter(mNode,
                         (OMX_INDEXTYPE)OMX_QcomIndexParamVideoDivx,
                         &paramDivX, sizeof(paramDivX));
        if (err!=OK) {
            return err;
        }
    }

    // Set params for divx311 and configure
    // decoder in frame by frame mode
    if (!strcasecmp(MEDIA_MIMETYPE_VIDEO_DIVX311, mMIME)) {
        CODEC_LOGV("Setting the QOMX_VIDEO_PARAM_DIVX311TYPE params ");
        QOMX_VIDEO_PARAM_DIVXTYPE paramDivX;
        InitOMXParams(&paramDivX);
        paramDivX.nPortIndex = mIsEncoder ? kPortIndexOutput : kPortIndexInput;
        int32_t DivxVersion = 0;
        CHECK(meta->findInt32(kKeyDivXVersion,&DivxVersion));
        CODEC_LOGV("Divx Version Type %d\n",DivxVersion);

        if(DivxVersion == kTypeDivXVer_3_11 ) {
            paramDivX.eFormat = QOMX_VIDEO_DIVXFormat311;
            paramDivX.eProfile = (QOMX_VIDEO_DIVXPROFILETYPE)0;//Not used for now.
            paramDivX.pDrmHandle = NULL;
            if (meta->findPointer(kKeyDivXDrm, &paramDivX.pDrmHandle) ) {
                if( paramDivX.pDrmHandle != NULL ) {
                    CODEC_LOGV("This DivX Clip is DRM encrypted, set the DRM handle ");
                }
                else {
                    CODEC_LOGV("This DivX Clip is not DRM encrypted ");
                }
            }

        status_t err =  mOMX->setParameter(mNode,
                         (OMX_INDEXTYPE)OMX_QcomIndexParamVideoDivx,
                         &paramDivX, sizeof(paramDivX));
        if (err!=OK) {
                CODEC_LOGE("Set params DIVX error");
                return err;
            }

            CODEC_LOGV("kTypeDivXVer_3_11 - set frame by frame mode");
            OMX_QCOM_PARAM_PORTDEFINITIONTYPE portdef;
            portdef.nSize = sizeof(OMX_QCOM_PARAM_PORTDEFINITIONTYPE);
            portdef.nPortIndex = 0; //Input port.
            portdef.nMemRegion = OMX_QCOM_MemRegionInvalid;
            portdef.nCacheAttr = OMX_QCOM_CacheAttrNone;
            portdef.nFramePackingFormat = OMX_QCOM_FramePacking_OnlyOneCompleteFrame;
            err = mOMX->setParameter(mNode, (OMX_INDEXTYPE)OMX_QcomIndexPortDefn, &portdef, sizeof(OMX_QCOM_PARAM_PORTDEFINITIONTYPE));
            if (err != OK) {
                CODEC_LOGE("DIVX 311 set frame by frame mode error");
            return err;
            }
#endif
        }
    }