VLC SDK 开发实例

(1) 官网地址
http://download.videolan.org/pub/videolan/vlc/ 下载合适的VLC版本。
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

#include <vlc\vlc.h>
#pragma comment(lib, “libvlc.lib”)
#pragma comment(lib, “libvlccore.lib”)
#define VIDEO_PATH “E:\ss.mp4”
int main(){
libvlc_instance_t * inst;
libvlc_media_player_t *mp;
libvlc_media_t m;
inst = libvlc_new(0,NULL);//load the vlc engine
m = libvlc_media_new_path(inst,VIDEO_PATH);//create a new item; xxx_path
mp = libvlc_media_player_new_from_media(m);//create a media player playing environment
libvlc_media_release(m);//no need to keey the media now
libvlc_media_player_play(mp);//play the media_player
Sleep(1001000);//let it play a bit
libvlc_media_player_stop(mp);//stop playing
libvlc_media_player_release(mp);//free the media_player
libvlc_release(inst);
return 0;
}

发布了5 篇原创文章 · 获赞 1 · 访问量 108
展开阅读全文

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 大白 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览