rcinput/neutrino: avoid the use of EVT_TIMESET

sectionsd's EVT_TIMESET was only used to fix time calculations
for input repeat detection. I doubt this reliably worked anyway.
Just calculate an absolute input timestamp from CLOCK_MONOTONIC
and use that. Even better solution would be to use a newer
kernel with EVIOCSCLOCKID ioctl, leave that for later :-)


Origin commit data
------------------
Branch: ni/coolstream
Commit: 949e42445d
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2016-01-10 (Sun, 10 Jan 2016)



------------------
This commit was generated by Migit
This commit is contained in:
Stefan Seyfried
2016-01-10 16:14:10 +01:00
parent 8d567975b3
commit 3ae5bf13ba
2 changed files with 27 additions and 6 deletions

View File

@@ -4,7 +4,7 @@
Copyright (C) 2001 Steffen Hehn 'McClean'
and some other guys
Copyright (C) 2006-2014 Stefan Seyfried
Copyright (C) 2006-2016 Stefan Seyfried
Copyright (C) 2011 CoolStream International Ltd
@@ -1879,7 +1879,11 @@ void CNeutrinoApp::InitSectiondClient()
dprintf(DEBUG_NORMAL, "had to wait %ld ms for sectionsd to start up\n", time_monotonic_ms() - t);
#endif
g_Sectionsd = new CSectionsdClient;
g_Sectionsd->registerEvent(CSectionsdClient::EVT_TIMESET, 222, NEUTRINO_UDS_NAME);
struct timespec t;
if (clock_gettime(CLOCK_MONOTONIC, &t)) {
dprintf(DEBUG_NORMAL, "CLOCK_MONOTONIC not supported? (%m), falling back to EVT_TIMESET\n");
g_Sectionsd->registerEvent(CSectionsdClient::EVT_TIMESET, 222, NEUTRINO_UDS_NAME);
}
g_Sectionsd->registerEvent(CSectionsdClient::EVT_GOT_CN_EPG, 222, NEUTRINO_UDS_NAME);
g_Sectionsd->registerEvent(CSectionsdClient::EVT_EIT_COMPLETE, 222, NEUTRINO_UDS_NAME);
g_Sectionsd->registerEvent(CSectionsdClient::EVT_WRITE_SI_FINISHED, 222, NEUTRINO_UDS_NAME);