[vlc-devel] Re: Using VLC in my application

Sigmund Augdal sigmunau at stud.ntnu.no
Fri Oct 17 09:09:37 CEST 2003


> > Among others 
> > there is a corba plugin that is said to provide a clean 
> > interface for other apps to controll vlc.
> 
> Although I've used to work with CORBA in Java before, it doesn't seem
> appropriate to me in this particular case. CORBA is designed for
> application interoperability across different platforms and/or
> languages. Since I'm going to develop natively in C, there's no need to
> suffer from the overhead introduced by CORBA. (And boy, I *did* suffer
> from CORBA enough already ;) 
This is ok with me, just though I should inform about the possibility. There
is however a chance that using corba from C whould not be so painful as from
java :)

> I guess I'll have to do basically the same stuff as in vlc.c (creating
> and initializing a libvlc instance). How do I create and manage multiple
> instances?
I am not 100% sure, but I think it's just doing the same procedure over again.

> How do control, interface and GUI plugins relate? Is a control plugin
> sufficient or does VLC always require an interface plugin? 
These are really the same as far as vlc cares. They are only separated to
make live easier for the users.

> Assuming that I have to write a control plugin and a vout plugin, how do
> I "install" them. I mean, how do I initialize VLC to actually use them? 
Vlc searches for plugins in ./plugins ./modules and PREFIX(as defined by
./configure)/lib, and the path specified by --plugin-path. All files that
match a certain pattern are dlopened and if they contain the necessary
functions they are added to the plugin store. There are switches ( --intf
and --vout in this case) to tell vlc which modules to be used.

I think this whould be a good time to tell that you can pass command line
switches from your app to libvlc.
> 
> Before I go fancy with multiple instances, how do I setup a simple
> testbed for my plugins? Is it just about compiling them and telling VLC
> to use them (e.g. via command-line)?
compile vlc and your plugins. run vlc like this: vlc --plugin-path <path to
you plugins> --vout <your vout plugin> --aout <your aout plugin>
> 
> Does anything prevent me from using C++ for my host app while still
> using libvlc which is written in C? You've got to know that I have never
> written a significant C application before and I would probably fail to
> properly design one. Beeing used to OOP (read: Java) it would make my
> life a whole lot easier if I could stick with C++.
No, there should be no problem calling c functions from c++. You whould also
be suprised to see how object oriented vlc is even though written in C.

Sigmund

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



More information about the vlc-devel mailing list