Beispiel #1
0
MBOOL
ExtImgProcNodeImpl::
onStop()
{
    FUNC_START;
    MBOOL ret = syncWithThread(); //wait for jobs done

    Mutex::Autolock lock(mLock);
    {
        list<PostBufInfo>::iterator iter;
        for(iter = mlPostBufData.begin(); iter != mlPostBufData.end(); iter++)
        {
            MY_LOGD("ReturnBuffer:data(%d), buf(0x%x)",
                    (*iter).data,
                    (*iter).buf);
            handleReturnBuffer(
                (*iter).data,
                (MUINT32)((*iter).buf),
                0);
        }
    }

    FUNC_END;
    return ret;
}
MBOOL
StereoNodeImpl::
onStop()
{
    FUNC_START;
    MBOOL ret = syncWithThread(); //wait for jobs done

    Mutex::Autolock lock(mLock);
    {
        list<PostBufInfo>::iterator iter;
        for(iter = mlPostBufData.begin(); iter != mlPostBufData.end(); iter++)
        {
            MY_LOGD("ReturnBuffer:data(%d), buf(0x%x)",
                    (*iter).data,
                    (*iter).buf);
            handleReturnBuffer(
                (*iter).data,
                (MUINTPTR)((*iter).buf),
                0);
        }
    }
    while(muEnqFrameCnt > muDeqFrameCnt)
    {
        MY_LOGD("wait lock enq %d > deq %d", muEnqFrameCnt, muDeqFrameCnt);
        mCondDeque.wait(mLock);
        MY_LOGD("wait done");
    }
    //
    freeBuffers();
    //
    FUNC_END;
    return ret;
}
Beispiel #3
0
//-----------------------------------------------------------------------------
MBOOL 
CapBufNodeImp::
onStop()
{
    FUNC_START;
    syncWithThread(); //wait for jobs done
    FUNC_END;
    return MTRUE;
}
MBOOL 
Pass2NodeImpl::
onStop()
{
    FUNC_START;
    MBOOL ret = MTRUE;
    
    if( !syncWithThread() ) //wait for jobs done
    {
        MY_LOGE("sync with thread failed");
        ret = MFALSE;
    }

    #if PASS2_CALLBACL_ENABLE
    Mutex::Autolock lock(mLock);

    {
        list<PostBufInfo>::iterator iter;
        for(iter = mlPostBufData.begin(); iter != mlPostBufData.end(); iter++)
        {
            MY_LOGD("ReturnBuffer:data(%d), buf(0x%x)",
                    (*iter).data,
                    (*iter).buf);
            handleReturnBuffer(
                (*iter).data,
                (MUINT32)((*iter).buf),
                0);
        }
    }

    while(muEnqFrameCnt > muDeqFrameCnt)
    {
        MY_LOGD("wait lock enq %d > deq %d", muEnqFrameCnt, muDeqFrameCnt);
        mCondDeque.wait(mLock);
        MY_LOGD("wait done");
    }
    #endif

    if( !moduleStop() )
    {
        MY_LOGE("moduleStop failed");
        ret = MFALSE;
    }

    FUNC_END;
    return ret;
}
Beispiel #5
0
//-----------------------------------------------------------------------------
MBOOL 
CapBufNodeImp::
onNotify(MUINT32 const msg, MUINT32 const ext1, MUINT32 const ext2)
{
    MY_LOGD("msg(0x%x), ext1(0x%x), ext2(0x%x)", msg, ext1, ext2);
    switch( msg )
    {
        case CONTROL_STOP_PASS1:
            MY_LOGD("pass1 receive stop notify");
            syncWithThread();
            MY_LOGD("pass1 stoped");
            break;
        default:
            break;
    }
    return MTRUE;
}