[vlc-devel] Re: problems linking an using mediacontrol API

Pierre d'Herbemont pdherbemont at free.fr
Fri May 18 20:11:34 CEST 2007


On 18 mai 07, at 20:05, Juan Manuel Lopez Baio wrote:

> "Hello World, don't crash on me"
>
> Hello people,
>
> I just started fooling around with some libvlc code, and I'm having
> some trouble. First of all, when I try to compile a program that uses
> the mediacontrol API, it throws me undefined references to all API
> functions, eventhough I'm linking with -lvlc. If I add -shared, then
> it links, but throws a Segmentation Fault even if the program doesn't
> do anything but return 0 in main().
> What's up?
> Besides that, my idea is to try and play back an mpeg video with the
> simplest possible code. But I'm not really sure of what I'm doing.
> Does this API take care of the visualization of the video on screen,
> without any kind of visual programming on my side?
> Here's an idea of what I would like to do:

I think it should work as is. But I might be wrong, if so just  
provide a drawable to mediacontrol.

> #include <vlc/vlc.h>
> #include <vlc/libvlc.h>
> #include <vlc/mediacontrol.h>
>
> int main(int argc, char **argv)
> {
>
> 	mediacontrol_Exception ex;
>        mediacontrol_exception_init(&ex);
> 	mediacontrol_Instance* ins = mediacontrol_new(argv,&ex);

ins = mediacontrol_new( argc, argv, &ex );
But I am sure that you want to pass directly argv[0] as a libvlc arg.

I suggest you to look at the Mac OS X Framework code as an entry point:
http://git.videolan.org/cgi-bin/gitweb.cgi?p=vlc- 
soc.git;a=blob;f=extras/MacOSX/Framework/Sources/ 
VLCVideoView.m;hb=56dbdfccb979105d87f20ba60002c8b778590b40

Pierre.

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html



More information about the vlc-devel mailing list