Search code examples
vlclibvlc

LibVLC Display Callback modification with picture time stamp


I'm trying to make a modification to the LibVLC API to get time stamps along with video frame data. I'm starting from a branch of the code from the 2.2.4 tag (commit 888b7e89). I have been building for Windows 64-bit cross-platform, and using the VLCJ Java bindings to connect to the API from Java. I am calling LibVLC's libvlc_video_set_callbacks(...) API method with a pointer to my display callback that follows the format of LibVLC's include/vlc/libvlc_media_player.h: typedef void (*libvlc_video_display_cb)(void *opaque, void *picture);

I have modified the typedef to pass a long int time stamp as well, but I am unable to actually find the place where the callback is called from within LibVLC, so the timestamp seems to have garbage (an integer that never changes).

Is there any way to debug which specific module and source file actually calls the callback? Using debug statements hasn't gotten me anywhere. I put print statements in as many files as I could that I thought might call this method (files in the modules/video_output/ directory), and I've never seen any of them work. Apparently it's using the "vmem" module for display, but even if I put an abort() call in those methods, it makes no difference.

How can I go about finding the calling method in the source file?


Solution

  • It's called from vmem module: https://github.com/videolan/vlc/blob/master/modules/video_output/vmem.c#L282