Esempio n. 1
0
RESULT eDVBDemux::getSTC(pts_t &pts, int num)
{
	int fd = openDemux();

	if (fd < 0)
		return -ENODEV;

	struct dmx_stc stc;
	stc.num = num;
	stc.base = 1;

	if (ioctl(fd, DMX_GET_STC, &stc) < 0)
	{
		eDebug("DMX_GET_STC failed!");
		::close(fd);
		return -1;
	}

	pts = stc.stc;

	eDebug("DMX_GET_STC - %lld", pts);

	::close(fd);
	return 0;
}
Esempio n. 2
0
RESULT eDVBDemux::setSourcePVR(int pvrnum)
{
	int fd = openDemux();
	if (fd < 0) return -1;
	int n = DMX_SOURCE_DVR0 + pvrnum;
	int res = ::ioctl(fd, DMX_SET_SOURCE, &n);
	source = -1;
	::close(fd);
	return res;
}
Esempio n. 3
0
RESULT eDVBDemux::setSourcePVR(int pvrnum)
{
	int fd = openDemux();
	if (fd < 0) return -1;
	int n = DMX_SOURCE_DVR0 + pvrnum;
	int res = ::ioctl(fd, DMX_SET_SOURCE, &n);
	if (res)
		eDebug("[eDVBDemux] DMX_SET_SOURCE dvr%d failed: %m", pvrnum);
	source = -1;
	::close(fd);
	return res;
}
Esempio n. 4
0
RESULT eDVBDemux::setSourcePVR(int pvrnum)
{
#if HAVE_DVB_API_VERSION >= 3
	int fd = openDemux();
	int n = DMX_SOURCE_DVR0 + pvrnum;
	int res = ::ioctl(fd, DMX_SET_SOURCE, &n);
	source = -1;
	::close(fd);
	return res;
#endif
	return 0;
}
Esempio n. 5
0
RESULT eDVBDemux::setSourceFrontend(int fenum)
{
	int fd = openDemux();
	if (fd < 0) return -1;
	int n = DMX_SOURCE_FRONT0 + fenum;
	int res = ::ioctl(fd, DMX_SET_SOURCE, &n);
	if (res)
		eDebug("DMX_SET_SOURCE failed! - %m");
	else
		source = fenum;
	::close(fd);
	return res;
}
Esempio n. 6
0
RESULT eDVBDemux::setSourceFrontend(int fenum)
{
#if HAVE_DVB_API_VERSION >= 3
	int fd = openDemux();
	int n = DMX_SOURCE_FRONT0 + fenum;
	int res = ::ioctl(fd, DMX_SET_SOURCE, &n);
	if (res)
		eDebug("DMX_SET_SOURCE failed! - %m");
	else
		source = fenum;
	::close(fd);
	return res;
#endif
	return 0;
}
Esempio n. 7
0
RESULT eDVBDemux::setSourceFrontend(int fenum)
{
	int fd = openDemux();
	if (fd < 0) return -1;
	int n = DMX_SOURCE_FRONT0 + fenum;
	int res = ::ioctl(fd, DMX_SET_SOURCE, &n);
	if (res)
	{ // gg
		eDebug("[eDVBDemux] DMX_SET_SOURCE Frontend%d failed: %m", fenum);
		/** FIXME: gg begin dirty hack  */
		eDebug("Ignoring due to limitation to one frontend for each adapter and missing ioctl....");
		source = fenum;
		res = 0;
		/** FIXME: gg end dirty hack  */
	} // gg
	else
		source = fenum;
	::close(fd);
	return res;
}