vlc集成c#_C#调用VlcControl做一个播放器

本文介绍了如何在Visual Studio 2015环境下,使用.Net Framework 4.5创建一个Windows窗体应用程序,并通过NuGet包管理器安装必要的Vlc组件。详细步骤包括添加VlcControl到窗体,处理VlcLibDirectoryNeeded事件以指定VLC库路径,以及使用VlcControl的Play方法播放网络流和本地视频文件。
摘要由CSDN通过智能技术生成

开发环境:

Visual Studio 2015

.Net Framework 4.5

1.新建一个Windows窗体应用程序

修改框架为.Net Framework 4.5

2.管理NuGet包

下载安装5个包

VideoLAN.LibVLC.Windows

Vlc.DotNet.Core

Vlc.DotNet.Core.Interops

Vlc.DotNet.Forms

Vlc.DotNet.Wpf

3.添加VlcControl

工具箱添加VlcControl,dll位于当前项目中

将VlcControl添加到窗体上

在VlcControl的VlcLibDirectoryNeeded事件中添加如下代码(必须)

///

///Looks for the vlc directory on the opening of the app///Opens a dialog if the libvlc folder is not found for the user to pick the good one///Folder for 32bits should be "libvlc\win-x86\" and "libvlc\win-x64\" for 64 bits///

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值