On Wed, Oct 12, 2005 at 11:01:44AM +0100, John Pullan wrote:
> On 12/10/05, Stuart Auchterlonie <[EMAIL PROTECTED]> wrote:
> >
> > Something I noticed while looking at the memory leaks is the
> > Events map contains events for EVERY channel available, but
> > GetEmitID only ever picks events from the channels on the
> > current mplex.
> >
> > Put another way, there can be event information in the Events
> > map, but they won't be inserted because of the way GetEmitID
> > works.
> >
>
> I don't believe this is true. Empirically at least, it adds all the
> EIT data seen on the mplex (at least it did). I.e it should read the
Yes, it gets added to Events.
> 60-6F tables for other mplex's and use them as well. Note the use of
> "should" and "did".
This is where it falls down. GetEmitID only returns keys for the
current mplex. I've a quick patch which dumps numbers of the event
maps in the form keyid(Events[keyid].size()). It gets called quite
often so you only need run it for 2 minutes.
This is also how I worked out the Events were not being cleared.
This is why we do need to simplify the event handling (for 0.20)
The events are currently double buffered.
Event inserted into Events(key)
GetEmitID returns key which eventually emits a signal to
EventsReady with a QMap_Events on just that key.
That goes into the EIThelper which then copies the events
to it's own list which is then processed on the EITScanner
run queue.
I'd like to skip the middle step.
>
> > It would also be nice to clear each set of events after we
> > have inserted them in the database. At the moment we only
> > do that when siparser is deleted.
> >
> > IMHO, ideally if GetEmitID is going to say there is nothing
> > to do then there should be 0 events in the Events map.
> >
>
> Seems reasonable.
>
> WRT #344 I plan on writing a debug patch in EmitRequired to try and
> work out why it's not emitting. It's hard to see from logs what's
> happening just at the moment.
>
Index: mythtv/libs/libmythtv/sitypes.cpp
===================================================================
--- mythtv.orig/libs/libmythtv/sitypes.cpp 2005-10-09 17:34:19.000000000
+0100
+++ mythtv/libs/libmythtv/sitypes.cpp 2005-10-12 00:00:26.000000000 +0100
@@ -871,6 +871,16 @@
QMap_Events::Iterator e;
bool AllComplete;
+ printf("Event map size = %d, looking for key = %d\n", Events.size(), key0);
+ QValueList<uint16_t> eventKeys = Events.keys();
+ QValueList<uint16_t>::iterator curKey;
+ printf("Event map -> ");
+ for (curKey = eventKeys.begin(); curKey != eventKeys.end(); ++curKey)
+ {
+ printf("%d(%d) ", *curKey, Events[*curKey].size());
+ }
+ printf("\n");
+
for (s = status.begin() ; s != status.end() ; ++s)
{
if ((s.data().requestedEmit) && (s.data().emitted != true))
_______________________________________________
mythtv-dev mailing list
[email protected]
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev