plugins 运行使用,必须与执行文件在一个目录
还有核心的dll libvlc.dll 和 libvlccore.dll
VC 代码如下:
#include "vlc/vlc.h"
#pragma comment(lib, "libvlccore.lib")
#pragma comment(lib, "libvlc.lib")
libvlc_instance_t* vlc = libvlc_new(0,NULL);
libvlc_media_player_t* player = libvlc_media_player_new(vlc);
libvlc_media_player_set_hwnd(player,m_hWnd);//关联播放窗口 windows 其它平台使用对应的api
//libvlc_media_t* media = libvlc_media_new_path(vlc,"F:\\video\\sample_TongZhou.wmv");//播放本地文件
libvlc_media_t* media = libvlc_media_new_location(vlc,"rtsp://192.168.100.102:554/onvif/live/2");//播放网络流
libvlc_media_player_set_media(player,media);
libvlc_media_player_play(player);