VLC 使用哪个函数来打开视频文件?
我已经下载了一个视频文件并记录了数据包到达时间。我想使用VLC根据我录制的时间播放视频。我应该在 VLC 源代码中调用哪个函数以及如何执行此操作?
我的意思是,当我们按下按钮打开视频文件时,VLC 通常使用哪些功能来播放视频?因为它的源码树中有太多的文件和函数。
非常感谢。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您只需链接到 libVLC 并调用其中的函数即可。
http://wiki.videolan.org/LibVLC_SampleCode_Thumbnailer 给出了使用此技术的小型 C 程序的示例打开一部电影,寻找电影中的某个时间,抓取一帧的 JPG,并将其保存到磁盘。只需几行代码。
我不了解 Windows,但在 Mac 上,标头和共享库位于:
VLC 应用程序包位于:VLC.app/Contents/MacOS/include/vlc/vlc.h(以及该目录中的其他 .h 文件),库位于 VLC.app/Contents/MacOS/lib/libvlc。 dylib
请注意,该库是 GPLv2,而不是 LGPL。我的理解是,如果链接到该库,则需要将程序发布为 GPL。
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.