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


C++ PortVideo::setBufferSupplier方法代码示例

本文整理汇总了C++中PortVideo::setBufferSupplier方法的典型用法代码示例。如果您正苦于以下问题:C++ PortVideo::setBufferSupplier方法的具体用法?C++ PortVideo::setBufferSupplier怎么用?C++ PortVideo::setBufferSupplier使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PortVideo的用法示例。


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

示例1: stop

/**
@brief Called when the processing is ready to be stopped
*/
WRAPPER_OPENMAX_API OMX_ERRORTYPE OpenMax_Proxy::stop()
//*************************************************************************************************************
{// Call Deinstantiation of component
	IN0("\n");
	m_pNmfProcWrp->stop();
#if 0
	//ER355733 Try to fix ens bug that doesn't reset bufferSupplier type 
	PortVideo* pPort;
	for (unsigned int Index=0; Index< mENSComponent.getPortCount(); ++Index)
	{
		pPort = (PortVideo*)mENSComponent.getPort(Index);
		if (pPort->getBufferSupplier() !=OMX_BufferSupplyUnspecified)
		{
			MSG3("wwwwwwwwwwwwwwwwwwwwwwwwwwww    %s.port[%d] reset state(%d) to OMX_BufferSupplyUnspecified\n", GetComponentName(), Index, pPort->getBufferSupplier());
			pPort->setBufferSupplier(OMX_BufferSupplyUnspecified);
		}
	}
#endif
	OUT0("\n");
	return OMX_ErrorNone;
}
开发者ID:Meticulus,项目名称:vendor_st-ericsson_u8500,代码行数:24,代码来源:openmax_component_proxy.cpp

示例2: instantiate

/** 
brief Instantiate the nmf component and bind interfaces
Called during Loaded to Idle transition
*/
WRAPPER_OPENMAX_API OMX_ERRORTYPE OpenMax_Proxy::instantiate()
//*************************************************************************************************************
{ //binding all interfaces
	OMX_ERRORTYPE omx_error=OMX_ErrorNone;
	IN0("\n");
	// Init Components
	// Bind of arm nmf components
	MSG1("OpenMax_Proxy(%s) Instantiating arm nmf component\n", GetComponentName());
	openmax_processor *pProcessor=NULL;
	if (m_pProcessor != NULL)
		pProcessor = m_pProcessor;
	else if (m_fnCreateNmfComponent !=NULL)
	{ 
		m_pProcessor= m_fnCreateNmfComponent();
		pProcessor  = m_pProcessor;
	}

	m_pNmfProcWrp = openmax_processor_wrpCreate(pProcessor);

	m_pNmfProcWrp->priority = m_nmfPriority;

	if (m_pNmfProcWrp->construct() != NMF_OK)
		NMF_PANIC("PANIC - Construct Error\n") ;

	t_nmf_error error ;
	// bindFromUser --> Asynchronous
	// getInterface --> Synchronous

	error = m_pNmfProcWrp->bindFromUser("sendcommand", 2, &mIsendCommand) ;
	if (error != NMF_OK)
		NMF_PANIC("PANIC - bindFromUser sendCommand\n") ;
#if (SYNCHRONOUS ==0)
	error = m_pNmfProcWrp->bindFromUser("Param", 2*mENSComponent.getPortCount()+1, &m_IParam) ; // One setparam per port + 1
	if (error != NMF_OK)
		NMF_PANIC("PANIC - bindFromUser Param\n") ;

	error = m_pNmfProcWrp->bindFromUser("Config", 2*mENSComponent.getPortCount()+1, &m_IConfig) ; // One setparam per port + 1
	if (error != NMF_OK)
		NMF_PANIC("PANIC - bindFromUser Config\n") ;
#else //Bind synchronous interfaces
	//interfaces are binded in a synchronous way
	error = m_pNmfProcWrp->getInterface("Param", &m_IParam);
	if (error != NMF_OK)
		NMF_PANIC("PANIC - getInterface Param\n") ;

	error = m_pNmfProcWrp->getInterface("Config", &m_IConfig);
	if (error != NMF_OK)
		NMF_PANIC("PANIC - getInterface Config\n") ;
#endif
	error = m_pNmfProcWrp->bindFromUser("fsminit", 1 , &mIfsmInit);
	if (error != NMF_OK)
		NMF_PANIC("Error: unable to bind fsminit!...\n");

	error = EnsWrapper_bindToUser(mENSComponent.getOMXHandle(), m_pNmfProcWrp, "proxy", getEventHandlerCB(), 8);
	if (error != NMF_OK)
		NMF_PANIC("Error: unable to bind proxy!...\n");

	error = EnsWrapper_bindToUser(mENSComponent.getOMXHandle(), m_pNmfProcWrp, "ToOMXComponent", mConfigCB, 1);
	if (error != NMF_OK)
		NMF_PANIC("Error: unable to bind ToOMXComponent!...\n");

	char name[20]; //reserve some char for formatting callback name
	size_t iNbInput =0;
	size_t iNbOutput=0;
	PortVideo* pPort;
	for (unsigned int Index=0; Index< mENSComponent.getPortCount(); ++Index)
	{
		pPort = (PortVideo*)mENSComponent.getPort(Index);
		MSG3("\n %s Port %d : direction =%d\n", GetComponentName(), Index, pPort->getDirection());
		//reset port info at this point 
		//NO it's too late!
#if 0
		if (pPort->getBufferSupplier() !=OMX_BufferSupplyUnspecified)
		{
			printf("wwwwwwwwwwwwwwwwwwwwwwwwwwww    %s.port[%d] reset state(%d) to OMX_BufferSupplyUnspecified\n", GetComponentName(), Index, pPort->getBufferSupplier());
			pPort->setBufferSupplier(OMX_BufferSupplyUnspecified);
		}
#endif
		switch(pPort->getDirection())
		{
		case OMX_DirInput: //bind emptythisbuffer, emptybufferdone for each input port
			if (iNbInput < MAX_PORTS_COUNT)
			{
				sprintf(name, "emptythisbuffer[%d]", Index);
				error = m_pNmfProcWrp->bindFromUser(name, pPort->getBufferCountActual(), &mIemptyThisBuffer[Index]);
				if (error != NMF_OK)
					NMF_PANIC("PANIC %s->bindFromUser %s\n", GetComponentName(), name) ;

				sprintf(name, "emptybufferdone[%d]", Index);
				error = EnsWrapper_bindToUser(mENSComponent.getOMXHandle(),
					m_pNmfProcWrp,
					name ,
					this->getEmptyBufferDoneCB(),
					pPort->getBufferCountActual());

				if (error != NMF_OK)
//.........这里部分代码省略.........
开发者ID:Meticulus,项目名称:vendor_st-ericsson_u8500,代码行数:101,代码来源:openmax_component_proxy.cpp


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