which function does VLC use to open a video file?

2019-08-08 16:07发布

i`ve downloaded a video file and recorded the packet arrival time. and i want to use VLC to play the video according to the time i record. which function and how should i call to do it in the VLC source code?

i mean usually which functions VLC use to play video when we press the button to open a video file? because there are so many files and functions in its source tree.

thank you very much.

1条回答
混吃等死
2楼-- · 2019-08-08 16:20

You can just link to libVLC and call functions in it. http://wiki.videolan.org/LibVLC_SampleCode_Thumbnailer gives an example of a small C program that uses this technique to open a movie, seek to a time within the movie, grab a JPG of one frame, and save it to disk. It is only a few lines of code.

I don't know about Windows, but on Mac, the header and shared library are at: in the VLC application package at: VLC.app/Contents/MacOS/include/vlc/vlc.h (and the other .h files in that directory) and the library is at VLC.app/Contents/MacOS/lib/libvlc.dylib

Note that the library is GPLv2, not LGPL. My understand is that if you link to the library, you are required to release your program as GPL.

查看更多
登录 后发表回答