[vlc-devel] Filters in libvlc

Lukas Durfina lukas.durfina at gmail.com
Thu Jun 19 15:36:05 CEST 2008


On Thu, 19 Jun 2008 14:52:52 +0200, jboileau <jboileau at gmail.com> wrote:

>> libvlc_video_add_adjust() => maybe we should make function:
>> libvlc_activate_video_filter(char *psz_filter)
>
> That all depends if we want to keep in line with the libvlc API
> design. Pierre d'Herbermont is the one that can guide us here. I too
> thought of passing the filter as parameter as you suggest, but when I
> looked at the libvlc API and it didn't feel in line with the design.
> And I also wondered if we wanted the user of the API to have to know
> about the string notation. I am also not in favor of an API that
> relies on string which gets evaluated at runtime. I like to see my
> errors at compile time. If you pass "adjusd" instead of "adjust" it
> will compile but it won't work. If you type libvlc_video_add_ajusd it
> simply won't compile. From my experience this is better and saves time
> debugging. This is my own preference, but is debatable.

you are right, user should be able to use it without core knowledge,
therefore I probably forgot to write it, there can be something like:
enum {ADJUST, BLEND, MAGNIFY ...} visible for user

than we can have: char* array with names and use it like this:
libvlc_video_add_filter(libvlc_media_player_t *p_mi,
                         int i_filter,
                         libvlc_exception_t *p_e )

where i_filter will be index to array

>
> As for naming I thought of many pairs of keywords: add/remove,
> create/destroy, enable/disable, activate/deactivate etc. I finally
> used add/remove because filters are added and removed. They are not
> there and then we activate them.

I agree with add/remove


>
>> I am not sure, but wouldnt it be better if we handle filters and
>> options by some internal (static) functions in libvlc?
>
> I don't understand what you mean, sorry. Could you elaborate.
>

uooh, I am not sure, what I wanted to say with that, maybe it was some
weird idea, nevermind....

To global comments:
We talk on IRC, that we can store added filters and set
values of filters options in libvlc_media_player_t, so than if vout
will be restarted or filters will be dropped by some other way,
we can applied old settings => make settings persistant

>
> I can test whatever API you can develop easily. But my environment is
> Windows. I use cygwin to compile the VLC dll's and I have a Microsoft
> C++ application that uses them. I must use GetProcAddress to get the
> functions from the DLL's because there is no way I know of to get a
> Microsoft compatible .lib for these DLLs. Long story short: my test
> app is probably too complicated for you to use. But its free and
> available if you want it. :-) Doing VLC dev under Windows is certainly
> not the best, but the one I must use. And debbugging is even harder,
> mostly only msg_Dbg is usefull. But testing myself for you might be a
> better alternative. We'll see as we go along.
>

I know I can developed something easily, but it would be easier to
use something already done. I hope, that you have some cool application
fir linux, in this case I will have to create something myself.

Lukas



More information about the vlc-devel mailing list