struct videoTypeParms eMPConfig::getVideoParms(eString name, eString extension) { struct videoTypeParms vparms; extension = extension.upper(); // eDebug("[MPCONFIG] name = %s, extension = %s", name.c_str(), extension.c_str()); vparms.name = "default"; vparms.extension = extension; vparms.videoRate = "1024"; vparms.audioRate = "192"; vparms.videoCodec = "mpeg2"; vparms.videoRatio = "704x576"; vparms.transcodeVideo = false; vparms.transcodeAudio = false; vparms.fps = "25"; vparms.soutadd = false; for ( unsigned int i = 0; i < videoParmList.size(); i++) { if ((videoParmList[i].extension == extension) && (videoParmList[i].name == name)) { vparms = videoParmList[i]; break; } } // eDebug("[MPCONFIG] vparms.extension: %s",vparms.extension.c_str()); return vparms; }
int eEPGSearch::EPGSearching(eString title, int ExactMatch, int CaseSensitive, int TimeSpanSearch, tm beginTime, tm endTime, int Days, int Max_Duration ) { eString search; eString current; int intFound = 0; search = title; if (!ExactMatch && !CaseSensitive) search = title.upper(); SearchResultsEPG.clear(); current = "1:15:fffffffe:12:ffffffff:0:0:0:0:0:"; eServiceInterface *iface=eServiceInterface::getInstance(); if (iface) { if (search != "") { eServiceReference current_service=string2ref(current); eSearchAllTVServices2 conv( *iface, search,ExactMatch, CaseSensitive, TimeSpanSearch, beginTime, endTime, Days, Max_Duration); Signal1<void,const eServiceReference&> signal; signal.connect(slot(conv, &eSearchAllTVServices2::addEntry)); iface->enterDirectory(current_service, signal); iface->leaveDirectory(current_service); } } if (SearchResultsEPG.size() ) intFound = 1; return intFound; }
int eEPGSearch::EPGSearching(eString title, SearchReferences SearchRefs, int ExactMatch, int CaseSensitive, int TimeSpanSearch, tm beginTime, tm endTime, int Days, int Max_Duration ) { eString search; int intFound = 0; search = title; if (!ExactMatch && !CaseSensitive) search = title.upper(); SearchResultsEPG.clear(); for (SearchReferences::iterator a = SearchRefs.begin(); a != SearchRefs.end(); a++) SearchInChannel(a->SearchRef, search,ExactMatch, CaseSensitive, TimeSpanSearch, beginTime, endTime, Days, Max_Duration); if (SearchResultsEPG.size() ) intFound = 1; return intFound; }
bool eMountPoint::fileSystemIsSupported(eString fsname) { eString s; bool found = false; fsname = fsname.upper(); std::ifstream in("/proc/filesystems", std::ifstream::in); while (in >> s) { if (found = (s.upper() == fsname)) break; } in.close(); return found; }
static bool fileSystemIsSupported(eString fsname) { eString s; bool found = false; fsname = fsname.upper(); std::ifstream in("/proc/filesystems", std::ifstream::in); // Note /proc/filesystems has two columns, first column could be "nodev", // the second the real fs. We check both here which doesn't harm eDebug("[MOUNT] looking for %s", fsname.c_str()); while (in >> s) { if (found = (s.upper() == fsname)) break; } in.close(); return found; }
int eEPGSearch::EPGSearching(eString title, eServiceReference SearchRef, int AllServices, int ExactMatch, int CaseSensitive, int genre) { eString search; time_t begin = 0; //1184515200; eString current; int intFound = 0; search = title; if (!ExactMatch && !CaseSensitive) search = title.upper(); SearchResultsEPG.clear(); if (AllServices) { current = "1:15:fffffffe:12:ffffffff:0:0:0:0:0:"; eServiceInterface *iface=eServiceInterface::getInstance(); if (iface) { if ((search != "") || (genre != 0)) { eServiceReference current_service=string2ref(current); eSearchAllTVServices conv( *iface, search, begin, ExactMatch, CaseSensitive, genre); Signal1<void,const eServiceReference&> signal; signal.connect(slot(conv, &eSearchAllTVServices::addEntry)); iface->enterDirectory(current_service, signal); iface->leaveDirectory(current_service); } } } else SearchInChannel(SearchRef, search, begin,ExactMatch, CaseSensitive, genre); if (SearchResultsEPG.size() ) intFound = 1; return intFound; }
bool eMountPoint::isIdentical(eString mountOn, eString mountDev) { bool found = false; if (mountOn == mp.localDir) { switch (mp.fstype) { case 0: //NFS found = (eString().sprintf("%d.%d.%d.%d:%s", mp.ip[0], mp.ip[1], mp.ip[2], mp.ip[3], mp.mountDir.c_str()) == mountDev); break; case 1: //CIFS case 3: //SMBFS found = (eString().sprintf("//%d.%d.%d.%d/%s", mp.ip[0], mp.ip[1], mp.ip[2], mp.ip[3], mp.mountDir.c_str()).upper() == mountDev.upper()); break; case 2: //DEVICE found = ((mountOn == mp.localDir) && (mountDev == mp.mountDir) && (mp.ip[0] == 0) && (mp.ip[1] == 0) && (mp.ip[2] == 0) && (mp.ip[3] == 0)); break; default: break; } } return found; }
bool eMountPoint::isIdentical(eString mountOn, eString mountDev) { bool found = false; if ((mountOn == localDir) || (mountOn.strReplace("/media/", "/mnt/") == localDir)) { switch (fstype) { case nfsMount: found = (eString().sprintf("%s:%s", remoteHost.c_str(), mountDir.c_str()) == mountDev); if (!found) found = (eString().sprintf("%s:/%s", remoteHost.c_str(), mountDir.c_str()) == mountDev); break; case cifsMount: found = (eString().sprintf("//%s/%s", remoteHost.c_str(), mountDir.c_str()) == mountDev); if (!found) found = (eString().sprintf("//%s/%s", remoteIP.c_str(), mountDir.c_str()) == mountDev); break; case smbMount: found = (eString().sprintf("//%s/%s", remoteHost.upper().c_str(), mountDir.upper().c_str()) == mountDev.upper()); if (!found) found = (eString().sprintf("//%s/%s", remoteIP.c_str(), mountDir.upper().c_str()) == mountDev.upper()); break; #ifdef ENABLE_DEVMOUNTS case deviceMount: found = ((mountOn == localDir) && (mountDev == mountDir) && remoteHost == (eString) ""); break; #endif default: break; } } return found; }