[vlc-devel] problems linking an using mediacontrol API

Juan Manuel Lopez Baio jmbaio at gmail.com
Fri May 18 20:05:19 CEST 2007


"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:

#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);
	mediacontrol_playlist_add_item(ins,"file:///home/jm/testDir/1313.mpg",&ex);
	mediacontrol_Position pos;
	pos.origin = mediacontrol_AbsolutePosition;
	pos.key = mediacontrol_ByteCount;
	pos.value = 0;
	mediacontrol_start(ins,&pos,&ex);
	return 0;
}

Any help will be greatly appreciated. Thanks!

juan

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