[vlc-devel] [PATCH] playlist: swipe away the category / onelevel mess -> singular item storage
Jakob Leben
jakob.leben at gmail.com
Mon Feb 1 16:48:33 CET 2010
On Mon, Feb 1, 2010 at 3:47 PM, Jakob Leben <jakob.leben at gmail.com> wrote:
> On Mon, Feb 1, 2010 at 12:36 PM, Laurent Aimar <fenrir at via.ecp.fr> wrote:
>
>> Hi,
>>
>> On Mon, Feb 01, 2010, Jakob Leben wrote:
>> > Hi all!
>> >
>> > +void input_item_BeginAddSubItems( input_item_t *p_item )
>> > +{
>> > + vlc_event_t event;
>> > + event.type = vlc_InputItemBeginAddSubItems;
>> > + vlc_event_send( &p_item->event_manager, &event );
>> > +}
>> > +
>> > +void input_item_EndAddSubItems( input_item_t *p_item )
>> > +{
>> > + vlc_event_t event;
>> > + event.type = vlc_InputItemEndAddSubItems;
>> > + vlc_event_send( &p_item->event_manager, &event );
>> > +}
>> Why are they needed ?
>> They are a call to future bugs (way too easy to forget them
>> or to break when moving arround code).
>>
>
> Another idea was to have an event that reports for all the new children
> together, so modules should create an array and pass that in the event.
>
I have second thoughts about that other idea: an event about all the parent
nodes should be sent before their children, otherwise it doesn't make sense
to notify about children of a parent about which itself you haven't notified
yet.
But this to be possible will result in huge refactoring of some modules ( at
least for the XSPF for sure ), and that is probably gonna bring much more
bugs than the simple rules about Begin / Add / End .
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20100201/897eeae3/attachment.html>
More information about the vlc-devel
mailing list