本文整理汇总了C++中PS_LOG函数的典型用法代码示例。如果您正苦于以下问题:C++ PS_LOG函数的具体用法?C++ PS_LOG怎么用?C++ PS_LOG使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PS_LOG函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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 */
示例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*/
示例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;
}
示例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;
}
示例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 */
示例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;
}
示例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;
}
}
示例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;
}
示例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;
}
示例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));
}
示例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);
}
}
}
示例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;
}
示例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);
}
示例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;
}