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

Commit dadb4ea8 authored by Aurimas Liutikas's avatar Aurimas Liutikas Committed by Android (Google) Code Review
Browse files

Merge "Fix compiler warnings in frameworks/av/media/ndk." into nyc-dev

parents ce2d9b46 214c833f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -40,6 +40,8 @@ LOCAL_C_INCLUDES := \

LOCAL_CFLAGS += -fvisibility=hidden -D EXPORT='__attribute__ ((visibility ("default")))'

LOCAL_CFLAGS += -Werror

LOCAL_SHARED_LIBRARIES := \
    libbinder \
    libmedia \
+5 −1
Original line number Diff line number Diff line
@@ -203,10 +203,14 @@ AImageReader::init() {

    mCbLooper = new ALooper;
    mCbLooper->setName(consumerName.string());
    status_t ret = mCbLooper->start(
    res = mCbLooper->start(
            /*runOnCallingThread*/false,
            /*canCallJava*/       true,
            PRIORITY_DEFAULT);
    if (res != OK) {
        ALOGE("Failed to start the looper");
        return AMEDIA_ERROR_UNKNOWN;
    }
    mHandler = new CallbackHandler(this);
    mCbLooper->registerHandler(mHandler);

+5 −1
Original line number Diff line number Diff line
@@ -145,10 +145,14 @@ static AMediaCodec * createAMediaCodec(const char *name, bool name_is_type, bool
    AMediaCodec *mData = new AMediaCodec();
    mData->mLooper = new ALooper;
    mData->mLooper->setName("NDK MediaCodec_looper");
    status_t ret = mData->mLooper->start(
    size_t res = mData->mLooper->start(
            false,      // runOnCallingThread
            true,       // canCallJava XXX
            PRIORITY_FOREGROUND);
    if (res != OK) {
        ALOGE("Failed to start the looper");
        return NULL;
    }
    if (name_is_type) {
        mData->mCodec = android::MediaCodec::CreateByType(mData->mLooper, name, encoder);
    } else {
+0 −9
Original line number Diff line number Diff line
@@ -37,15 +37,6 @@

using namespace android;

static media_status_t translate_error(status_t err) {
    if (err == OK) {
        return AMEDIA_OK;
    }
    ALOGE("sf error code: %d", err);
    return AMEDIA_ERROR_UNKNOWN;
}


static sp<ICrypto> makeCrypto() {
    sp<IServiceManager> sm = defaultServiceManager();
    sp<ICrypto> crypto;
+2 −2
Original line number Diff line number Diff line
@@ -629,9 +629,9 @@ static media_status_t encrypt_decrypt_common(AMediaDrm *mObj,

    Vector<uint8_t> outputVec;
    if (encrypt) {
        status_t status = mObj->mDrm->encrypt(*iter, keyIdVec, inputVec, ivVec, outputVec);
        status = mObj->mDrm->encrypt(*iter, keyIdVec, inputVec, ivVec, outputVec);
    } else {
        status_t status = mObj->mDrm->decrypt(*iter, keyIdVec, inputVec, ivVec, outputVec);
        status = mObj->mDrm->decrypt(*iter, keyIdVec, inputVec, ivVec, outputVec);
    }
    if (status == OK) {
        memcpy(output, outputVec.array(), outputVec.size());
Loading