Re: Performance optimization in notification framework



On Fri, 2011-03-18 at 10:16 +0000, Iago Toral wrote:
> > Of course, another option could be changing the callback signature
> to
> > send a list of changed medias instead of just one media.
> 
>  Actually, I think this would only add flexibility to the current 
>  solution we have, as far as we only signal the changes one I am ok
> with 
>  the solution, and having the chance to signal detailed information
> of 
>  the changes (a list of actual medias/containers that changed) can
> only 
>  be good imho, so I think we should do this.
> 

Thanks.

The current signature of signal callback is

(GrlMediaSource *source,
 GrlMedia *media,
 GrlMediaSourceChangeType type,
 gboolean location_unknown)


The proposed solution will have this signature:

(GrlMediaSource *source,
 GList *medias,
 GrlMediaSourceChangeType type,
 gboolean location_unknown)


Only the second parameter is changed, being now a list of changed
medias. "type" and "location_unknown" will remain as it is. This means
that both parameters are applied to all medias in the list.

If a source wants that only part of the changed medias be affected by
type or location_unknown, then it must split the list and emit different
signals with the right values.

This will keep the API as simple as possible.

	J.A.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]