[PATCH] Re: [mythtv] Segmented tables with DVB EIT

Noone Important nooneimprt4nt at gmail.com
Sat Mar 19 21:35:04 UTC 2005


On Tue, 15 Feb 2005 08:25:00 -0500, Taylor Jacob wrote:
> Quoting Noone Important:
> <snip>
> > But I never see another emit for channel 881, so only the first 7
> > programs get added to the db.

Ok, well I figured out what was wrong and (at least one way) how to fix it.
As a quick reminder, the problem is that my provider sends EIT data in
several packets, but only the 1st packet ends up getting emitted.
It turns out that the problem is that my provider segments the EIT,
but doesn't set section_number or section_last (or more precisely they
both end up equal to zero).  However the key1 values for each section
(even for a given sid) are always different, and the version is
correctly identified.

So what ends up happening is that GetEmitID checks the trackers, they
are all marked 'Complete' (since section_number==section_last==0) and
the status is set to emitted.  Then another section comes in, and is
added, however since status==emitted for the current sid, it will
never be emitted again.

My fix is to (a) set status.emitted=false whenever a Tracker is
updated, and (b) delete all emitted Events from the table after they
have been emitted.

I'm pretty sure the code is wrong (especially since I don't exactly
understand how the emit works across threads, and it may be that the
clear can happen before the data is processed), but so far it works
for me, and hopefully it indicates what the problem is.  If there is a
better way to tackle this, please let me know.

One thing I am curious about is that it would seem llike this should
happen to everyone, since eventually new data will be availiable (like
tommorow), and I don't see how the status ends up getting reset when
that happens.

Sorry, I can't provide any more details about my provider, so I hope
this is good enough.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dvbeit.patch
Type: application/octet-stream
Size: 1615 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20050319/6e0b14f4/dvbeit.obj


More information about the mythtv-dev mailing list