[vlc-devel] Re: Overloading

Stephane stephane at virtuosomedia.nl
Sat Dec 14 22:40:35 CET 2002


> -----Oorspronkelijk bericht-----
> Van: vlc-devel-bounce at videolan.org
[mailto:vlc-devel-bounce at videolan.org]Namens Stephane
> Verzonden: dinsdag 10 december 2002 11:44
> Aan: vlc-devel at videolan.org
> Onderwerp: [vlc-devel] Re: Overloading
>
>
> part 2: my suggestion:
>
> in modules.h:
> typedef struct function_list_s
> {
>     union
>     {
>     ...
>         /* Demux plugin */
>         struct
>         {
>             int  ( * pf_init ) ( struct input_thread_s * );
>             void ( * pf_end )  ( struct input_thread_s * );
>             int  ( * pf_demux )( struct input_thread_s * );
>             int  ( * pf_rewind )   ( struct input_thread_s * );
>             /* default overloadable functions */
>             void ( * pf_parse_pes ) ( struct input_thread_s * , struct
es_descriptor_s * p_es );
>             void ( * pf_gather_pes) ( struct input_thread_s * p_input,
struct data_packet_s * p_data,
>
<snip>
>
> In this way, one can easily overload some of the system functions,
withaout the necessity to rewrite all stuff. Most functions
> are useful anyway, one only needs to add some functionality on a few
places, without breaking the code for other applications/plugins.
>
> Problem with this solution is, all plugins will have to add the
appropriate macro to the <MODULE_TYPE>_getfunctions function.
> Does anyone have a solution for this?  Maybe some smart macro in
MODULE_ACTIVATE_START?
>
> And it have to be decided which functions will become 'virtual' and the
call to these functions will all have to be replaced with a
> call with a function pointer, as above example in input_ParsePES. Quite
some work:)

Is anyone interested in increasing the possibilities for overloading some of
the core functionality? If so,
which part(s) are the most interesting? I have some interest in this
functionality ( :) ) so I want to invest
some time in this, including adapting some source files if necessary. But I
understand that the development team
will not allow anyone to insert their garbage into their code-base. What is
the appropriate way to do this?

Stephane

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://www.videolan.org/lists.html
If you are in trouble, please contact <postmaster at videolan.org>



More information about the vlc-devel mailing list