C# VLC 1.1 包装器

发布于 2024-09-13 09:10:02 字数 93 浏览 2 评论 0原文

有人知道 C# VLC 1.1 包装器吗?我找到了一些旧版本 VLC 的包装器(尚未尝试过),但没有找到新版本的包装器。

因此,如果您知道任何内容,请发布。

Does anyone know about a C# VLC 1.1 Wrapper? I've found some wrappers for older versions of VLC (haven't tried them yet), but none for the new version.

So if you know of any, please post them.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

戈亓 2024-09-20 09:10:02

我正在使用 http://www.codeproject.com/KB/audio- video/nVLC.aspx - 它非常出色,是我为 C# 找到的最新库。

应该注意的是,虽然该库以 GPL 许可证列出,但其作者 在评论中表示它使用与 libVLC 使用的相同的许可证,从 2.0 版开始是 LGPL。

I'm using http://www.codeproject.com/KB/audio-video/nVLC.aspx - it's excellent and the most recent library I've found for C#.

It should be noted that although the library is listed with GPL license, its author said in comments that it uses the same license libVLC uses, which as of version 2.0 is LGPL.

亽野灬性zι浪 2024-09-20 09:10:02

libvlc.net 现在支持 libVLC 1.1.x。您必须从 SVN 存储库获取源代码;他们尚未正式发布此支持。

http://sourceforge.net/projects/libvlcnet/

libvlc.net now has support for libVLC 1.1.x. You'll have to grab the sources from the SVN repository; they haven't officially released this support yet.

http://sourceforge.net/projects/libvlcnet/

鹿童谣 2024-09-20 09:10:02

我也在寻找这个,我发现大多数 .NET 包装器要么已经过时,不能立即工作,要么拥有不适合专有软件的许可证。

说到这里,我开始考虑构建自己的包装器。由于大多数包装器的代码太多,并且理解和使用起来非常混乱,因此让我自己成为包装器的想法越来越强烈。据说, http://www.helyar.net /2009/libvlc-media-player-in-c-part-2/ 是开始编写自己的代码的好地方。

请注意,libvlc 和 libvlccore 已将许可证更改为 LGPL。正如 Jean-Baptiste Kempf 在 vi​​deolan 论坛的一个帖子中所说:
“您可以获取 VLC 安装 >= 2.0.0 附带的 dll(libVLC 和 libVLCcore)。”

现在要使其正常工作,您必须将 libvlc.dll 和 libvlccore.dll 放在与 exe 文件相同的目录中,因为某些代码指向本地目录...

以下操作:

要与 libvlc 中的一个函数进行互操作,请执行 一个包含您想要互操作的函数的类:

static class LibVlc
    {
        [DllImport("libvlc", CallingConvention = CallingConvention.Cdecl)]
        public static extern IntPtr libvlc_new(int argc, [MarshalAs(UnmanagedType.LPArray,
          ArraySubType = UnmanagedType.LPStr)] string[] argv);

        [DllImport("libvlc", CallingConvention = CallingConvention.Cdecl)]
        public static extern void libvlc_release(IntPtr instance);
    }

在 vlc 文档的帮助下,libvlc.html">http://www.videolan.org/developers/vlc/doc/doxygen/html/group_libvlc.html ,您可以只拥有您需要的功能,仅此而已。

CallingConvention = CallingConvention.Cdecl 是 .NET 4.0+ 所需要的。上面的两个功能本身不会做任何有趣的事情,它们只是初始化和释放 VLC 所需的资源。 。

小心文件路径(特别是链接到插件文件夹时),因为它们需要使用“/”而不是“C:/Program Files/...”中的“\”

I was looking for this too and I have found that most of the .NET wrappers out there either are outdated and don't work right away or have license that don't suit a proprietary software.

Said that, I started to think about building my own wrapper. Since most of the wrappers had too much code and are very confusing to understand and use, the idea of making myself the wrapper was growing. Said that, http://www.helyar.net/2009/libvlc-media-player-in-c-part-2/ is a nice place where to start making your own code.

Note that libvlc and libvlccore have changed license to LGPL. And as Jean-Baptiste Kempf said in one videolan forum thread:
"You may grab the dlls (libVLC and libVLCcore) that come along with VLC installation >= 2.0.0."

Now to get it working, you have to put libvlc.dll and libvlccore.dll in the same directory as your exe file as some of the code is pointing to local dir...

To interop with one function from libvlc do the following:

Create a class that will hold the functions you'd like to interop with:

static class LibVlc
    {
        [DllImport("libvlc", CallingConvention = CallingConvention.Cdecl)]
        public static extern IntPtr libvlc_new(int argc, [MarshalAs(UnmanagedType.LPArray,
          ArraySubType = UnmanagedType.LPStr)] string[] argv);

        [DllImport("libvlc", CallingConvention = CallingConvention.Cdecl)]
        public static extern void libvlc_release(IntPtr instance);
    }

With help from vlc docs, libvlc.html">http://www.videolan.org/developers/vlc/doc/doxygen/html/group_libvlc.html, you can have only the functions you need and nothing more.

The CallingConvention = CallingConvention.Cdecl is neede for .NET 4.0+. The two above functions won't do anything interesting by themselves. They are just initialising and releasing resources needed by VLC framework.

Careful with file paths (specially when linking to the plugins folder) as they need to have "/" instead of "\" as in "C:/Program Files/..."

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文