Hi,

Am 14.02.2013 21:33, schrieb august:
>
> Burkhard,
>
> This looks great....you've been very very fleisig!
>
> Will this also change the old API in some way?

In gmerlin_avdecoder I have backwards compatibility functions,
which were easy enough to implement.

The gmerlin plugin API itself changes a lot. But in my opinion it's worth
it because the stuff becomes much simpler. As an example, the old audio
filter API had 4 functions like:

   void (*connect_input_port)(void * priv, bg_read_audio_func_t func,
                              void * data,
                              int stream, int port);

   void (*set_input_format)(void * priv, gavl_audio_format_t * format, int 
port);

   void (*get_output_format)(void * priv, gavl_audio_format_t * format);

   bg_read_audio_func_t read_audio;

Which is replaced in the new API by one single function:

   gavl_audio_source_t * (*connect)(void * priv, gavl_audio_source_t *,
                                    const gavl_audio_options_t * opt);

with the side effect, that you no longer need to convert the samples to
a format required by the filter as this is done implicitly.

You can easily build a chain of arbitrary modules (e.g. filters of whatever)
by doing a sequence like:

gavl_audio_source_t * src = get_primary_source();

src = connect_module_1(module1, src);
src = connect_module_2(module2, src);

if(use_module_3)
   src = connect_module_3(module3, src);

Burkhard


------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Gmerlin-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gmerlin-general

Reply via email to