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


C++ ePtr类代码示例

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


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

示例1: frontendDataToDict

void frontendDataToDict(ePyObject &dest, ePtr<iDVBFrontendData> data)
{
	if (dest && PyDict_Check(dest))
	{
		PutToDict(dest, "tuner_number", data->getNumber());
		PutToDict(dest, "tuner_type", data->getTypeDescription().c_str());
	}
}
开发者ID:OpenLD,项目名称:enigma2,代码行数:8,代码来源:python_helpers.cpp

示例2: setPixmap

void eSubtitleWidget::setPixmap(ePtr<gPixmap> &pixmap, gRegion changed, eRect pixmap_dest)
{
	m_pixmap = pixmap;
	m_pixmap_dest = pixmap_dest; /* this is in a virtual 720x576 cage */
	
		/* incoming "changed" regions are relative to the physical pixmap area, so they have to be scaled to the virtual pixmap area, then to the screen */
	changed.scale(m_pixmap_dest.width(), 720, m_pixmap_dest.height(), 576);
	changed.moveBy(ePoint(m_pixmap_dest.x(), m_pixmap_dest.y()));

	if (pixmap->size().width() && pixmap->size().height())
		changed.scale(size().width(), pixmap->size().width(), size().height(), pixmap->size().height());
	
	invalidate(changed);
}
开发者ID:Ophiuchus1312,项目名称:enigma2-master,代码行数:14,代码来源:esubtitle.cpp

示例3: tuner_type_channel_default

int tuner_type_channel_default(ePtr<iDVBChannelList> &channellist, const eDVBChannelID &chid)
{
	if (channellist)
	{
		ePtr<iDVBFrontendParameters> feparm;
		if (!channellist->getChannelFrontendData(chid, feparm))
		{
			int system;
			if (!feparm->getSystem(system))
			{
				switch(system)
				{
					case iDVBFrontend::feSatellite:
						return 50000;
					case iDVBFrontend::feCable:
						return 40000;
					case iDVBFrontend::feTerrestrial:
						return 30000;
					default:
						break;
				}
			}
		}
	}
	return 0;
}
开发者ID:ambrosa,项目名称:test,代码行数:26,代码来源:dvb.cpp

示例4: ASSERT

RESULT eNavigation::recordService(const eServiceReference &ref, ePtr<iRecordableService> &service, bool simulate, pNavigation::RecordType type)
{
	ASSERT(m_servicehandler);
	RESULT res = m_servicehandler->record(ref, service);
	if (res)
	{
		eDebug("record: %d", res);
		service = 0;
	}
	else
	{
		if (simulate)
			m_simulate_recordings.insert(service);
		else
		{
			ePtr<eConnection> conn;
			service->connectEvent(slot(*this, &eNavigation::recordEvent), conn);
			m_recordings[service]=conn;
			m_recordings_services[service]=ref;
			m_recordings_types[service]=type;

			//for (std::map<ePtr<iRecordableService>, eServiceReference >::iterator it2(m_recordings_services.begin()); it2 != m_recordings_services.end(); ++it2)
			//	eDebug("[core.cpp] recordService: ref %s", (it2->second).toString().c_str());
			//for (std::map<ePtr<iRecordableService>, pNavigation::RecordType >::iterator it3(m_recordings_types.begin()); it3 != m_recordings_types.end(); ++it3)
			//	eDebug("[core.cpp] recordService: type %d", it3->second);
		}
	}
	return res;
}
开发者ID:Adga52,项目名称:enigma2,代码行数:29,代码来源:core.cpp

示例5: eMain

	eMain()
	{
		m_dvbdb = new eDVBDB();
		m_mgr = new eDVBResourceManager();

		eDVBFrontendParametersSatellite fesat;

		fesat.frequency = 11817000; // 12070000;
		fesat.symbol_rate = 27500000;
		fesat.polarisation = eDVBFrontendParametersSatellite::Polarisation_Vertical;
		fesat.fec = eDVBFrontendParametersSatellite::FEC_3_4;
		fesat.inversion = eDVBFrontendParametersSatellite::Inversion_Off;
		fesat.orbital_position = 192;

		eDVBFrontendParameters *fe = new eDVBFrontendParameters();

		fe->setDVBS(fesat);

		if (m_mgr->allocateRawChannel(m_channel))
			eDebug("shit it failed!");

//		init.setRunlevel(eAutoInitNumbers::main);
		eDebug("starting scan...");

		std::list<ePtr<iDVBFrontendParameters> > list;

		list.push_back(fe);

		m_scan = new eDVBScan(m_channel);
		m_scan->start(list);

		m_scan->connectEvent(slot(*this, &eMain::scanEvent), m_scan_event_connection);
	}
开发者ID:ALShalahi,项目名称:enigma2,代码行数:33,代码来源:enigma-scan.cpp

示例6:

void eServiceMP3::gstPoll(ePtr<GstMessageContainer> const &msg)
{
	switch (msg->getType())
	{
		case 1:
		{
			GstMessage *gstmessage = *((GstMessageContainer*)msg);
			if (gstmessage)
			{
				gstBusCall(gstmessage);
			}
			break;
		}
		case 2:
		{
			GstBuffer *buffer = *((GstMessageContainer*)msg);
			if (buffer)
			{
				pullSubtitle(buffer);
			}
			break;
		}
		case 3:
		{
			GstPad *pad = *((GstMessageContainer*)msg);
			gstTextpadHasCAPS_synced(pad);
			break;
		}
	}
}
开发者ID:ambrosa,项目名称:test,代码行数:30,代码来源:servicemp3.cpp

示例7: stopRecordService

RESULT eNavigation::stopRecordService(ePtr<iRecordableService> &service)
{
	service->stop();
	std::set<ePtr<iRecordableService> >::iterator it =
		m_simulate_recordings.find(service);
	if (it != m_simulate_recordings.end())
	{
		m_simulate_recordings.erase(it);
		return 0;
	}
	else
	{
		std::map<ePtr<iRecordableService>, ePtr<eConnection> >::iterator it =
			m_recordings.find(service);
		if (it != m_recordings.end())
		{
			m_recordings.erase(it);
			/* send stop event */
			m_record_event(service, iRecordableService::evEnd);
			return 0;
		}
	}

	eDebug("try to stop non running recording!!");  // this should not happen
	return -1;
}
开发者ID:1198s,项目名称:enigma2,代码行数:26,代码来源:core.cpp

示例8: streamingDataToDict

void streamingDataToDict(ePyObject &dest, ePtr<iStreamData> data)
{
	if (dest && PyDict_Check(dest))
	{
		int pmt, pcr, txt, adapter, demux, default_audio_pid;
		std::vector<int> video, audio, subtitle;
		unsigned int i;
		ePyObject l = PyList_New(0);
		PyList_AppendSteal(l, createTuple(0, "pat"));

		data->getPmtPid(pmt);
		if (pmt != -1)
			PyList_AppendSteal(l, createTuple(pmt, "pmt"));

		data->getVideoPids(video);
		for (i = 0; i < video.size(); i++)
		{
			PyList_AppendSteal(l, createTuple(video[i], "video"));
		}
		data->getAudioPids(audio);
		for (i = 0; i < audio.size(); i++)
		{
			PyList_AppendSteal(l, createTuple(audio[i], "audio"));
		}
		data->getSubtitlePids(subtitle);
		for (i = 0; i < subtitle.size(); i++)
		{
			PyList_AppendSteal(l, createTuple(subtitle[i], "subtitle"));
		}

		data->getPcrPid(pcr);
		PyList_AppendSteal(l, createTuple(pcr, "pcr"));

		data->getTxtPid(txt);
		if (txt != -1)
			PyList_AppendSteal(l, createTuple(txt, "text"));

		PutToDict(dest, "pids", l);

		data->getAdapterId(adapter);
		PutToDict(dest, "adapter", adapter);
		data->getDemuxId(demux);
		PutToDict(dest, "demux", demux);
		data->getDefaultAudioPid(default_audio_pid);
		PutToDict(dest, "default_audio_pid", default_audio_pid);
	}
}
开发者ID:bbbuk,项目名称:enigma2,代码行数:47,代码来源:python_helpers.cpp

示例9: addCachedPids

int eRTSPStreamClient::addCachedPids(ePtr<eDVBService> service, eServiceReferenceDVB s)
{
	int found = 0;
	for (int x = 0; x < 5; ++x)
	{
		int entry = service->getCacheEntry((eDVBService::cacheID)x);
		if (entry != -1)
		{
			eDebug("Found cached pid %d [%x]", entry, entry);
			pid_sr[entry] = s;
			found = 1;
		}
	}
	return !found;
}
开发者ID:OpenESI,项目名称:Gui,代码行数:15,代码来源:rtspstreamserver.cpp

示例10: frontendStatusToDict

void frontendStatusToDict(ePyObject &dest, ePtr<iDVBFrontendStatus> status)
{
	if (dest && PyDict_Check(dest))
	{
		PutToDict(dest, "tuner_state", status->getStateDescription().c_str());
		PutToDict(dest, "tuner_locked", status->getLocked());
		PutToDict(dest, "tuner_synced", status->getSynced());
		PutToDict(dest, "tuner_bit_error_rate", status->getBER());
		PutToDict(dest, "tuner_signal_quality", status->getSNR());
		int snrdb = status->getSNRdB();
		if (snrdb >= 0) PutToDict(dest, "tuner_signal_quality_db", snrdb);
		PutToDict(dest, "tuner_signal_power", status->getSignalPower());
	}
}
开发者ID:OpenLD,项目名称:enigma2,代码行数:14,代码来源:python_helpers.cpp

示例11:

void eServiceMP3Record::gstPoll(ePtr<GstMessageContainer> const &msg)
{
	switch (msg->getType())
	{
		case 1:
		{
			GstMessage *gstmessage = *((GstMessageContainer*)msg);
			if (gstmessage)
			{
				gstBusCall(gstmessage);
			}
			break;
		}
		default:
			eDebug("[eMP3ServiceRecord] gstPoll error unknown message type");
	}
}
开发者ID:Open-Plus,项目名称:opgui,代码行数:17,代码来源:servicemp3record.cpp

示例12: getDecodeDemux

int eDVBServicePMTHandler::getDecodeDemux(ePtr<iDVBDemux> &demux)
{
	int ret=0;
		/* if we're using the decoding demux as data source
		   (for example in pvr playbacks), return that one. */
	if (m_use_decode_demux)
	{
		demux = m_demux;
		return ret;
	}
	
	ASSERT(m_channel); /* calling without a previous ::tune is certainly bad. */

	ret = m_channel->getDemux(demux, iDVBChannel::capDecode);
	if (!ret)
		demux->getCADemuxID(m_decode_demux_num);

	return ret;
}
开发者ID:pe-tardo,项目名称:dvbapp,代码行数:19,代码来源:pmt.cpp

示例13: m_record_event

RESULT eNavigation::stopRecordService(ePtr<iRecordableService> &service)
{
	service->stop();
	std::set<ePtr<iRecordableService> >::iterator it =
		m_simulate_recordings.find(service);
	if (it != m_simulate_recordings.end())
	{
		m_simulate_recordings.erase(it);
		return 0;
	}
	else
	{
		std::map<ePtr<iRecordableService>, ePtr<eConnection> >::iterator it =
			m_recordings.find(service);
		if (it != m_recordings.end())
		{
			m_recordings.erase(it);
			/* send stop event */
			m_record_event(service, iRecordableService::evEnd);
			std::map<ePtr<iRecordableService>, eServiceReference >::iterator it_services =
				m_recordings_services.find(service);
			if (it_services != m_recordings_services.end())
			{
				m_recordings_services.erase(it_services);
			}
			std::map<ePtr<iRecordableService>, pNavigation::RecordType >::iterator it_types =
				m_recordings_types.find(service);
			if (it_types != m_recordings_types.end())
			{
				m_recordings_types.erase(it_types);
			}
			//for (std::map<ePtr<iRecordableService>, eServiceReference >::iterator it2(m_recordings_services.begin()); it2 != m_recordings_services.end(); ++it2)
			//	eDebug("[core.cpp] after stopRecordService: ref %s", (it2->second).toString().c_str());
			//for (std::map<ePtr<iRecordableService>, pNavigation::RecordType >::iterator it3(m_recordings_types.begin()); it3 != m_recordings_types.end(); ++it3)
			//	eDebug("[core.cpp] after stopRecordService: type %d", it3->second);
			return 0;
		}
	}

	eDebug("try to stop non running recording!!");  // this should not happen
	return -1;
}
开发者ID:Adga52,项目名称:enigma2,代码行数:42,代码来源:core.cpp

示例14: ASSERT

RESULT eNavigation::recordService(const eServiceReference &ref, ePtr<iRecordableService> &service, bool simulate)
{
	ASSERT(m_servicehandler);
	RESULT res = m_servicehandler->record(ref, service);
	if (res)
	{
		eDebug("record: %d", res);
		service = 0;
	}
	else
	{
		if (simulate)
			m_simulate_recordings.insert(service);
		else
		{
			ePtr<eConnection> conn;
			service->connectEvent(slot(*this, &eNavigation::recordEvent), conn);
			m_recordings[service]=conn;
		}
	}
	return res;
}
开发者ID:1198s,项目名称:enigma2,代码行数:22,代码来源:core.cpp

示例15: main

int main(int argc, char **argv)
{
#ifdef MEMLEAK_CHECK
	atexit(DumpUnfreed);
#endif

#ifdef OBJECT_DEBUG
	atexit(object_dump);
#endif

	gst_init(&argc, &argv);

	for (int i = 0; i < argc; i++)
	{
		if (!(strcmp(argv[i], "--debug-no-color")) or !(strcmp(argv[i], "--nc")))
		{
			logOutputColors = 0;
		}
	}

	m_erroroutput = new eErrorOutput();
	m_erroroutput->run();

	// set pythonpath if unset
	setenv("PYTHONPATH", eEnv::resolve("${libdir}/enigma2/python").c_str(), 0);
	printf("PYTHONPATH: %s\n", getenv("PYTHONPATH"));
	printf("DVB_API_VERSION %d DVB_API_VERSION_MINOR %d\n", DVB_API_VERSION, DVB_API_VERSION_MINOR);

	bsodLogInit();

	ePython python;
	eMain main;

#if 1
	ePtr<gMainDC> my_dc;
	gMainDC::getInstance(my_dc);

	//int double_buffer = my_dc->haveDoubleBuffering();

	ePtr<gLCDDC> my_lcd_dc;
	gLCDDC::getInstance(my_lcd_dc);


	/* ok, this is currently hardcoded for arabic. */
	/* some characters are wrong in the regular font, force them to use the replacement font */
	for (int i = 0x60c; i <= 0x66d; ++i)
		eTextPara::forceReplacementGlyph(i);
	eTextPara::forceReplacementGlyph(0xfdf2);
	for (int i = 0xfe80; i < 0xff00; ++i)
		eTextPara::forceReplacementGlyph(i);

	eWidgetDesktop dsk(my_dc->size());
	eWidgetDesktop dsk_lcd(my_lcd_dc->size());

	dsk.setStyleID(0);
	dsk_lcd.setStyleID(my_lcd_dc->size().width() == 96 ? 2 : 1);

/*	if (double_buffer)
	{
		eDebug(" - double buffering found, enable buffered graphics mode.");
		dsk.setCompositionMode(eWidgetDesktop::cmBuffered);
	} */

	wdsk = &dsk;
	lcddsk = &dsk_lcd;

	dsk.setDC(my_dc);
	dsk_lcd.setDC(my_lcd_dc);

	dsk.setBackgroundColor(gRGB(0,0,0,0xFF));
#endif

		/* redrawing is done in an idle-timer, so we have to set the context */
	dsk.setRedrawTask(main);
	dsk_lcd.setRedrawTask(main);

	eDebug("Checking box...");
	
	FILE *infile;
	char line[100];
	char command[64];

	if((infile = fopen("/proc/stb/info/boxtype", "r")) != NULL)
	{
		fgets(line, sizeof(line), infile);

		if(strcmp(line, "ini-5000sv\n") == 0) 
		{
			eDebug("Miraclebox Premium Twin detected");
		}
		else if(strcmp(line, "ini-1000sv\n") == 0) 
		{
			eDebug("Miraclebox Premium Mini detected");
		}
		else if(strcmp(line, "ini-2000sv\n") == 0) 
		{
			eDebug("Miraclebox Premium Mini+ detected");
		}		
		else if(strcmp(line, "ini-8000sv\n") == 0) 
		{
//.........这里部分代码省略.........
开发者ID:miraclebox-git,项目名称:stb-mbgui,代码行数:101,代码来源:enigma.cpp


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