#include #include "frontend.h" #include "tuner.h" #include #include #include #include Frontend::Frontend(Tuner * t, int fd, const struct dvb_frontend_info & i) : tuner(t), frontendFD(fd), fe_info(i) { } Frontend::~Frontend() { close(frontendFD); } const struct dvb_frontend_info & Frontend::Info() const { return fe_info; } fe_status Frontend::GetStatus() const { fe_status_t status; if (ioctl(frontendFD, FE_READ_STATUS, &status) < 0) { Logger()->messagebf(LOG_ERR, "Reading frontend %s status failed (%s:%d)", tuner->Device(), strerror(errno), errno); throw P2PVR::DeviceError(tuner->Device(), strerror(errno), errno); } return status; } INSTANTIATESTORE(fe_type, FrontendLoader);