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


C++ IPlayer::getSurface方法代码示例

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


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

示例1: main

int main() {
	IWindow* w;
	ISurface* s;
	ILocalDeviceManager* dm;
	IPlayer* player;
	IPlayer* img;

#if HAVE_COMPSUPPORT
	IComponentManager* cm = IComponentManager::getCMInstance();
	dm = ((LocalDeviceManagerCreator*)(cm->getObject("LocalDeviceManager")))();
#else
	dm = LocalDeviceManager::getInstance();
#endif

	dm->createDevice("systemScreen(0)");
#if HAVE_COMPSUPPORT
	w = ((WindowCreator*)(cm->getObject("Window")))(10, 10, 100, 100);
#else
	w = new DFBWindow(10, 10, 100, 100);
#endif

	w->setCaps(w->getCap("ALPHACHANNEL"));
	w->draw();
	w->show();

	player = new Player("teste");
	img = new ImagePlayer("/root/bg_initializing.png");
	s = img->getSurface();
	w->renderFrom(s);

	//TODO: tests
	cout << "Player test has shown image. press enter to continue" << endl;
	getchar();
	dm->clearWidgetPools();
	cout << "Player test has released widgets. press enter to continue" << endl;
	getchar();

	return 0;
}
开发者ID:lince,项目名称:ginga-srpp,代码行数:39,代码来源:test.cpp

示例2: startPresentation


//.........这里部分代码省略.........
#else
		mavFilter = new PipeFilter(0);
#endif

		//mavFilter->addDestination(1);

		((IDemuxer*)demuxer)->addPesFilter(PFT_DEFAULTTS, mavFilter);

		// Create Main AV
		cout << "lssm-ccm::sp creating av player" << endl;

#if HAVE_COMPSUPPORT
		mv = ((PlayerCreator*)(cm->getObject("AVPlayer")))(
				mrlv.c_str(), true);

		//ma = ((PlayerCreator*)(cm->getObject("AVPlayer")))(
		//		mrla.c_str(), false);

#else
		mv = new AVPlayer(mrlv.c_str(), true);
		//ma = new AVPlayer(mrla.c_str(), true);
#endif

		//ma->setOutWindow(NULL);
		mv->setOutWindow(wmv);

		cout << "lssm-ccp::sp create av ok" << endl;

		vPid = ((IDemuxer*)demuxer)->getDefaultMainVideoPid();
		aPid = ((IDemuxer*)demuxer)->getDefaultMainAudioPid();

		((IDemuxer*)demuxer)->waitBuffers();
		while (smv == NULL) {
			smv = mv->getSurface();
			::usleep(100000);
		}

		ni = ((ITuner*)tuner)->getCurrentInterface();
		if (ni != NULL && ni->getCaps() & DPC_CAN_DECODESTC) {
			cout << "lssm-ccp::sp using stc hardware!" << endl;
			((IDataProcessor*)dataProcessor)->setSTCProvider(ni);

		} else {
			cout << "lssm-ccp::sp using stc wrapper!" << endl;
			sw = new StcWrapper(mv);
			((IDataProcessor*)dataProcessor)->setSTCProvider(sw);
		}

		nptProvider = ((IDataProcessor*)dataProcessor)->getNPTProvider();
		if (nptProvider != NULL) {
			pem->setTimeBaseProvider((ITimeBaseProvider*)nptProvider);
		}

		/*((IDataProcessor*)dataProcessor)->
				createStreamTypeSectionFilter(
						STREAM_TYPE_DSMCC_TYPE_C, (IDemuxer*)demuxer);*/

		((IDataProcessor*)dataProcessor)->
				createStreamTypeSectionFilter(
						STREAM_TYPE_DSMCC_TYPE_D, (IDemuxer*)demuxer);

		/*((IDataProcessor*)dataProcessor)->
				createPidSectionFilter(
						SDT_PID, (IDemuxer*)demuxer); //SDT

		((IDataProcessor*)dataProcessor)->
开发者ID:ezequielgarcia,项目名称:ginga.ar-diet,代码行数:67,代码来源:CommonCoreManager.cpp


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