0

this might seem as a dumb question but it's been days now and i can't figure it out, where do i include files for libvlc to work?

I've had this example code

#include <stdio.h>
#include <stdlib.h>
#include <vlc/vlc.h>

int main(int argc, char* argv[])
 {
 libvlc_instance_t * inst;
 libvlc_media_player_t *mp;
 libvlc_media_t *m;

 /* Load the VLC engine */
 inst = libvlc_new (0, NULL);

 /* Create a new item */
 m = libvlc_media_new_location (inst, "http://mycool.movie.com/test.mov");
 //m = libvlc_media_new_path (inst, "/path/to/test.mov");

 /* Create a media player playing environement */
 mp = libvlc_media_player_new_from_media (m);

 /* No need to keep the media now */
 libvlc_media_release (m);

#if 0
 /* This is a non working code that show how to hooks into a window,
  * if we have a window around */
  libvlc_media_player_set_xwindow (mp, xid);
 /* or on windows */
  libvlc_media_player_set_hwnd (mp, hwnd);
 /* or on mac os */
   libvlc_media_player_set_nsobject (mp, view);
#endif

 /* play the media_player */
 libvlc_media_player_play (mp);

 sleep (10); /* Let it play a bit */

 /* Stop playing */
 libvlc_media_player_stop (mp);

 /* Free the media_player */
 libvlc_media_player_release (mp);

 libvlc_release (inst);

 return 0;
 }

It's bad enough i only understand half of the code for now but i can't get from the first step, which is

#include <vlc/vlc.h>

No matter where i try to place the files(i thought it was in directory like regular "foo.h" header files but it doesn't seem to work. I know that using are different that "this", <> being for standard template library... i think... and the only solution that worked so far was

#include <C:\Users\patrik\Desktop\vlc-master\include\vlc\vlc.h>

Which to no suprise it's a whole path, but then header files links a lot of other files and compiler can't find those, so it's obviously not a real solution.

Thanks in advance!

ps: if it helps, what i'm trying to is render a video on a sprite in Cocos2d-x

EDIT: What i didn't know was how to properly include the outside code, if anyone else stumbles up on this question with similar problem, this video is an example how to solve simple #includes -> https://youtu.be/HExn9oTqdVo

Brigapes
  • 13
  • 5

0 Answers0