}
else
{
- m_fp_notifier = new eSocketNotifier(eApp, m_fp_fd, eSocketNotifier::Read|POLLERR);
+ m_fp_notifier = eSocketNotifier::create(eApp, m_fp_fd, eSocketNotifier::Read|POLLERR);
CONNECT(m_fp_notifier->activated, eAVSwitch::fp_event);
}
}
{
if ( m_fp_fd >= 0 )
close(m_fp_fd);
- if (m_fp_notifier)
- delete m_fp_notifier;
}
eAVSwitch *eAVSwitch::getInstance()
write(fd, input[val], strlen(input[val]));
close(fd);
-
- if (val == 1)
- setFastBlank(2);
-}
-
-void eAVSwitch::setFastBlank(int val)
-{
- int fd;
- const char *fb[] = {"low", "high", "vcr"};
-
- if((fd = open("/proc/stb/avs/0/fb", O_WRONLY)) < 0) {
- eDebug("cannot open /proc/stb/avs/0/fb");
- return;
- }
-
- write(fd, fb[val], strlen(fb[0]));
- close(fd);
}
void eAVSwitch::setColorFormat(int format)
close(fd);
}
-void eAVSwitch::setSlowblank(int val)
-{
- int fd;
- if((fd = open("/proc/stb/avs/0/sb", O_WRONLY)) < 0) {
- eDebug("cannot open /proc/stb/avs/0/sb");
- return;
- }
- const char *sb[] = {"0", "6", "12", "vcr", "auto"};
- write(fd, sb[val], strlen(sb[val]));
-// eDebug("set slow blanking to %s", sb[val]);
- close(fd);
-}
-
//FIXME: correct "run/startlevel"
eAutoInitP0<eAVSwitch> init_avswitch(eAutoInitNumbers::rc, "AVSwitch Driver");