使用 LibVLC 和 Android 应用视频过滤器 [英] Applying Video Filters Using LibVLC with Android

查看:49
本文介绍了使用 LibVLC 和 Android 应用视频过滤器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 LibVLC,我成功地将 VLC 播放器添加到 Android 应用程序.但是,我不确定是否可以使用 LibVLC 将视频过滤器应用于 VLC 播放器.基于诸如this之类的问题,我怀疑它可能不会内置于任何过滤器,但我不确定.

Using LibVLC, I successfully added a VLC player to an Android app. However, I am not sure whether it is possible to apply video filters to a VLC player using LibVLC. Based on questions such as this, I suspect it might not be built-in for any filters, though I am not sure.

目前,我正在尝试在 playMRL 函数中传递视频过滤器命令,尽管我只是接收未过滤的视频.相关代码如下:

Currently, I am attempting to pass in the video filter commands in the playMRL function, though I am simply receiving an unfiltered video. Below is the relevant code:

String videoOptions[] = {"--video-filter=invert"};
this.libVLC.playMRL("http://www.sample-videos.com/video/mp4/240/big_buck_bunny_240p_1mb.mp4", videoOptions);

谢谢.

推荐答案

这可能有效,也可能无效.将命令行参数作为 MRL 选项或库实例选项传递通常有效,但绝对不能保证并且没有记录哪个选项需要在库上设置或可以设置为更灵活的 MRL 选项.这需要对 VLC 内部结构有深入的了解,并且可能随时中断.

This may or may not work. Passing command-line arguments as MRL options or library instance options usually works, but is absolutely not guaranteed and not documented which option needs to be set on the library or can be set as a more flexible MRL option. This requires an in-depth knowledge of VLC internals and may break anytime.

正确的解决方案是向 libvlc 添加过滤器 API,我们打算这样做,但最终还没有实现.这里的困难在于我们不想在 API 中单独公开每个过滤器(就像已经为调整过滤器所做的那样),而是一种列出可用过滤器及其选项的方法以及将它们称为即使使用相同的 libvlc 版本,过滤器列表也可能因操作系统而异.

The proper solution is to add a filter API to libvlc, which we intend to do but eventually didn't come around to yet. The difficulty here is that we don't want to expose every single filter individually in the API (like already done for the adjust filter), but a way of listing the available filters and their options as well as a mean to call those as the list of filters may vary from operating system to operating system even with the same libvlc version.

希望能稍微解释一下,如果您希望我指导您贡献这样的 API,请告诉我.

Hope that explains things a bit and let me know if you want me to guide you through contributing such an API.

这篇关于使用 LibVLC 和 Android 应用视频过滤器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆