VU+ code
int eDVBFrontend::openFrontend()
{
if (m_state != stateClosed)
return -1; // already opened
m_state=stateIdle;
m_tuning=0;
if (!m_simulate)
{
eDebug("opening frontend %d", m_dvbid);
if (m_fd < 0)
{
m_fd = ::open(m_filename, O_RDWR|O_NONBLOCK);
if (m_fd < 0)
{
eWarning("failed! (%s) %m", m_filename);
return -1;
}
}
else
eWarning("frontend %d already opened", m_dvbid);
if (m_delsys.empty())
{
if (::ioctl(m_fd, FE_GET_INFO, &fe_info) < 0)
{
eWarning("ioctl FE_GET_INFO failed");
::close(m_fd);
m_fd = -1;
return -1;
}
openPli
int eDVBFrontend::openFrontend()
{
if (m_state != stateClosed)
return -1; // already opened
m_state=stateIdle;
m_tuning=0;
if (!m_simulate)
{
eDebug("[eDVBFrontend%d] opening frontend", m_dvbid);
if (m_fd < 0)
{
m_fd = ::open(m_filename.c_str(), O_RDWR | O_NONBLOCK | O_CLOEXEC);
if (m_fd < 0)
{
eWarning("[eDVBFrontend] opening %s failed: %m", m_filename.c_str());
return -1;
}
}
else
eWarning("[eDVBFrontend%d] frontend already opened", m_dvbid);
if (m_dvbversion == 0)
{
m_dvbversion = DVB_VERSION(3, 0);
#if defined DTV_API_VERSION
struct dtv_property p;
struct dtv_properties cmdseq;