当前位置: 首页>>代码示例>>C++>>正文


C++ ARSAL_PRINT函数代码示例

本文整理汇总了C++中ARSAL_PRINT函数的典型用法代码示例。如果您正苦于以下问题:C++ ARSAL_PRINT函数的具体用法?C++ ARSAL_PRINT怎么用?C++ ARSAL_PRINT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了ARSAL_PRINT函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ARSTREAM2_H264_AuNaluFifoFlush

int ARSTREAM2_H264_AuNaluFifoFlush(ARSTREAM2_H264_AccessUnit_t *au)
{
    ARSTREAM2_H264_NaluFifoItem_t *naluItem;

    if (!au)
    {
        ARSAL_PRINT(ARSAL_PRINT_ERROR, ARSTREAM2_H264_TAG, "Invalid pointer");
        return -1;
    }

    while ((naluItem = ARSTREAM2_H264_AuDequeueNalu(au)) != NULL)
    {
        int ret = ARSTREAM2_H264_AuNaluFifoPushFreeItem(au, naluItem);
        if (ret != 0)
        {
            ARSAL_PRINT(ARSAL_PRINT_ERROR, ARSTREAM2_H264_TAG, "Failed to push free item in the AU-NALU FIFO (%d)", ret);
        }
    }

    return 0;
}
开发者ID:Parrot-Developers,项目名称:libARStream2,代码行数:21,代码来源:arstream2_h264.c

示例2: Java_com_parrot_arsdk_ardatatransfer_ARDataTransferMediasDownloader_nativeDelete

JNIEXPORT jint JNICALL Java_com_parrot_arsdk_ardatatransfer_ARDataTransferMediasDownloader_nativeDelete(JNIEnv *env, jobject jThis, jlong jManager)
{
    ARDATATRANSFER_JNI_Manager_t *nativeJniManager = (ARDATATRANSFER_JNI_Manager_t*)(intptr_t)jManager;
    ARDATATRANSFER_Manager_t *nativeManager = (nativeJniManager->nativeManager) ? nativeJniManager->nativeManager : NULL;
    eARDATATRANSFER_ERROR result = ARDATATRANSFER_OK;

    ARSAL_PRINT(ARSAL_PRINT_DEBUG, ARDATATRANSFER_JNI_MEDIADOWNLOADER_TAG, "");

    result = ARDATATRANSFER_MediasDownloader_Delete(nativeManager);

    return result;
}
开发者ID:infinitesquare-parrot,项目名称:libARDataTransfer,代码行数:12,代码来源:ARDATATRANSFER_JNI_MediasDownloader.c

示例3: ARSTREAM2_H264_AuFifoDuplicateItem

ARSTREAM2_H264_AuFifoItem_t* ARSTREAM2_H264_AuFifoDuplicateItem(ARSTREAM2_H264_AuFifo_t *auFifo,
                                                                ARSTREAM2_H264_AuFifoItem_t *auItem)
{
    int ret, needFree = 0;
    ARSTREAM2_H264_AuFifoItem_t *auCopyItem;

    if ((!auFifo) || (!auItem))
    {
        ARSAL_PRINT(ARSAL_PRINT_ERROR, ARSTREAM2_H264_TAG, "Invalid pointer");
        return NULL;
    }

    auCopyItem = ARSTREAM2_H264_AuFifoPopFreeItem(auFifo);
    if (auCopyItem)
    {
        ARSTREAM2_H264_AuCopy(&auCopyItem->au, &auItem->au);
        ARSTREAM2_H264_NaluFifoItem_t *naluItem, *naluCopyItem;
        for (naluItem = auItem->au.naluHead; naluItem; naluItem = naluItem->next)
        {
            naluCopyItem = ARSTREAM2_H264_AuNaluFifoPopFreeItem(&auCopyItem->au);
            if (naluCopyItem)
            {
                ARSTREAM2_H264_NaluCopy(&naluCopyItem->nalu, &naluItem->nalu);
                ret = ARSTREAM2_H264_AuEnqueueNalu(&auCopyItem->au, naluCopyItem);
                if (ret != 0)
                {
                    ARSAL_PRINT(ARSAL_PRINT_ERROR, ARSTREAM2_H264_TAG, "Failed to enqueue NALU item in AU");
                    ret = ARSTREAM2_H264_AuNaluFifoPushFreeItem(&auCopyItem->au, naluCopyItem);
                    if (ret != 0)
                    {
                        ARSAL_PRINT(ARSAL_PRINT_ERROR, ARSTREAM2_H264_TAG, "Failed to push free FIFO item");
                    }
                    needFree = 1;
                }
            }
            else
            {
                ARSAL_PRINT(ARSAL_PRINT_ERROR, ARSTREAM2_H264_TAG, "Failed to pop free item from the NALU FIFO");
                needFree = 1;
            }
        }
    }
    else
    {
        ARSAL_PRINT(ARSAL_PRINT_ERROR, ARSTREAM2_H264_TAG, "Failed to pop free item from the AU FIFO");
    }

    if (needFree)
    {
        ret = ARSTREAM2_H264_AuFifoPushFreeItem(auFifo, auCopyItem);
        if (ret != 0)
        {
            ARSAL_PRINT(ARSAL_PRINT_ERROR, ARSTREAM2_H264_TAG, "Failed to push free item in the AU FIFO (%d)", ret);
        }
        needFree = 0;
        auCopyItem = NULL;
    }

    return auCopyItem;
}
开发者ID:Parrot-Developers,项目名称:libARStream2,代码行数:60,代码来源:arstream2_h264.c

示例4: Java_com_parrot_arsdk_arsal_ARSALMd5Manager_nativeCheck

JNIEXPORT jint JNICALL Java_com_parrot_arsdk_arsal_ARSALMd5Manager_nativeCheck(JNIEnv *env, jobject jThis, jlong jManager, jstring jFilePath, jstring jMd5Txt)
{
    ARSAL_MD5_Manager_t *nativeManager = (ARSAL_MD5_Manager_t*) (intptr_t) jManager;
    const char *nativeFilePath = NULL;
    const char *nativeMd5Txt = NULL;
    eARSAL_ERROR result = ARSAL_OK;

    ARSAL_PRINT(ARSAL_PRINT_DEBUG, ARSAL_JNI_MD5_MANAGER_TAG, "%d", (int)nativeManager);

    if ((nativeManager == NULL) || (nativeManager->md5Check == NULL))
    {
        result = ARSAL_ERROR_BAD_PARAMETER;
    }

    if (result == ARSAL_OK)
    {
        nativeFilePath = (*env)->GetStringUTFChars(env, jFilePath, 0);
        if (nativeFilePath == NULL)
        {
            result = ARSAL_ERROR_ALLOC;
        }
    }

    if (result == ARSAL_OK)
    {
        nativeMd5Txt = (*env)->GetStringUTFChars(env, jMd5Txt, 0);

        if (nativeMd5Txt == NULL)
        {
            result = ARSAL_ERROR_ALLOC;
        }
    }

    //ARSAL_PRINT(ARSAL_PRINT_DEBUG, ARSAL_JNI_MD5_MANAGER_TAG, "%d, %s, %s", result, nativeFilePath, nativeMd5Txt);

    if (result == ARSAL_OK)
    {
        result = nativeManager->md5Check(nativeManager->md5Object,  nativeFilePath, nativeMd5Txt);
    }

    if (nativeFilePath != NULL)
    {
        (*env)->ReleaseStringUTFChars(env, jFilePath, nativeFilePath);
    }

    if (nativeMd5Txt != NULL)
    {
        (*env)->ReleaseStringUTFChars(env, jMd5Txt, nativeMd5Txt);
    }

    return result;
}
开发者ID:Ewen11,项目名称:libARSAL,代码行数:52,代码来源:ARSAL_JNI_Md5Manager.c

示例5: ARSTREAM2_H264_AuNaluFifoFree

int ARSTREAM2_H264_AuNaluFifoFree(ARSTREAM2_H264_AccessUnit_t *au)
{
    if (!au)
    {
        ARSAL_PRINT(ARSAL_PRINT_ERROR, ARSTREAM2_H264_TAG, "Invalid pointer");
        return -1;
    }

    free(au->naluPool);
    memset(au, 0, sizeof(ARSTREAM2_H264_AccessUnit_t));

    return 0;
}
开发者ID:Parrot-Developers,项目名称:libARStream2,代码行数:13,代码来源:arstream2_h264.c

示例6: ARDISCOVERY_getProductID

uint16_t ARDISCOVERY_getProductID(eARDISCOVERY_PRODUCT product)
{
    if (product < ARDISCOVERY_PRODUCT_MAX)
    {
        return ARDISCOVERY_Discovery_ProductTable[product];
    }
    else
    {
        ARSAL_PRINT(ARSAL_PRINT_ERROR, ARDISCOVERY_DISCOVERY_TAG,
                    "Unknown product : %d", product);
        return 0;
    }
}
开发者ID:Parrot-Developers,项目名称:libARDiscovery,代码行数:13,代码来源:ARDISCOVERY_Discovery.c

示例7: ARSTREAM_ReaderTb_FrameCompleteCallback

uint8_t* ARSTREAM_ReaderTb_FrameCompleteCallback (eARSTREAM_READER_CAUSE cause, uint8_t *framePointer, uint32_t frameSize, int numberOfSkippedFrames, int isFlushFrame, uint32_t *newBufferCapacity, void *buffer)
{
    uint8_t *retVal = NULL;
    struct timespec now;
    int dt;
    buffer = buffer;
    switch (cause)
    {
    case ARSTREAM_READER_CAUSE_FRAME_COMPLETE:
    case ARSTREAM_READER_CAUSE_FRAME_INCOMPLETE:
        ARSAL_PRINT (ARSAL_PRINT_WARNING, __TAG__, "Got a frame of size %d, at address %p (isFlush : %d)", frameSize, framePointer, isFlushFrame);
        if (isFlushFrame != 0)
        nbRead++;
        if (numberOfSkippedFrames != 0)
        {
            ARSAL_PRINT (ARSAL_PRINT_WARNING, __TAG__, "Skipped %d frames", numberOfSkippedFrames);
            if (numberOfSkippedFrames > 0)
            {
                nbSkipped += numberOfSkippedFrames;
                nbSkippedSinceLast += numberOfSkippedFrames;
            }
        }
        ARSTREAM_Reader_PercentOk = (100.f * nbRead) / (1.f * (nbRead + nbSkipped));
        if (outFile != NULL)
        {
            fwrite (framePointer, 1, frameSize, outFile);
        }
        ARSAL_Time_GetTime(&now);
        dt = ARSAL_Time_ComputeTimespecMsTimeDiff(&lastRecv, &now);
        lastDt [currentIndexInDt] = dt;
        currentIndexInDt ++;
        currentIndexInDt %= NB_FRAMES_FOR_AVERAGE;
        lastRecv.tv_sec = now.tv_sec;
        lastRecv.tv_nsec = now.tv_nsec;
        ARSTREAM_ReaderTb_SetBufferFree (framePointer);
        retVal = ARSTREAM_ReaderTb_GetNextFreeBuffer (newBufferCapacity, 0);
        break;

    case ARSTREAM_READER_CAUSE_FRAME_TOO_SMALL:
        ARSAL_PRINT (ARSAL_PRINT_WARNING, __TAG__, "Current buffer is to small for frame !");
        retVal = ARSTREAM_ReaderTb_GetNextFreeBuffer (newBufferCapacity, 1);
        break;

    case ARSTREAM_READER_CAUSE_COPY_COMPLETE:
        ARSAL_PRINT (ARSAL_PRINT_WARNING, __TAG__, "Copy complete in new buffer, freeing this one");
        ARSTREAM_ReaderTb_SetBufferFree (framePointer);
        break;

    case ARSTREAM_READER_CAUSE_CANCEL:
        ARSAL_PRINT (ARSAL_PRINT_WARNING, __TAG__, "Reader is closing");
        ARSTREAM_ReaderTb_SetBufferFree (framePointer);
        break;

    default:
        ARSAL_PRINT (ARSAL_PRINT_ERROR, __TAG__, "Unknown cause (probably a bug !)");
        break;
    }
    return retVal;
}
开发者ID:infinitesquare-parrot,项目名称:libARStream,代码行数:59,代码来源:ARSTREAM_Reader_TestBench.c

示例8: Java_com_parrot_arsdk_arstream_ARStreamReader_nativeConstructor

JNIEXPORT jlong JNICALL
Java_com_parrot_arsdk_arstream_ARStreamReader_nativeConstructor (JNIEnv *env, jobject thizz, jlong cNetManager, jint dataBufferId, jint ackBufferId, jlong frameBuffer, jint frameBufferSize, jint maxFragmentSize, jint maxAckInterval)
{
    eARSTREAM_ERROR err = ARSTREAM_OK;
    jobject g_thizz = (*env)->NewGlobalRef(env, thizz);
    ARSTREAM_Reader_t *retReader = ARSTREAM_Reader_New ((ARNETWORK_Manager_t *)(intptr_t)cNetManager, dataBufferId, ackBufferId, internalCallback, (uint8_t *)(intptr_t)frameBuffer, frameBufferSize, maxFragmentSize, maxAckInterval, (void *)g_thizz, &err);

    if (err != ARSTREAM_OK)
    {
        ARSAL_PRINT (ARSAL_PRINT_ERROR, JNI_READER_TAG, "Error while creating reader : %s", ARSTREAM_Error_ToString (err));
    }
    return (jlong)(intptr_t)retReader;
}
开发者ID:wicktt,项目名称:libARStream,代码行数:13,代码来源:ARSTREAM_JNIReader.c

示例9: ARSTREAM2_H264_NaluFifoEnqueueItem

int ARSTREAM2_H264_NaluFifoEnqueueItem(ARSTREAM2_H264_NaluFifo_t *fifo, ARSTREAM2_H264_NaluFifoItem_t *item)
{
    if ((!fifo) || (!item))
    {
        ARSAL_PRINT(ARSAL_PRINT_ERROR, ARSTREAM2_H264_TAG, "Invalid pointer");
        return -1;
    }

    ARSAL_Mutex_Lock(&(fifo->mutex));

    if (fifo->count >= fifo->size)
    {
        ARSAL_Mutex_Unlock(&(fifo->mutex));
        ARSAL_PRINT(ARSAL_PRINT_ERROR, ARSTREAM2_H264_TAG, "NALU FIFO is full");
        return -2;
    }

    item->next = NULL;
    if (fifo->tail)
    {
        fifo->tail->next = item;
        item->prev = fifo->tail;
    }
    else
    {
        item->prev = NULL;
    }
    fifo->tail = item;
    if (!fifo->head)
    {
        fifo->head = item;
    }
    fifo->count++;

    ARSAL_Mutex_Unlock(&(fifo->mutex));

    return 0;
}
开发者ID:Parrot-Developers,项目名称:libARStream2,代码行数:38,代码来源:arstream2_h264.c

示例10: ARSTREAM2_H264_AuFifoUnrefBuffer

int ARSTREAM2_H264_AuFifoUnrefBuffer(ARSTREAM2_H264_AuFifo_t *fifo, ARSTREAM2_H264_AuFifoBuffer_t *buffer)
{
    if ((!fifo) || (!buffer))
    {
        ARSAL_PRINT(ARSAL_PRINT_ERROR, ARSTREAM2_H264_TAG, "Invalid pointer");
        return -1;
    }

    ARSAL_Mutex_Lock(&(fifo->mutex));

    if (buffer->refCount != 0)
    {
        buffer->refCount--;
    }
    else
    {
        ARSAL_PRINT(ARSAL_PRINT_WARNING, ARSTREAM2_H264_TAG, "FIXME! Ref count is already null, this should not happen!");
    }

    if (buffer->refCount == 0)
    {
        if (fifo->bufferFree)
        {
            fifo->bufferFree->prev = buffer;
            buffer->next = fifo->bufferFree;
        }
        else
        {
            buffer->next = NULL;
        }
        fifo->bufferFree = buffer;
        buffer->prev = NULL;
    }

    ARSAL_Mutex_Unlock(&(fifo->mutex));

    return 0;
}
开发者ID:Parrot-Developers,项目名称:libARStream2,代码行数:38,代码来源:arstream2_h264.c

示例11: ARSTREAM2_H264_NaluFifoFree

int ARSTREAM2_H264_NaluFifoFree(ARSTREAM2_H264_NaluFifo_t *fifo)
{
    if (!fifo)
    {
        ARSAL_PRINT(ARSAL_PRINT_ERROR, ARSTREAM2_H264_TAG, "Invalid pointer");
        return -1;
    }

    ARSAL_Mutex_Destroy(&(fifo->mutex));
    free(fifo->pool);
    memset(fifo, 0, sizeof(ARSTREAM2_H264_NaluFifo_t));

    return 0;
}
开发者ID:Parrot-Developers,项目名称:libARStream2,代码行数:14,代码来源:arstream2_h264.c

示例12: ARSTREAM2_H264_AuNaluFifoPopFreeItem

ARSTREAM2_H264_NaluFifoItem_t* ARSTREAM2_H264_AuNaluFifoPopFreeItem(ARSTREAM2_H264_AccessUnit_t *au)
{
    if (!au)
    {
        ARSAL_PRINT(ARSAL_PRINT_ERROR, ARSTREAM2_H264_TAG, "Invalid pointer");
        return NULL;
    }

    if (au->naluFree)
    {
        ARSTREAM2_H264_NaluFifoItem_t* cur = au->naluFree;
        au->naluFree = cur->next;
        if (cur->next) cur->next->prev = NULL;
        cur->prev = NULL;
        cur->next = NULL;
        return cur;
    }
    else
    {
        ARSAL_PRINT(ARSAL_PRINT_ERROR, ARSTREAM2_H264_TAG, "AU-NALU FIFO is full");
        return NULL;
    }
}
开发者ID:Parrot-Developers,项目名称:libARStream2,代码行数:23,代码来源:arstream2_h264.c

示例13: ARNETWORK_Sender_SendPong

void ARNETWORK_Sender_SendPong (ARNETWORK_Sender_t *senderPtr, uint8_t *data, int dataSize)
{
    ARNETWORK_IOBuffer_t *inputBufferPtrTemp;
    eARNETWORK_ERROR err = ARNETWORK_OK;
    inputBufferPtrTemp = senderPtr->inputBufferPtrMap[ARNETWORK_MANAGER_INTERNAL_BUFFER_ID_PONG];
    err = ARNETWORK_IOBuffer_Lock (inputBufferPtrTemp);
    if (err != ARNETWORK_OK) {
        ARSAL_PRINT (ARSAL_PRINT_ERROR, ARNETWORK_SENDER_TAG, "ARNETWORK_IOBuffer_Lock() failed; error: %s", ARNETWORK_Error_ToString (err));
        return;
    }

    ARNETWORK_IOBuffer_AddData (inputBufferPtrTemp, data, dataSize, NULL, NULL, 1);
    ARNETWORK_IOBuffer_Unlock (inputBufferPtrTemp);
}
开发者ID:Parrot-Developers,项目名称:libARNetwork,代码行数:14,代码来源:ARNETWORK_Sender.c

示例14: ARUTILS_Manager_Delete

void ARUTILS_Manager_Delete(ARUTILS_Manager_t **managerAddr)
{
    ARSAL_PRINT(ARSAL_PRINT_DEBUG, ARUTILS_MANAGER_TAG, "");

    if (managerAddr != NULL)
    {
        ARUTILS_Manager_t *manager = *managerAddr;
        if (manager != NULL)
        {
            free(manager);
        }
        *managerAddr = NULL;
    }
}
开发者ID:infinitesquare-parrot,项目名称:libARUtils,代码行数:14,代码来源:ARUTILS_Manager.c

示例15: Java_com_parrot_arsdk_arsal_ARSALMd5Manager_nativeClose

JNIEXPORT jint JNICALL Java_com_parrot_arsdk_arsal_ARSALMd5Manager_nativeClose(JNIEnv *env, jobject jThis, jlong jManager)
{
    ARSAL_MD5_Manager_t *nativeManager = (ARSAL_MD5_Manager_t*) (intptr_t) jManager;
    eARSAL_ERROR result = ARSAL_OK;

    ARSAL_PRINT(ARSAL_PRINT_DEBUG, ARSAL_JNI_MD5_MANAGER_TAG, "");

    if (nativeManager->md5Object != NULL)
    {
        (*env)->DeleteGlobalRef(env, (jobject)nativeManager->md5Object);
        nativeManager->md5Object = NULL;
    }

    return result;
}
开发者ID:Ewen11,项目名称:libARSAL,代码行数:15,代码来源:ARSAL_JNI_Md5Manager.c


注:本文中的ARSAL_PRINT函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。