I feel like I'm gonna have to look into the VLC source code very soon...
A "problem" I came across is that once you've launch the playback with libvlc_media_player_play, you have to let the first frame render before accessing the "vlc message pump" again (ie the Control_Pop and co).

It would be nice if I could provide a patch to look at the control stack *before* anything is done... however, I will have to browse some pieces of the VLC source code, and I'm kinda sick of greping and filtering the results by hand... Since Qt-Creator can be used with VLC, this is a good occasion to set it up !

  • Step 1: Launch Qt-Creator :D
  • Step 2: Create a new session (that can be seen as a sort of visual studio solution) named VLC (or whatever you wan't actually) => File -> session -> session manager -> add. The new session is set as the current one.
  • Step 3: If you haven't already, create a build subdir into your VLC directory :

$> mkdir build && cd build && ../bootstrap && ../configure and wait a few minutes :)

  • Step 4: Import the VLC project : File -> new ; Project/Import of Makefile-based Project ; Select your VLC dir as the project path, and name your newly imported project VLC
  • Step 5: close Qt-Creator
  • Step 6: Download those to files : http://people.videolan.org/~jb/QtCreator/VLC.files and http://people.videolan.org/~jb/QtCreator/VLC.includes inside your VLC dir (you should have to overwrite the ones Qt-Creator just generated
  • Step 7: Relaunch Qt-Creator
  • Step 8: Reload your last session (Should be the one you just created)
  • Step 9: Setup the build configuration : go to the big "project" button on the left, and adjust the field "Build directory" to your vlc build dir.
    Go to the "run settings" tab, and create a new run configuration by clicking the blue "+" button. Name: VLC, Excutable: /path/to/your/vlc/build/vlc

j-b advised to add "-lqt" as the only argument, everytime I try, vlc just launched and quit, so I left the "argument" field empty.

  • Step 10: enjoy the "ctrl + click" on a symbol which brings you to its definition ! w00t !!



Original post by Jean-Baptiste Kempf