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

Andreas Korth andreas.korth at gmx.net
Fri Oct 17 06:28:07 CEST 2003


Thank you guys for the valuable replies to my questions! It makes me
confident to use VLC since I feel there is support :) 

>>> I'd like to use VLC with my current project to playback video files
>>> (MPEG-4/DivX/Xvid) in an OpenGL context

>>> I'll need to write
>>> a generic interface plugin and an output plugin which 
>>> creates/modifies a GL texture.

> if you want to control vlc, you indeed need either a control 
> interface, or a gui interface.

> 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 ;) 

>> for this to work would require 4 instances of vlc running 
>> and working together. 

> libvlc is reentrant, this mean that you can have four 
> instances of vlc running in a single process. 

That's fine. But still, I have no clue how to actually put the pieces
together. I'm going to ask more specific questions this time. But first,
I think, it might be helpful to provide a more detailed explanation of
what I'm going to do. I'll try to keep it as brief as possible, though.

The whole application is about live mixing of multiple video streams. It
is, basically, a VJ application. Users will prepare several independent
playlists and each of those playlists is processed by a separate VLC

I use OpenGL because texture scaling and alpha blending (even YUV to RGB
conversion, if applicable) will be hardware accelerated, thus saving
precious CPU time for the decoder threads. (Audio mixing will be done by
ALSA, but this is an entirely different story, not to be discussed

Users will control the VLC instances by issuing certain commands to
control the streams (play, pause, seek) and moving sliders  to blend
them together.

My host application provides the user interface, event handling and the
OpenGL based video mixer in a separate window. A new VLC instance thread
will be spawned from within this application when the user adds a new
mixer channel. 

And now for the questions:

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

How do control, interface and GUI plugins relate? Is a control plugin
sufficient or does VLC always require an interface plugin? 

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? 

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)?

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++.

OK. That's it for today. Feel free to add your thoughts/comments beyond
the scope of these particular questions. Thanks!



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