• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ PS_LOG函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: OM_HsicInitMsgProc

VOS_VOID OM_HsicInitMsgProc(MsgBlock* pMsg)
{
    SC_PORT_STATUS_ENUM_UINT32          enStatus;

    /* 获取DK文件中端口关联设置 */
    if (SC_ERROR_CODE_NO_ERROR != SC_FAC_GetPortAttrib(&enStatus))
    {
        PS_LOG(WUEPS_PID_OM, 0, PS_PRINT_ERROR, "OM_HsicInitMsgProc:SC_FAC_GetPortAttrib error.");

        return;
    }

    /* DK文件设置不做OM和HSIC端口的关联 */
    if (SC_PORT_STATUS_ON != enStatus)
    {
        return;
    }

    /* 将关联请求发到A核的OMAGENT去处理 */
    if (VOS_OK != OM_HsicConnectReq())
    {
        PS_LOG(WUEPS_PID_OM, 0, PS_PRINT_ERROR, "OM_HsicInitMsgProc:OM_HsicConnectReq error.");

        return;
    }

    return;
}
开发者ID:magnusjjj,项目名称:android_kernel_huawei_rle,代码行数:28,代码来源:omoutside.c


示例2: TTF_RING_Q_Front

VOS_VOID* TTF_RING_Q_Front(VOS_UINT32 ulPid, TTF_RING_Q_ST *pstRingQ)
{
    VOS_VOID    *pNode;

    if (VOS_NULL_PTR == pstRingQ )
    {
        PS_LOG(ulPid, 0, PS_PRINT_WARNING, "Warning: pstRingQ is Null !");
        return VOS_NULL_PTR;
    }

    if ( VOS_NULL_PTR == pstRingQ->ppNode) /* pstRingQ is not Initialized ! */
    {
        return VOS_NULL_PTR;
    }

    if ( pstRingQ->ulRear == pstRingQ->ulFront)
    {
        PS_LOG(ulPid, 0, PS_PRINT_INFO, "Info: RingQ is Empty !");
        return VOS_NULL_PTR;
    }

    pNode = pstRingQ->ppNode[pstRingQ->ulFront];

    return pNode;

} /* TTF_RING_Q_Rear */
开发者ID:debbiche,项目名称:android_kernel_huawei_p8,代码行数:26,代码来源:TTFLink.c


示例3: TTF_LinkInsertHead

VOS_UINT32 TTF_LinkInsertHead(VOS_UINT32 ulPid, TTF_LINK_ST * pLink, TTF_NODE_ST *pInsert)
{

    if ( (VOS_NULL_PTR == pLink) || (VOS_NULL_PTR == pInsert ))
    {
        PS_LOG(ulPid, 0, PS_PRINT_WARNING, "Warning: pLink Or pInsert is Null!");
        return PS_FAIL;
    }

#ifdef WTTF_PC_ST_SWITCH
    /*检查节点pInsert是否在链表pLink中*/
    if ( PS_TRUE == TTF_LinkCheckNodeInLink(ulPid, pLink, pInsert) )
    {
        PS_LOG(ulPid, 0, PS_PRINT_WARNING, "Warning: pInsert has Existed in pLink!");
        return PS_FAIL;
    }
#endif

    pInsert->pPrev              = (TTF_NODE_ST *)(&pLink->stHead);
    pLink->stHead.pNext->pPrev  = pInsert;
    pInsert->pNext              = pLink->stHead.pNext;
    pLink->stHead.pNext         = pInsert;

    pLink->ulCnt++;

    return PS_SUCC;
} /*TTF_LinkInsertHead*/
开发者ID:debbiche,项目名称:android_kernel_huawei_p8,代码行数:27,代码来源:TTFLink.c


示例4: ps_gstsink_init

int ps_gstsink_init (ps_callbacks * callback, const char * config_path) {
	if (g_atomic_int_get(&stopping)) return -1;
	//if (callback == NULL || config_path == NULL) return -1;
	if (callback == NULL) return -1;
	
	/* Initialize GSTREAMER */
	gst_init (NULL, NULL);
	
	sessions = g_hash_table_new (NULL, NULL);
	ps_mutex_init (&sessions_mutex);
	messages = g_async_queue_new_full ((GDestroyNotify) ps_gstsink_message_free);
	
	gateway = callback;
	g_atomic_int_set (&initialized, 1);
	
	GError * error = NULL;
	watchdog = g_thread_try_new ("streaming watchdog", &ps_gstsink_watchdog, NULL, &error);
	if (!watchdog) {
		g_atomic_int_set(&initialized, 0);
		PS_LOG (LOG_ERR, "Got error %d (%s) trying to launch the GstSink watchdog thread...\n", error->code, error->message ? error->message : "??");
		return -1;
	}
	handler_thread = g_thread_try_new ("streaming handler", &ps_gstsink_handler, NULL, &error);
	if (!handler_thread) {
		g_atomic_int_set(&initialized, 0);
		PS_LOG (LOG_ERR, "Got error %d (%s) trying to launch the GstSink handler thread...\n", error->code, error->message ? error->message : "??");
		return -1;
	}
	PS_LOG (LOG_INFO, "%s initialized\n", PS_GSTSINK_NAME);
	return 0;
}
开发者ID:chetanbnaik,项目名称:wrtclient,代码行数:31,代码来源:ps_gstsink.c


示例5: TTF_LinkStick

VOS_UINT32 TTF_LinkStick(VOS_UINT32 ulPid, TTF_LINK_ST *pLink1,
    TTF_LINK_ST *pLink2)
{
    if (VOS_NULL_PTR == pLink1)
    {
        PS_LOG(ulPid, 0, PS_PRINT_WARNING,
            "TTFCOMM, TTF_LinkStick, ERROR, pLink1 is null\n");
        return VOS_ERR;
    }

    if (VOS_NULL_PTR == pLink2)
    {
        PS_LOG(ulPid, 0, PS_PRINT_WARNING,
            "TTFCOMM, TTF_LinkStick, ERROR, pLink2 is null\n");
        return VOS_ERR;
    }

    if (TTF_LINK_IS_EMPTY(pLink2))
    {
        return VOS_OK;
    }

    pLink1->stHead.pPrev->pNext = pLink2->stHead.pNext;
    pLink2->stHead.pNext->pPrev = pLink1->stHead.pPrev;
    pLink1->stHead.pPrev        = pLink2->stHead.pPrev;
    pLink2->stHead.pPrev->pNext = (TTF_NODE_ST *)&(pLink1->stHead);

    /*更新长度*/
    pLink1->ulCnt       += pLink2->ulCnt;

    TTF_LINK_INIT(pLink2);

    return VOS_OK;
}
开发者ID:debbiche,项目名称:android_kernel_huawei_p8,代码行数:34,代码来源:TTFLink.c


示例6: TTF_LinkRemoveTail

TTF_NODE_ST* TTF_LinkRemoveTail(VOS_UINT32 ulPid, TTF_LINK_ST * pLink)
{
    TTF_NODE_ST    *pNode;

    if (VOS_NULL_PTR == pLink)
    {
        PS_LOG(ulPid, 0, PS_PRINT_WARNING, "Warning: pLink is Null!");
        return VOS_NULL_PTR;
    }

    if (0 == pLink->ulCnt)
    {
        PS_LOG(ulPid, 0, PS_PRINT_WARNING, "Warning: pLink Cnt is 0!");
        return VOS_NULL_PTR;
    }

    /*异常:链表和链表个数不一致时, 容错处理*/
    if ( pLink->stHead.pNext == &pLink->stHead )
    {
        PS_LOG1(ulPid, 0, PS_PRINT_WARNING, "Warning: pLink is null, but Cnt is <1>!", (VOS_INT32)pLink->ulCnt);
        pLink->ulCnt = 0;
        return VOS_NULL_PTR;
    }

    pNode               = pLink->stHead.pPrev;
    pLink->stHead.pPrev = pNode->pPrev;
    pNode->pPrev->pNext = &pLink->stHead;
    pNode->pNext        = VOS_NULL_PTR;
    pNode->pPrev        = VOS_NULL_PTR;

    pLink->ulCnt--;
    return  pNode;

} /* TTF_LinkRemoveTail */
开发者ID:debbiche,项目名称:android_kernel_huawei_p8,代码行数:34,代码来源:TTFLink.c


示例7: TTF_LinkInsertNext

VOS_UINT32 TTF_LinkInsertNext(VOS_UINT32 ulPid, TTF_LINK_ST * pLink,
                TTF_NODE_ST *pCurr, TTF_NODE_ST *pInsert)
{

    if ( (VOS_NULL_PTR == pLink) || (VOS_NULL_PTR == pCurr) || (VOS_NULL_PTR == pInsert))
    {
        PS_LOG(ulPid, 0, PS_PRINT_WARNING, "Warning: pLink、pCurr Or pInsert is Null!");
        return PS_FAIL;
    }

    /*遍历该节点是否在链表内,若无,返回失败*/





#ifdef WTTF_PC_ST_SWITCH
    /*检查节点pInsert是否在链表pLink中*/
    if ( PS_TRUE == TTF_LinkCheckNodeInLink(ulPid, pLink, pInsert) )
    {
        PS_LOG(ulPid, 0, PS_PRINT_WARNING, "Warning: pInsert has Existed in pLink!");
        return PS_FAIL;
    }
#endif

    pInsert->pPrev              = pCurr;
    pCurr->pNext->pPrev         = pInsert;
    pInsert->pNext              = pCurr->pNext;
    pCurr->pNext                = pInsert;

    pLink->ulCnt++;

    return PS_SUCC;
}
开发者ID:debbiche,项目名称:android_kernel_huawei_p8,代码行数:34,代码来源:TTFLink.c


示例8: ps_gstsink_incoming_rtp

void ps_gstsink_incoming_rtp (ps_plugin_session * handle, int video, char * buf, int len) {
	if (handle == NULL || handle->stopped || g_atomic_int_get(&stopping) || !g_atomic_int_get(&initialized))
		return;
	if (gateway) {
		ps_gstsink_session * session = (ps_gstsink_session *)handle->plugin_handle;
		if(!session) {
			PS_LOG(LOG_ERR, "No session associated with this handle\n");
			return;
		}
		if (session->destroyed) return;
		if (session->active && session->vplayer != NULL) {
			ps_video_packet * pkt = (ps_video_packet *)g_malloc0(sizeof(ps_video_packet));
			if (pkt == NULL) {
				PS_LOG (LOG_FATAL, "Memory error!\n");
				return;
			}
			pkt->data = (char *)g_malloc0(len);
			memcpy(pkt->data, buf, len);
			pkt->length = len;
			pkt->is_video = video;
			if (session->vpackets != NULL)
				g_async_queue_push (session->vpackets, pkt);
		}
		ps_gstsink_send_rtcp_feedback (handle, video, buf, len);
		return;
	}
}
开发者ID:chetanbnaik,项目名称:wrtclient,代码行数:27,代码来源:ps_gstsink.c


示例9: HPA_FIDInit

/*****************************************************************************
 Function   : HPA_FIDInit
 Description: HPA FID Init
 Input      : Ip
 Return     : void
 Other      :
 *****************************************************************************/
VOS_UINT32 HPA_FIDInit( enum VOS_INIT_PHASE_DEFINE ip )
{
    /* Add for L Only version */
    if (BOARD_TYPE_LTE_ONLY == BSP_OM_GetBoardType())
    {
        return 0;
    }
    /* Add for L Only version */

    switch ( ip )
    {
        case VOS_IP_LOAD_CONFIG:
            if ( VOS_OK != VOS_RegisterPIDInfo(UEPS_PID_SHPA,
                APM_PIDInit, (Msg_Fun_Type)HPA_ApmMsgPIDProc))
            {
                PS_LOG(  UEPS_PID_GHPA, 0, PS_PRINT_ERROR,
                    "VOS_RegisterPIDInfo UEPS_PID_SHPA failure !\n");

                return VOS_ERR;
            }

            if ( VOS_OK
                != VOS_RegisterTaskPrio(WUEPS_FID_HPA, COMM_HPA_TASK_PRIO) )
            {
                PS_LOG(  UEPS_PID_GHPA, 0, PS_PRINT_ERROR,
                    "HPA_FIDInit:VOS_RegisterMsgTaskPrio failure !\n");

                return VOS_ERR;
            }

            if ( VOS_NULL_BYTE == VOS_RegisterSelfTaskPrio(WUEPS_FID_HPA,
                (VOS_TASK_ENTRY_TYPE)HPA_TransferTaskEntry,
                COMM_HPA_SELFTASK_PRIO, HPA_TRANSFER_TASK_STACK_SIZE ) )
            {
                PS_LOG(  UEPS_PID_GHPA, 0, PS_PRINT_ERROR,
                    "VOS_RegisterSelfTask:HPA_TransferTaskEntry failure !\n");

                return VOS_ERR;
            }

            break;

        case VOS_IP_FARMALLOC:
            if(VOS_OK != HPA_Init())
            {
                PS_LOG(  UEPS_PID_GHPA, 0, PS_PRINT_ERROR,
                    "HPA Init failure !\n");
                return VOS_ERR;
            }
            break;

        default:
            break;
    }

    return VOS_OK;
}
开发者ID:herryfan,项目名称:kernel-huawei-h60,代码行数:64,代码来源:hpainit.c


示例10: OM_AcpuGetNvIdList

VOS_UINT32 OM_AcpuGetNvIdList(APP_OM_MSG_EX_STRU *pstAppToOmMsg,
                                          VOS_UINT16 usReturnPrimId)
{
    VOS_UINT32              ulNvNum;
    VOS_UINT32              ulTotalLen;
    OM_APP_MSG_EX_STRU      *pstOmToAppMsg;
    VOS_UINT32              ulResult;
    OM_APP_GET_NV_LIST_STRU *pstOmGetNvList;

    ulNvNum = NV_GetNVIdListNum();
    /*No NV exist*/
    if (0 == ulNvNum)
    {
        OM_AcpuSendResultChannel(pstAppToOmMsg->ucCpuId, pstAppToOmMsg->ucFuncType, VOS_ERR, usReturnPrimId);
        PS_LOG(WUEPS_PID_OM, 0, PS_PRINT_ERROR, "OM_AcpuGetNvIdList:No NV exist.\n");
        return VOS_ERR;
    }

    /*APP_HEAD + Result + NV nums + NV ID/LEN lists*/
    ulTotalLen = sizeof(OM_APP_MSG_EX_STRU) + sizeof(VOS_UINT32)
                        + (ulNvNum*sizeof(NV_LIST_INFO_STRU));

    pstOmToAppMsg = (OM_APP_MSG_EX_STRU*)VOS_MemAlloc(
                                   WUEPS_PID_OM, DYNAMIC_MEM_PT, ulTotalLen);

    if (VOS_NULL_PTR == pstOmToAppMsg)
    {
        OM_AcpuSendResultChannel(pstAppToOmMsg->ucCpuId, pstAppToOmMsg->ucFuncType, VOS_ERR, usReturnPrimId);
        PS_LOG(WUEPS_PID_OM, 0, PS_PRINT_ERROR, "OM_AcpuGetNvIdList:VOS_MemAlloc Fail.");
        return VOS_ERR;
    }

    pstOmGetNvList = (OM_APP_GET_NV_LIST_STRU*)(pstOmToAppMsg->aucPara);

    /*获取每个NV项的ID和长度*/
    ulResult = NV_GetNVIdList(pstOmGetNvList->astNvInfo);
    if (NV_OK != ulResult)
    {
        VOS_MemFree(WUEPS_PID_OM, pstOmToAppMsg);

        OM_AcpuSendResultChannel(pstAppToOmMsg->ucCpuId, pstAppToOmMsg->ucFuncType, ulResult, usReturnPrimId);
        PS_LOG(WUEPS_PID_OM, 0, PS_PRINT_ERROR, "OM_AcpuGetNvIdList:VOS_MemAlloc Fail.");
        return VOS_ERR;
    }

    /*填写执行结果和NV项数目*/
    pstOmGetNvList->ulErrorCode     = VOS_OK;
    pstOmGetNvList->usCount         = (VOS_UINT16)ulNvNum;
    pstOmGetNvList->ucMsgIndex      = 1;    /*分包索引,先默认为1*/
    pstOmGetNvList->ucTotalMsgCnt   = 1;    /*分包总数,先默认为1*/

    pstOmToAppMsg->usLength = (VOS_UINT16)(ulTotalLen - VOS_OM_HEADER_LEN);
    OM_AcpuSendContentChannel(pstAppToOmMsg->ucCpuId, pstAppToOmMsg->ucFuncType, (OM_RSP_PACKET_STRU *)pstOmToAppMsg, usReturnPrimId);
    VOS_MemFree(WUEPS_PID_OM, pstOmToAppMsg);
    return VOS_OK;
}
开发者ID:debbiche,项目名称:android_kernel_huawei_p8,代码行数:56,代码来源:Omappoperator.c


示例11: TTF_MNTN_ErrlogBufGet

VOS_VOID TTF_MNTN_ErrlogBufGet(VOS_UINT32 ulPid, MODEM_ID_ENUM_UINT16  enModemId, VOS_CHAR *pBuffer, VOS_UINT32 ulBytes)
{
    VOS_UINT32              ulRslt;
    OM_RING_ID              pRingId;


    if (VOS_NULL_PTR == pBuffer)
    {
        PS_LOG(ulPid, 0, PS_PRINT_ERROR,
            "TTF_MNTN_ErrlogBufGet: pBuffer NULL PTR");

        return;
    }

    if (enModemId >= MODEM_ID_BUTT)
    {
        PS_LOG1(ulPid, 0, PS_PRINT_ERROR,
            "TTF_MNTN_ErrlogBufGet: Invalid ModemId ", enModemId);

        return;
    }

    pRingId   = TTF_ERR_LOG_ENT_RINGID_GET(enModemId);

    if (VOS_NULL_PTR == pRingId)
    {
        PS_LOG(ulPid, 0, PS_PRINT_ERROR,
            "TTF_MNTN_ErrlogBufGet: pRingId NULL PTR");

        return;
    }

    ulRslt = VOS_SmP(TTF_ERR_LOG_ENT_SEM_GET(enModemId), TTF_ERR_SEM_TIMEOUT_LEN);

    if(VOS_OK != ulRslt)
    {
        PS_LOG2(ulPid, 0, PS_PRINT_WARNING,
            "TTF_MNTN_ErrlogBufGet: VOS_SmP <1>, ulRslt<2> fail!", enModemId, (VOS_INT32)ulRslt);

        return;
    }

    ulRslt = (VOS_UINT32)OM_RingBufferGet(pRingId, pBuffer, (VOS_INT)ulBytes);

    if (ulRslt != ulBytes)
    {
        OM_RingBufferFlush(pRingId);

        PS_LOG2(ulPid, 0, PS_PRINT_ERROR,
            "TTF_MNTN_ErrlogBufGet: ERROR OM_RingBufferGet fail!", (VOS_INT32)ulRslt, (VOS_INT32)ulBytes);
    }

    VOS_SmV(TTF_ERR_LOG_ENT_SEM_GET(enModemId));
}
开发者ID:herryfan,项目名称:kernel-huawei-h60,代码行数:54,代码来源:TtfErrlog.c


示例12: NFExt_CtrlTxMsgTask

VOS_VOID NFExt_CtrlTxMsgTask(VOS_VOID)
{

    NF_EXT_DATA_RING_BUF_STRU   stData;
    VOS_UINT32                  ulRst;

/* 解决UT死循环问题 */
#ifdef __UT_CENTER__
    VOS_UINT32              i;
#endif


/* 解决UT死循环问题 */
#ifndef __UT_CENTER__
    for ( ; ; )
#else
    for (i = 0; i < 1; i++)
#endif
    {

        if (VOS_NULL_PTR == g_stExEntity.pRingBufferId)
        {
            PS_LOG(ACPU_PID_NFEXT, 0, PS_PRINT_WARNING,
                "NFExt_CtrlSendTask : ERROR : pRingBufferId is NULL!" );
            break;
        }

        /*lint -e522*/
        wait_event_interruptible(g_stExEntity.stWaitHeadTxTask, (VOS_TRUE != OM_RingBufferIsEmpty(g_stExEntity.pRingBufferId)));
        /*lint +e522*/

        ulRst = (VOS_UINT32)NFExt_RingBufferGet(g_stExEntity.pRingBufferId, (VOS_CHAR *)&stData,
            sizeof(NF_EXT_DATA_RING_BUF_STRU));

        if ((0 != ulRst) && (ulRst != sizeof(NF_EXT_DATA_RING_BUF_STRU)))
        {
            PS_LOG(ACPU_PID_NFEXT, 0, PS_PRINT_WARNING,
                "NFExt_CtrlSendTask : ERROR : Get data error from ring buffer!" );

            NF_EXT_STATS_INC(1, NF_EXT_STATS_GET_BUF_FAIL);

            NFExt_FlushRingBuffer(g_stExEntity.pRingBufferId);

            continue;
        }

        if (0 != ulRst)
        {
            OM_AcpuSendData((OM_RSP_PACKET_STRU*)stData.pData, stData.usDataLen);

            NF_EXT_MEM_FREE(ACPU_PID_NFEXT, stData.pData);
        }
    }
}
开发者ID:herryfan,项目名称:kernel-huawei-h60,代码行数:54,代码来源:NetfilterExCtrl.c


示例13: TTF_LinkPeekPrev

/*****************************************************************************
 函 数 名  : TTF_LinkPeekPrev
 功能描述  : 查看链表中指定节点前一个节点,返回该节点的地址
                若该节点是头节点,则返回空
 输入参数  : pLink   -- 链表指针
             pCurr   -- 链表中指定的节点
 输出参数  : 无
 返 回 值  : pCurr前一个节点
 调用函数  :
 被调函数  :

 修改历史      :
  1.日    期   : 2006年12月8日
    作    者   : 查鸣峰,蒋丽萍
    修改内容   : 新生成函数

*****************************************************************************/
VOS_UINT32 TTF_LinkPeekPrev(VOS_UINT32 ulPid, TTF_LINK_ST * pLink,
    TTF_NODE_ST *pCurr, TTF_NODE_ST **ppCurrPrev)
{
    TTF_NODE_ST*    pNode;

    if (( VOS_NULL_PTR == pLink ) || ( VOS_NULL_PTR == pCurr ) || ( VOS_NULL_PTR == ppCurrPrev ))
    {
        PS_LOG(ulPid, 0, PS_PRINT_WARNING, "\n Warning: pLink、pInsert Or ppCurrPrev is Null!\n");
        return PS_FAIL;
    }

    if ( 0 == pLink->ulCnt )
    {
        PS_LOG(ulPid, 0, PS_PRINT_WARNING, "\n Warning: pLink Cnt is 0!\n");
        return PS_FAIL;
    }

    if ( (TTF_NODE_ST*)pLink == pCurr )
    {
        PS_LOG(ulPid, 0, PS_PRINT_WARNING, "\n Warning: Node Address == Link Address!\n");
        return PS_FAIL;
    }

#ifdef WTTF_PC_ST_SWITCH
    pNode = pLink->stHead.pNext;
    while (pCurr != pNode)
    {
        /*遍历链表,未查找到对应的节点*/
        if ( &(pLink->stHead) == pNode )
        {
            PS_LOG(ulPid, 0, PS_PRINT_WARNING, "\n Warning: Not Find The Node In the Link!\n");
            return PS_FAIL;
        }

        pNode = pNode->pNext;
    }
#else
    pNode = pCurr;
#endif

    /*若当前节点是头节点,则返回VOS_NULL_PTR;否则,返回前一个地址*/
    if ( &(pLink->stHead) == pNode->pPrev )
    {
        *ppCurrPrev = VOS_NULL_PTR;
    }
    else
    {
        *ppCurrPrev = pNode->pPrev;
    }

    return PS_SUCC;

}
开发者ID:debbiche,项目名称:android_kernel_huawei_p8,代码行数:70,代码来源:TTFLink.c


示例14: ps_gstsink_destroy

void ps_gstsink_destroy (void) {
	if (!g_atomic_int_get(&initialized)) return;
	g_atomic_int_set(&stopping, 1);
	
	g_async_queue_push (messages, &exit_message);
	
	if (handler_thread != NULL) {
		g_thread_join (handler_thread);
		handler_thread = NULL;
	}
	
	if (watchdog != NULL) {
		g_thread_join (watchdog);
		watchdog = NULL;
	}
	usleep(500000);
	
	ps_mutex_lock(&sessions_mutex);
	/* Cleanup session data */
	GHashTableIter iter;
	gpointer value;
	g_hash_table_iter_init (&iter, sessions);
	while (g_hash_table_iter_next (&iter, NULL, &value)) {
		ps_gstsink_session * session = value;
		if (!session->destroyed && session->vplayer != NULL) {
			ps_video_player * player = session->vplayer;
			gst_object_unref (player->vbus);
			gst_element_set_state (player->vpipeline, GST_STATE_NULL);
			if (gst_element_get_state (player->vpipeline, NULL, NULL, GST_CLOCK_TIME_NONE) == GST_STATE_CHANGE_FAILURE) {
				PS_LOG (LOG_ERR, "Unable to stop GSTREAMER video player..!!\n");
			}
			gst_object_unref (GST_OBJECT(player->vpipeline));
		}
		/*g_hash_table_iter_remove (&iter);
		session->handle = NULL;
		g_free(session);
		session = NULL;*/
		g_hash_table_remove(sessions, session->handle);
		old_sessions = g_list_append(old_sessions, session);
	}
	
	g_hash_table_destroy(sessions);
	ps_mutex_unlock(&sessions_mutex);
	g_async_queue_unref(messages);
	messages = NULL;
	sessions = NULL;
	
	g_atomic_int_set(&initialized, 0);
	g_atomic_int_set(&stopping, 0);
	PS_LOG(LOG_INFO, "%s destroyed!\n", PS_GSTSINK_NAME);
	
}
开发者ID:chetanbnaik,项目名称:wrtclient,代码行数:52,代码来源:ps_gstsink.c


示例15: ps_websockets_thread

void * ps_websockets_thread (void * data) {
	struct lws_context * service = (struct lws_context *)data;
	if (service == NULL) {
		PS_LOG (LOG_ERR,"Invalid service\n");
		return NULL;
	}
	
	while (g_atomic_int_get(&initialized) && !g_atomic_int_get(&stopping)) {
		lws_service (service, 50);
	}
	
	//lws_context_destroy(service);
	PS_LOG (LOG_INFO,"ps_websockets_thread: thread ended\n");
	return NULL;	
}
开发者ID:chetanbnaik,项目名称:wrtclient,代码行数:15,代码来源:ps_websockets.c


示例16: RABM_TcInfRls

VOS_VOID RABM_TcInfRls(
                   RRRABM_RAB_IND_STRU  *pMsg,
                   VOS_UINT8  ucRabId
                   )
{
    VOS_UINT8    i;

    if(pMsg->aRabInfo[ucRabId].ulRbNum > 1)
    {
        PS_LOG(WUEPS_PID_RABM, VOS_NULL, PS_PRINT_WARNING, "RABM_TcInfRls:WARNING:RRC->RABM(TC) RAB contains more than one RB!");
        return;
    }

    for(i = 0; i < TC_LB_MAX_RBNUM; i++)
    {
        if(g_RabmTcInf.aRbInf[i].ucRbId ==
            (VOS_UINT8)(pMsg->aRabInfo[ucRabId].aulRbId[0]))
        {
            if(RABM_TRUE == g_RabmTcInf.aRbInf[i].ucEstFlg)
            {
                g_RabmTcInf.aRbInf[i].ucEstFlg = RABM_FALSE;                    /* 标志该RB不可用                           */
                RABM_SndTcRabInd(i, TC_RAB_RELEASE);                            /* 通知TC该RB释放                           */

                /*罗德 GCF用例:7.2.3.36,仪器下发的CLOSE UP TEST LOOP中指示的LB个数为0,
                    与实际建立的RAB不一致,导致环回失败。为了规避该问题,做如下检查:*/
                if (0 != g_RabmTcInf.ucLbCnt)
                {
                    g_RabmTcInf.ucLbCnt--;
                }
                break;
            }
        }
    }
    return;
}
开发者ID:magnusjjj,项目名称:android_kernel_huawei_rle,代码行数:35,代码来源:rabmcommon.c


示例17: TTF_LinkPeekTail

/*****************************************************************************
 函 数 名  : TTF_LinkPeekTail
 功能描述  : 查看链表的尾部,返回尾节点
 输入参数  : pLink   -- 链表指针
 输出参数  : 无
 返 回 值  : pNode   -- 链表节点
 调用函数  :
 被调函数  :

 修改历史      :
  1.日    期   : 2006年12月8日
    作    者   : 查鸣峰,蒋丽萍
    修改内容   : 新生成函数

*****************************************************************************/
TTF_NODE_ST* TTF_LinkPeekTail(VOS_UINT32 ulPid, const TTF_LINK_ST * pLink)
{
    if ( VOS_NULL_PTR == pLink )
    {
        PS_LOG(ulPid, 0, PS_PRINT_WARNING, "Warning: pLink is Null!");
        return VOS_NULL_PTR;
    }

    if ( 0 == pLink->ulCnt )
    {
        PS_LOG(ulPid, 0, PS_PRINT_INFO, "Info: Tail Node is Null!");
        return VOS_NULL_PTR;
    }

    return pLink->stHead.pPrev;
}
开发者ID:debbiche,项目名称:android_kernel_huawei_p8,代码行数:31,代码来源:TTFLink.c


示例18: ps_websockets_init

int ps_websockets_init (ps_transport_callbacks * callback) {
	
	if (g_atomic_int_get(&stopping)) {
		return -1;
	}
	if (callback == NULL) {
		return -1;
	}
	
	gateway = callback;
	struct lws * wsi;
	
	/* Set Log level */
	lws_set_log_level (0, NULL);
	
	/* Prepare context */
	struct lws_context_creation_info info;
	struct lws_client_connect_info cinfo;
	memset(&info, 0, sizeof info);
	memset(&cinfo, 0, sizeof cinfo);
	
	info.port = CONTEXT_PORT_NO_LISTEN;
	info.iface = NULL;
	info.protocols = wss_protocols;
	info.extensions = NULL; //lws_get_internal_extensions();
	info.ssl_cert_filepath = NULL;
	info.ssl_private_key_filepath = NULL;
	info.gid = -1;
	info.uid = -1;
	info.options = 0;
	
	/* Create the websockets context */
	wss = lws_create_context(&info);
	
	cinfo.context = wss;
	cinfo.ssl_connection = 0;
	cinfo.host = host;
	cinfo.address = host;
	cinfo.port = wsport;
	cinfo.path = path;
	cinfo.protocol = "ps-protocol"; //wss_protocols.name;
	
	GError * error = NULL;
	if (wss != NULL) {
		/* Connect to the server */
		wsi = lws_client_connect_via_info (&cinfo);
		/*TODO: somehow, check if the connection is established?*/
		wss_thread = g_thread_try_new("websockets thread", &ps_websockets_thread, wss, &error);
		if (!wss_thread) {
			g_atomic_int_set(&initialized, 0);
			PS_LOG (LOG_ERR,"Got error %d (%s) trying to launch the wss thread...\n", 
			error->code, error->message ? error->message : "??");
			return -1;
		}
	}
	
	/* done */
	g_atomic_int_set(&initialized, 1);
	return 0;
}
开发者ID:chetanbnaik,项目名称:wrtclient,代码行数:60,代码来源:ps_websockets.c


示例19: PPM_LogFileInit

VOS_UINT32 PPM_LogFileInit(VOS_VOID)
{
    OM_CHANNLE_PORT_CFG_STRU            stPortCfg;

    /*读取SD Log在NV中的配置*/
    if(NV_OK != NV_Read(en_NV_Item_Om_Port_Type, &stPortCfg, sizeof(OM_CHANNLE_PORT_CFG_STRU)))
    {
        PS_LOG(WUEPS_PID_OM, 0, PS_PRINT_ERROR, "PPM_LogFileInit:Read NV Config fail!");

        return VOS_OK;
    }

    /* 读取SD Log在NV中的配置为输出到SD卡的时候才使能 */
    if (CPM_OM_PORT_TYPE_SD == stPortCfg.enPortNum)
    {
        OM_SDInit();

        return VOS_OK;
    }
#if (VOS_OS_VER == VOS_LINUX)
    else if (CPM_OM_PORT_TYPE_FS == stPortCfg.enPortNum)
    {
        PPM_FSInitLogFile();

        return VOS_OK;
    }
#endif

    return VOS_OK;
}
开发者ID:fly2436732935,项目名称:android_kernel_honor7_PLK-AL10_PLK-TL01H_PLK-UL00_PLK-CL00_PLK-TL00,代码行数:30,代码来源:OmSdPpm.c


示例20: SMR_TimerTr1mExpire

VOS_VOID SMR_TimerTr1mExpire()
{
    /* 停止timer TR1M */
    SMS_LOG( PS_PRINT_NORMAL, "SMS:SMR_TimerTr1mExpire: TimerStop: TR1M" );
    if ( SMS_FALSE == SMS_TimerStop( SMC_TIMER_ID_TR1M ) )
    {
        return;
    }

    if ( SMR_WAIT_FOR_RP_ACK == g_SmrEnt.SmrMo.ucState )
    {
        if ( SMS_TRUE == g_SmrEnt.SmrMo.ucMemAvailFlg )
        {                                                                       /*是内存通知过程                            */
            SMR_MemNotifyRetrans(SMR_SMT_ERROR_TR1M_TIMEOUT, VOS_NULL_PTR, 0);         /* 调用重发过程的处理                       */

            if (SMR_IDLE == g_SmrEnt.SmrMo.ucState)
            {
                SMC_SmrApiRelReq(SMR_SMC_REL_CAUSE_NORMAL, SMS_FALSE );             /* 释放当前正在建立的消息的资源 */
            }

        }
        else
        {
            SMC_SmrApiAbortReq(SMR_SMC_ABORT_CAUSE_TR1M_EXP);                   /* 向网侧报错                               */

            PS_LOG(WUEPS_PID_SMS, VOS_NULL, PS_PRINT_NORMAL, "SMR_TimerTr1mExpire:NORMAL:SMS state = SMR_IDLE");
            g_SmrEnt.SmrMo.ucState = SMR_IDLE;                                  /* 进入空闲                                 */

            SMS_SendMnReportReq(SMR_SMT_ERROR_TR1M_TIMEOUT, VOS_NULL_PTR, 0);

        }
    }
}
开发者ID:herryfan,项目名称:kernel-huawei-h60,代码行数:33,代码来源:smrcom.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ PS_MEM_ALLOC函数代码示例发布时间:2022-05-30
下一篇:
C++ PS_ALLOC_MSG_WITH_HEADER_LEN函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap