Opened 6 years ago
Closed 5 years ago
Last modified 5 years ago
#13455 closed Bug Report - General (Fixed)
EIT/ETT broadcast data; title/description mismatch
Reported by: | Ronald L Humble | Owned by: | Klaas de Waal |
---|---|---|---|
Priority: | minor | Milestone: | 31.0 |
Component: | MythTV - EIT | Version: | v30-fixes |
Severity: | medium | Keywords: | |
Cc: | Stuart Auchterlonie | Ticket locked: | no |
Description
Ticket #11476 closed in early 2018. Title(EIT)/Description(ETT) mismatches occur for me (ATSC over-the-air broadcast/United States) with v30 (compiled and RPMFusion). The mismatches become more numerous with time.
My libmythtv.160508.v0.28.patch and its predecessors have worked for me for 5-6 years now (though it does not conform to standard) by disabling ETT caching. This patch patches v30. I know of no problems generated by use of this patch. If I thought there was a hope some piece of this patch to be merged, I would make it conform to standard.
It would appear that the use of the ATSC <EIT ETT> parameter version_number will have to be used if title/description matching and ETT caching are to coexist.
Attachments (2)
Change History (10)
Changed 6 years ago by
Attachment: | libmythtv.190506.v0.30.patch added |
---|
comment:1 Changed 6 years ago by
libmythtv.190506.v0.30.patch is the patch used to patch the RPMFusion source code (commit: 20190404git8e50fcf60b). Other than path changes to make the patch applicable to the top of the source tree, it is the same as libmythtv.160508.v0.28.patch. Perhaps it might be cherry-picked by the developers for code relevant to this problem.
comment:2 Changed 6 years ago by
Cc: | Stuart Auchterlonie added |
---|---|
Milestone: | needs_triage → 31.0 |
Owner: | changed from Karl Egly to Klaas de Waal |
Status: | new → assigned |
The patch libmythtv.190506.v0.30.patch consists of two different parts, possibly relating to two different issues.
Part 1: Adding mutex myLock in TVRec::run
TVRec::run is started once for each capturecard. The additional lock enforces that TVRec::run cannot run twice on the same capturecard. However, this should never happen and if that happens this needs further investigation. To test if it called while already running please add some error checking code to TVRec::run like this:
/// \brief Event handling method, contains event loop. void TVRec::run(void) { // KdW test ticket #13455 if (m_myLock.tryLock(0)) { m_myLock.unlock(); LOG(VB_GENERAL, LOG_INFO, LOC + "#13455 TVRec::run GOOD"); } else { LOG(VB_GENERAL, LOG_ERR, LOC + "#13455 TVRec::run ERROR called while running"); } QMutexLocker mylocker(&m_myLock); QMutexLocker lock(&m_stateChangeLock);
If errors do happen then please run mythbackend under gdb, set a breakpoint in the line with "TVRec::run ERROR" and make a backtrace with gdb when the breakpoint is hit. N.B. Code example uses the m_ prefix as is now standard in the master code.
Part 2: Caching of ETT events
The patch can be described as follows:
Accept ETT events only after the corresponding EIT event has been received.
This does make sense as it is unlikely that an ETT event, containing additional data for an EIT event, is sent before the corresponding EIT event has been sent. There is the possibility that mythbackend starts to receive just after the EIT event and just before the ETT event but that is a corner case that does not need to be coded for, given the high repetition rate of these events.
comment:3 Changed 6 years ago by
Attached is patch 20190919-atsc-eit-eit-13455-v0.patch which removes the ETT caching completely. This patch applies to the current master.
The idea is that the first ETT event that is received after the EIT event is received will be used to make the EIT event complete. This ordering means that the ETT event has always at least the same table version as the EIT event.
Note that another possible reason for the problems encountered with EIT and ETT caching is the scope of the event ID, as described in the ATSC documentation A/65:2013, page 40:
For a particular virtual channel, an event_id identifies uniquely each of the events programmed for the 3-hour interval of an EIT.
This means that the event ID for the same program can change 8 times per day.....
The original code also had, the way I read it, a memory leak in the case that an expected ETT event was not received. This should now be fixed.
Please note that this patch is not tested at all so there can be a few iterations needed to make it perfect. It would be greatly appreciated if this patch could be tested in ATSC country.
Changed 6 years ago by
Attachment: | 20190919-atsc-eit-ett-13455-v0.patch added |
---|
Remove ETT caching; process ETT event only after the corresponding EIT event has been received.
comment:5 Changed 6 years ago by
Compiled master commit 50e2f8ebaffb9 on Fedora 30 which includes the referenced commit fe0c80927f and have run on a test machine for one week. I have noticed no degradation from my patched RPMFusion (commit 5cde0578d8) packages. I am installing the commit 50e2f8ebaffb9 compile on my production machine, where much more attention will be given to Mythtv.
Perhaps I will give a one sentence update in about 30 days (or sooner if negative results).
As at least a couple of distributors of .deb or .rpm packages of Mythtv use the fixes/30 branch, I hope this patch will find its way into that branch (unless Mythtv 31 release is imminent).
Fixing a memory leak is fantastic.
Ron H.
comment:6 Changed 5 years ago by
Compiled master commit 50e2f8ebaffb9 on Fedora 30 which includes the referenced commit fe0c80927f continues to work very well for me. Thank you for your work. I hope this commit makes it to the fixes/30 branch. At this time, I expect to make no further comment on this issue.
comment:7 Changed 5 years ago by
Resolution: | → Fixed |
---|---|
Status: | assigned → closed |
This patch and the "EITCache check on table version" patch have now been backported to fixes/30 as requested. Thanks for the reporting and the testing for this ticket over the years. This ticket is now closed.
EIT/ETT Title/Description? mismatch