本文整理汇总了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;
}
示例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)->