本文整理汇总了C++中ePtr类的典型用法代码示例。如果您正苦于以下问题:C++ ePtr类的具体用法?C++ ePtr怎么用?C++ ePtr使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ePtr类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: transponderDataToDict
void transponderDataToDict(ePyObject &dest, ePtr<iDVBTransponderData> data)
{
if (dest && PyDict_Check(dest))
{
int value;
PutToDict(dest, "tuner_type", data->getTunerType().c_str());
PutToDict(dest, "frequency", data->getFrequency());
value = data->getSymbolRate();
if (value > 0) PutToDict(dest, "symbol_rate", value);
value = data->getOrbitalPosition();
if (value >= 0) PutToDict(dest, "orbital_position", value);
value = data->getInversion();
if (value >= 0) PutToDict(dest, "inversion", value);
value = data->getFecInner();
if (value >= 0) PutToDict(dest, "fec_inner", value);
value = data->getModulation();
if (value >= 0) PutToDict(dest, "modulation", value);
value = data->getPolarization();
if (value >= 0) PutToDict(dest, "polarization", value);
value = data->getRolloff();
if (value >= 0) PutToDict(dest, "rolloff", value);
value = data->getPilot();
if (value >= 0) PutToDict(dest, "pilot", value);
value = data->getSystem();
if (value >= 0) PutToDict(dest, "system", value);
value = data->getIsId();
if (value >= -1) PutToDict(dest, "is_id", value);
value = data->getPLSMode();
if (value >= 0) PutToDict(dest, "pls_mode", value);
value = data->getPLSCode();
if (value >= 0) PutToDict(dest, "pls_code", value);
/* additional terrestrial fields */
value = data->getBandwidth();
if (value >= 0) PutToDict(dest, "bandwidth", value);
value = data->getCodeRateLp();
if (value >= 0) PutToDict(dest, "code_rate_lp", value);
value = data->getCodeRateHp();
if (value >= 0) PutToDict(dest, "code_rate_hp", value);
value = data->getConstellation();
if (value >= 0) PutToDict(dest, "constellation", value);
value = data->getTransmissionMode();
if (value >= 0) PutToDict(dest, "transmission_mode", value);
value = data->getGuardInterval();
if (value >= 0) PutToDict(dest, "guard_interval", value);
value = data->getHierarchyInformation();
if (value >= 0) PutToDict(dest, "hierarchy_information", value);
value = data->getPlpId();
if (value >= 0) PutToDict(dest, "plp_id", value);
}
}
开发者ID:OpenLD,项目名称:enigma2,代码行数:51,代码来源:python_helpers.cpp
示例17: eDebug
RESULT eDVBResourceManager::allocateDemux(eDVBRegisteredFrontend *fe, ePtr<eDVBAllocatedDemux> &demux, int &cap)
{
/* find first unused demux which is on same adapter as frontend (or any, if PVR)
never use the first one unless we need a decoding demux. */
eDebug("allocate demux");
eSmartPtrList<eDVBRegisteredDemux>::iterator i(m_demux.begin());
if (i == m_demux.end())
return -1;
ePtr<eDVBRegisteredDemux> unused;
if (m_boxtype == DM7025) // ATI
{
/* FIXME: hardware demux policy */
int n=0;
if (!(cap & iDVBChannel::capDecode))
{
if (m_demux.size() > 2) /* assumed to be true, otherwise we have lost anyway */
{
++i, ++n;
++i, ++n;
}
}
for (; i != m_demux.end(); ++i, ++n)
{
int is_decode = n < 2;
int in_use = is_decode ? (i->m_demux->getRefCount() != 2) : i->m_inuse;
if ((!in_use) && ((!fe) || (i->m_adapter == fe->m_adapter)))
{
if ((cap & iDVBChannel::capDecode) && !is_decode)
continue;
unused = i;
break;
}
}
}
else
{
iDVBAdapter *adapter = fe ? fe->m_adapter : m_adapter.begin(); /* look for a demux on the same adapter as the frontend, or the first adapter for dvr playback */
int source = fe ? fe->m_frontend->getDVBID() : -1;
cap |= capHoldDecodeReference; // this is checked in eDVBChannel::getDemux
if (!fe)
{
/*
* For pvr playback, start with the last demux.
* On some hardware, we have less ca devices than demuxes,
* so we should try to leave the first demuxes for live tv,
* and start with the last for pvr playback
*/
i = m_demux.end();
--i;
}
while (i != m_demux.end())
{
if (i->m_adapter == adapter)
{
if (!i->m_inuse)
{
/* mark the first unused demux, we'll use that when we do not find a better match */
if (!unused) unused = i;
}
else
{
/* demux is in use, see if we can share it */
if (i->m_demux->getSource() == source)
{
/*
* TODO: when allocating a dvr demux, we cannot share a used demux.
* We should probably always pick a free demux, to start a new pvr playback.
* Each demux is fed by its own dvr device, so each has a different memory source
*/
demux = new eDVBAllocatedDemux(i);
return 0;
}
}
}
if (fe)
{
++i;
}
else
{
--i;
}
}
}
if (unused)
{
demux = new eDVBAllocatedDemux(unused);
if (fe)
demux->get().setSourceFrontend(fe->m_frontend->getDVBID());
else
demux->get().setSourcePVR(0);
return 0;
//.........这里部分代码省略.........
开发者ID:ambrosa,项目名称:test,代码行数:101,代码来源:dvb.cpp
示例18:
~eMain()
{
m_dvbdb->saveServicelist();
m_mgr->releaseCachedChannel();
done_servicepeer();
e2avahi_close();
}
开发者ID:miraclebox-git,项目名称:stb-mbgui,代码行数:7,代码来源:enigma.cpp
示例19: updatePosition
void eVideoWidget::updatePosition(int disable)
{
if (!disable)
m_state |= 4;
if (disable && !(m_state & 4))
{
// eDebug("was not visible!");
return;
}
if ((m_state & 2) != 2)
{
// eDebug("no size!");
return;
}
// eDebug("position %d %d -> %d %d", position().x(), position().y(), size().width(), size().height());
eRect pos(0,0,0,0);
if (!disable)
pos = eRect(getAbsolutePosition(), size());
else
m_state &= ~4;
// eDebug("abs position %d %d -> %d %d", pos.left(), pos.top(), pos.width(), pos.height());
if (!disable && m_state & 8 && pos == m_user_rect)
{
// eDebug("matched");
return;
}
if (!(m_state & 1))
{
m_user_rect = pos;
m_state |= 1;
// eDebug("set user rect pos!");
}
// eDebug("m_user_rect %d %d -> %d %d", m_user_rect.left(), m_user_rect.top(), m_user_rect.width(), m_user_rect.height());
if (!disable)
{
cXineLib* xineLib = cXineLib::getInstance();
xineLib->setVideoWindow(pos.left(), pos.top(), pos.width(), pos.height());
pendingFullsize &= ~(1 << m_decoder);
m_state |= 8;
}
else
{
m_state &= ~8;
pendingFullsize |= (1 << m_decoder);
fullsizeTimer->start(100, true);
}
}
开发者ID:OpenPE,项目名称:enigma2pc,代码行数:57,代码来源:evideo.cpp
示例20: eDVBDB
eMain()
{
init.setRunlevel(eAutoInitNumbers::main);
/* TODO: put into init */
m_dvbdb = new eDVBDB();
m_mgr = new eDVBResourceManager();
m_locale_time_handler = new eDVBLocalTimeHandler();
m_epgcache = new eEPGCache();
m_mgr->setChannelList(m_dvbdb);
}
开发者ID:st7TEAM,项目名称:e2a,代码行数:10,代码来源:enigma.cpp
注:本文中的ePtr类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论