用VLC打开rtsp流,并用OPencv处理播放;
原始出处:https://forum.videolan.org/viewtopic.php?t=87031,
自己测试代码如下vlc2.2.1, opencv2.4.11
#define _SKY_VIDEO_WIDTH 800
#define _SKY_VIDEO_HEIGHT 600
#define _WINDOWN_SHOW "YS_SHOW"
typedef struct _CTX_
{
cv::Mat *image;
HANDLE mutex;
uchar* pixels;
}CTX, *PCTX;
//Vlc
libvlc_instance_t* pVlcInstance;
libvlc_media_player_t* pMediaPlayer;
libvlc_media_t* pMedia;
libvlc_event_manager_t *pEventManager;
//结构体
PCTXpContext;
static void *lock(