简体   繁体   English

是否有一个c ++库在跨平台应用程序中包含Flash视频?

[英]Is there a c++ library to include flash videos in a cross-platform application?

I'm developing a c++ applicaton using Qt, and we're looking to include swf files. 我正在使用Qt开发c ++应用程序,并且我们希望包括swf文件。 Is there a way I can include swfs in my application? 有什么方法可以在应用程序中包含swfs? I'm open to different solutions for windows, mac, and linux, but a single cross-platform solution would be best. 我对Windows,Mac和Linux的解决方案持开放态度,但是最好使用单个跨平台解决方案。

Thanks! 谢谢!

You can use WebKit (in sufficiently recent versions of Qt; it's included for sure in 4.4 and 4.5) and embed the flash animations via that. 您可以使用WebKit(在足够新的Qt版本中;肯定包含在4.4和4.5中),并通过它嵌入Flash动画。 This depends on having a flash plugin installed and accessible to WebKit, but it should be workable on Mac, Windows, and Linux (with either gnash/swfdec or Adobe's plugin). 这取决于是否安装了Flash插件,并且WebKit可以访问它,但是它应该可以在Mac,Windows和Linux(使用gnash / swfdec或Adobe的插件)上工作。

Your best bet is to try to run the plugin version of Flash Player in your application. 最好的选择是尝试在应用程序中运行Flash Player的插件版本。 Projects like Screenweaver have implemented their own Netscape plugin API wrappers to do this. 诸如Screenweaver之类的项目已经实现了自己的Netscape插件API包装器来实现此目的。

You can also look at NSPluginWrapper project, they have a standalone plugin player implemented, which you possibly might be able to adapt into your own project. 您还可以查看NSPluginWrapper项目,它们实现了一个独立的插件播放器,您可能可以将其适配到自己的项目中。

It's not free, but Scaleform GFx provides a cross-platform Flash player. 它不是免费的,但是Scaleform GFx提供了一个跨平台的Flash播放器。 It can work with multiple different kinds of renderers, including but not limited to DirectX and OpenGL. 它可以与多种不同类型的渲染器一起使用,包括但不限于DirectX和OpenGL。

You could use swfdec or gnash , however I don't know how portable they will be. 您可以使用swfdecgnash ,但是我不知道它们的便携性。 It might be worth checking out the VLC source as well. 也可能值得检查VLC源 To ensure cross-platform however I would suggest going with a more standard, even better open, video format. 为了确保跨平台,我建议使用更标准,甚至更好的开放视频格式。 An example of using gnash with GTK is below: 下面是将gnash与GTK一起使用的示例:

http://blog.tomeuvizoso.net/2009/04/embed-flash-movies-with-gnash-in-your.html http://blog.tomeuvizoso.net/2009/04/embed-flash-movies-with-gnash-in-your.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM