基于Libvlc库的c#中可进行录制/录像功能源码
/// <summary> /// 创建VLC播放器 /// </summary> /// <param name="libvlc_instance">VLC 全局变量</param> /// <param name="handle">VLC MediaPlayer需要绑定显示的窗体句柄</param> /// <returns></returns> public static libvlc_media_player_t Create_MediaPlayer(libvlc_instance_t libvlc_instance, IntPtr handle) { libvlc_media_player_t libvlc_media_player = IntPtr.Zero; try { if (libvlc_instance == IntPtr.Zero || libvlc_instance == null || handle == IntPtr.Zero || handle == null) { return IntPtr.Zero; } //创建播放器 libvlc_media_player = SafeNativeMethods.libvlc_media_player_new(libvlc_instance); if (libvlc_media_player == null || libvlc_media_player == IntPtr.Zero) { return IntPtr.Zero; } //设置播放窗口 SafeNativeMethods.libvlc_media_player_set_hwnd(libvlc_media_player, (int)handle); return libvlc_media_player; } catch { SafeNativeMethods.libvlc_media_player_release(libvlc_media_player); return IntPtr.Zero; } }
- 1
- 2
- 3
- 4
- 心灵语2019-09-06不能用,不能用
- meidesaitaisi2018-12-04录像功能有,但是视频花屏太严重,这个库文件基本用不了
- itskills2018-04-10怎么不可录像,录像的文件大小为0
- 765873098348902022-11-10花屏太严重
- Chris_jikai2018-10-29还是不错的,能用,提供了很大帮助
- 粉丝: 6
- 资源: 4
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助