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


C++ AVB_TRACE_ENTRY函数代码示例

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


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

示例1: TLHandleListGet

// This is currently only for used for Endpoint
tl_handle_t TLHandleListGet(int endpointHandle)
{
	AVB_TRACE_ENTRY(AVB_TRACE_TL);

	if (!endpointHandle || !gTLHandleList) {
		AVB_TRACE_EXIT(AVB_TRACE_TL);
		return NULL;
	}

	TL_LOCK();
	int i1;
	for (i1 = 0; i1 < gMaxTL; i1++) {
		if (gTLHandleList[i1]) {
			tl_state_t *pTLState = (tl_state_t *)gTLHandleList[i1];
			if (pTLState->endpointHandle == endpointHandle) {
				TL_UNLOCK();
				AVB_TRACE_EXIT(AVB_TRACE_TL);
				return pTLState;
			}
		}
	}
	TL_UNLOCK();
	AVB_TRACE_EXIT(AVB_TRACE_TL);
	return NULL;
}
开发者ID:Chandini212,项目名称:Open-AVB,代码行数:26,代码来源:openavb_tl_endpoint.c

示例2: openavbTLAVDECCRunTalker

bool openavbTLAVDECCRunTalker(tl_handle_t handle, U16 configIdx, U16 descriptorType, U16 descriptorIdx, void *pVoidTalkerStreamInfo)
{
	AVB_TRACE_ENTRY(AVB_TRACE_TL);

	if (!handle) {
		AVB_LOG_ERROR("Invalid handle.");
		AVB_TRACE_EXIT(AVB_TRACE_TL);
		return FALSE;
	}

	tl_state_t *pTLState = (tl_state_t *)handle;

	if (pTLState->cfg.intf_cb.intf_avdecc_init_cb) {
		pTLState->cfg.intf_cb.intf_avdecc_init_cb(pTLState->pMediaQ, configIdx, descriptorType, descriptorIdx);
	}
	if (pTLState->cfg.map_cb.map_avdecc_init_cb) {
		pTLState->cfg.map_cb.map_avdecc_init_cb(pTLState->pMediaQ, configIdx, descriptorType, descriptorIdx);
	}

	if (!openavbTLIsRunning(handle)) {
		openavbTLRun(handle);
	}

	AVB_TRACE_EXIT(AVB_TRACE_TL);
	return TRUE;
}
开发者ID:Chandini212,项目名称:Open-AVB,代码行数:26,代码来源:openavb_tl_endpoint.c

示例3: openavbTLThreadFn

/* Talker Listener thread function that talks primarily with the endpoint
 */
void* openavbTLThreadFn(void *pv)
{
	AVB_TRACE_ENTRY(AVB_TRACE_TL);

	tl_state_t *pTLState = (tl_state_t *)pv;

	while (pTLState->bRunning) {
		AVB_TRACE_LINE(AVB_TRACE_TL_DETAIL);

		int endpointHandle = openavbEptClntOpenSrvrConnection(pTLState);

		if (endpointHandle == AVB_ENDPOINT_HANDLE_INVALID) {
			// error connecting to endpoint, already logged
		}
		else {
			pTLState->endpointHandle = endpointHandle;

			// Validate the AVB version for TL and Endpoint are the same before continuing
			pTLState->AVBVerState = OPENAVB_TL_AVB_VER_UNKNOWN;
			pTLState->bConnected = openavbEptClntRequestVersionFromServer(pTLState->endpointHandle);
			while (pTLState->bRunning && pTLState->bConnected && pTLState->AVBVerState == OPENAVB_TL_AVB_VER_UNKNOWN) {
				// Check for endpoint version message. Timeout in 50 msec.
				if (!openavbEptClntService(pTLState->endpointHandle, 50)) {
					AVB_LOG_WARNING("Lost connection to endpoint, will retry");
					pTLState->bConnected = FALSE;
					pTLState->endpointHandle = 0;
				}
			}
			if (pTLState->AVBVerState == OPENAVB_TL_AVB_VER_INVALID) {
				AVB_LOG_ERROR("AVB core version is different than Endpoint AVB core version. Streams will not be started. Will reconnect to the endpoint and check again.");
			}

			if (pTLState->bConnected && pTLState->AVBVerState == OPENAVB_TL_AVB_VER_VALID) {
				if (pTLState->cfg.role == AVB_ROLE_TALKER) {
					openavbTLRunTalker(pTLState);
				}
				else {
					openavbTLRunListener(pTLState);
				}
			}

			// Close the endpoint connection. unless connection already gone in which case the socket could already be reused.
			if (pTLState->bConnected) {
				openavbEptClntCloseSrvrConnection(endpointHandle);
				pTLState->bConnected = FALSE;
				pTLState->endpointHandle = 0;
			}
		}

		if (pTLState->bRunning) {
			SLEEP(1);
		}
	}

	THREAD_JOINABLE(pTLState->TLThread);

	AVB_TRACE_EXIT(AVB_TRACE_TL);
	return NULL;
}
开发者ID:Chandini212,项目名称:Open-AVB,代码行数:61,代码来源:openavb_tl_endpoint.c

示例4: openavbRawsockRelRxFrame

bool openavbRawsockRelRxFrame(void *pvRawsock, U8 *pBuffer)
{
	AVB_TRACE_ENTRY(AVB_TRACE_RAWSOCK_DETAIL);

	bool ret = ((base_rawsock_t*)pvRawsock)->cb.relRxFrame(pvRawsock, pBuffer);

	AVB_TRACE_EXIT(AVB_TRACE_RAWSOCK_DETAIL);
	return ret;
}
开发者ID:Chandini212,项目名称:Open-AVB,代码行数:9,代码来源:rawsock_impl.c

示例5: openavbRawsockClose

void openavbRawsockClose(void *pvRawsock)
{
	AVB_TRACE_ENTRY(AVB_TRACE_RAWSOCK);

	((base_rawsock_t*)pvRawsock)->cb.close(pvRawsock);

	AVB_TRACE_EXIT(AVB_TRACE_RAWSOCK);
}
开发者ID:Chandini212,项目名称:Open-AVB,代码行数:8,代码来源:rawsock_impl.c

示例6: socketClose

static void socketClose(int h)
{
	AVB_TRACE_ENTRY(AVB_TRACE_ENDPOINT);
	if (h != AVB_ENDPOINT_HANDLE_INVALID) {
		close(h);
	}
	AVB_TRACE_EXIT(AVB_TRACE_ENDPOINT);
}
开发者ID:AVnu,项目名称:Open-AVB,代码行数:8,代码来源:openavb_endpoint_client_osal.c

示例7: openavbSetRxSignalMode

void openavbSetRxSignalMode(void *pvRawsock, bool rxSignalMode)
{
	AVB_TRACE_ENTRY(AVB_TRACE_RAWSOCK);

	((base_rawsock_t*)pvRawsock)->cb.setRxSignalMode(pvRawsock, rxSignalMode);

	AVB_TRACE_EXIT(AVB_TRACE_RAWSOCK);
}
开发者ID:Chandini212,项目名称:Open-AVB,代码行数:8,代码来源:rawsock_impl.c

示例8: openavbEptSrvrHndlVerRqstFromClient

/* Client version request
 */
bool openavbEptSrvrHndlVerRqstFromClient(int h)
{
	AVB_TRACE_ENTRY(AVB_TRACE_ENDPOINT);

	openavbEptSrvrSendServerVersionToClient(h, AVB_CORE_VER_FULL);

	AVB_TRACE_EXIT(AVB_TRACE_ENDPOINT);
	return TRUE;
}
开发者ID:Chandini212,项目名称:Open-AVB,代码行数:11,代码来源:openavb_endpoint_server.c

示例9: openavbTLAVDECCStopTalker

bool openavbTLAVDECCStopTalker(tl_handle_t handle, U16 configIdx, void *pVoidTalkerStreamInfo)
{
	AVB_TRACE_ENTRY(AVB_TRACE_TL);

	openavbTLStop(handle);

	AVB_TRACE_EXIT(AVB_TRACE_TL);
	return TRUE;
}
开发者ID:Chandini212,项目名称:Open-AVB,代码行数:9,代码来源:openavb_tl_endpoint.c

示例10: openavbRawsockRxBufLevel

int openavbRawsockRxBufLevel(void *pvRawsock)
{
	AVB_TRACE_ENTRY(AVB_TRACE_RAWSOCK_DETAIL);

	int ret = ((base_rawsock_t*)pvRawsock)->cb.rxBufLevel(pvRawsock);

	AVB_TRACE_EXIT(AVB_TRACE_RAWSOCK_DETAIL);
	return ret;
}
开发者ID:Chandini212,项目名称:Open-AVB,代码行数:9,代码来源:rawsock_impl.c

示例11: openavbRawsockGetAddr

bool openavbRawsockGetAddr(void *pvRawsock, U8 addr[ETH_ALEN])
{
	AVB_TRACE_ENTRY(AVB_TRACE_RAWSOCK);

	bool ret = ((base_rawsock_t*)pvRawsock)->cb.getAddr(pvRawsock, addr);

	AVB_TRACE_EXIT(AVB_TRACE_RAWSOCK);
	return ret;
}
开发者ID:Chandini212,项目名称:Open-AVB,代码行数:9,代码来源:rawsock_impl.c

示例12: openavbRawsockRxAVTPSubtype

bool openavbRawsockRxAVTPSubtype(void *pvRawsock, U8 subtype)
{
	AVB_TRACE_ENTRY(AVB_TRACE_RAWSOCK);

	bool ret = ((base_rawsock_t*)pvRawsock)->cb.rxAVTPSubtype(pvRawsock, subtype);

	AVB_TRACE_EXIT(AVB_TRACE_RAWSOCK);
	return ret;
}
开发者ID:Chandini212,项目名称:Open-AVB,代码行数:9,代码来源:rawsock_impl.c

示例13: openavbRawsockGetSocket

int openavbRawsockGetSocket(void *pvRawsock)
{
	AVB_TRACE_ENTRY(AVB_TRACE_RAWSOCK);

	int ret = ((base_rawsock_t*)pvRawsock)->cb.getSocket(pvRawsock);

	AVB_TRACE_EXIT(AVB_TRACE_RAWSOCK);
	return ret;
}
开发者ID:Chandini212,项目名称:Open-AVB,代码行数:9,代码来源:rawsock_impl.c

示例14: listenerDoStream

static inline bool listenerDoStream(tl_state_t *pTLState)
{
	AVB_TRACE_ENTRY(AVB_TRACE_TL);

	if (!pTLState) {
		AVB_LOG_ERROR("Invalid TLState");
		AVB_TRACE_EXIT(AVB_TRACE_TL);
		return FALSE;
	}

	openavb_tl_cfg_t *pCfg = &pTLState->cfg;
	listener_data_t *pListenerData = pTLState->pPvtListenerData;
	bool bRet = FALSE;

	if (pTLState->bStreaming) {
		U64 nowNS;

		pListenerData->nReportCalls++;

		// Try to receive a frame
		if (IS_OPENAVB_SUCCESS(openavbAvtpRx(pListenerData->avtpHandle))) {
			pListenerData->nReportFrames++;
		}

		CLOCK_GETTIME64(OPENAVB_TIMER_CLOCK, &nowNS);

		if (pCfg->report_seconds > 0) {
			if (nowNS > pListenerData->nextReportNS) {
				listenerShowStats(pListenerData, pTLState);

				openavbListenerAddStat(pTLState, TL_STAT_RX_CALLS, pListenerData->nReportCalls);
				openavbListenerAddStat(pTLState, TL_STAT_RX_FRAMES, pListenerData->nReportFrames);

				pListenerData->nReportCalls = 0;
				pListenerData->nReportFrames = 0;
				pListenerData->nextReportNS += (pCfg->report_seconds * NANOSECONDS_PER_SECOND);
			}
		} else if (pCfg->report_frames > 0 && pListenerData->nReportFrames != pListenerData->lastReportFrames) {
			if (pListenerData->nReportFrames % pCfg->report_frames == 1) {
				listenerShowStats(pListenerData, pTLState);
				pListenerData->lastReportFrames = pListenerData->nReportFrames;
			}
		}

		if (nowNS > pListenerData->nextSecondNS) {
			pListenerData->nextSecondNS += NANOSECONDS_PER_SECOND;
			bRet = TRUE;
		}
	}
	else {
		SLEEP_MSEC(1);
		bRet = TRUE;
	}

	AVB_TRACE_EXIT(AVB_TRACE_TL);
	return bRet;
}
开发者ID:AVnu,项目名称:Open-AVB,代码行数:57,代码来源:openavb_listener.c

示例15: AVB_TRACE_ENTRY

U8 *openavbRawsockGetRxFrame(void *pvRawsock, U32 timeout, unsigned int *offset, unsigned int *len)
{
	AVB_TRACE_ENTRY(AVB_TRACE_RAWSOCK_DETAIL);

	U8 *ret = ((base_rawsock_t*)pvRawsock)->cb.getRxFrame(pvRawsock, timeout, offset, len);

	AVB_TRACE_EXIT(AVB_TRACE_RAWSOCK_DETAIL);
	return ret;
}
开发者ID:Chandini212,项目名称:Open-AVB,代码行数:9,代码来源:rawsock_impl.c


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