在 Ubuntu 14.04 上在 Mono 中使用 GStreamer
Using GStreamer in Mono on Ubuntu 14.04
我想在游戏中使用 GStreamer 制作音效和音乐。
从此 PPA 安装了 GStreamer:
https://launchpad.net/~ddalex/+archive/ubuntu/gstreamer
并且还尝试以这种方式安装 GStreamer,但从 PPA 安装后似乎无法正常工作:https://askubuntu.com/questions/279509/how-can-i-install-gstreamer-1-0-in-ubuntu-12-04
然而,据我所知,两次 GStreamer 安装正确,但它不会出现在 MonoDevelop 的引用下。
莫非是我理解错了如何在MonoDevelop中使用GStreamer?
编辑:我已经下载了 GStreamer sharp:
https://gstreamer.freedesktop.org/modules/gstreamer-sharp.html
但是我不明白怎么用,有什么帮助吗?
编辑:澄清一下,我的操作系统是 Ubuntu 14.04
编辑:我认为问题已解决。
使用 apt-cache 搜索 'gstreamer' 我找到并安装了库 libgstreamer0.10-cil-dev,现在 GStreamer 出现在 MonoDevelop 中!
然而,虽然 GStreamer 现在出现在参考资料中,但当我尝试编译一个用 C# 完成但基于官方 GStreamer SDK 教程的测试程序时。
测试程序:
Gst.Element pipeline;
Gst.Application.Init ();
pipeline = Gst.Parse.Launch("playbin2 uri=http://docs.gstreamer.com/media/sintel_trailer-480p.webm");
pipeline.SetState(Gst.State.Playing);
我收到此错误:An exception was thrown by the type initializer for Gst.GLib.GType
,在详细信息下,问题似乎是缺少库:System.TypeInitializationException: An exception was thrown by the type initializer for Gst.GLib.GType ---> System.Exception: libgstreamersharpglue-0.10.so
感谢 otopolsky 帮助我们走到这一步!提前感谢您提供的任何进一步帮助。
更新:问题貌似已经解决了,解决方法请看下面的答案。
我解决了问题!
使用 apt-cache search 'gstreamer'
我找到并安装了库 libgstreamer0.10-cil-dev
,现在 GStreamer 出现在 MonoDevelop 中!
感谢 otopolsky 的帮助。
编辑:看到上面的问题,我以为问题已经解决了,但又出现了另一个问题。
更新:问题已解决!结果是库 libgstreamersharpglue
不在 ldconfig 已知的目录中。最终我找到了这个解释如何让 ldconfig 使用这个目录的答案:
这个网站解释了如何将库添加到 ldconfig 缓存也很有帮助:https://codeyarns.com/2014/01/14/how-to-add-library-directory-to-ldconfig-cache/
我想在游戏中使用 GStreamer 制作音效和音乐。
从此 PPA 安装了 GStreamer: https://launchpad.net/~ddalex/+archive/ubuntu/gstreamer
并且还尝试以这种方式安装 GStreamer,但从 PPA 安装后似乎无法正常工作:https://askubuntu.com/questions/279509/how-can-i-install-gstreamer-1-0-in-ubuntu-12-04
然而,据我所知,两次 GStreamer 安装正确,但它不会出现在 MonoDevelop 的引用下。
莫非是我理解错了如何在MonoDevelop中使用GStreamer?
编辑:我已经下载了 GStreamer sharp: https://gstreamer.freedesktop.org/modules/gstreamer-sharp.html
但是我不明白怎么用,有什么帮助吗?
编辑:澄清一下,我的操作系统是 Ubuntu 14.04
编辑:我认为问题已解决。
使用 apt-cache 搜索 'gstreamer' 我找到并安装了库 libgstreamer0.10-cil-dev,现在 GStreamer 出现在 MonoDevelop 中!
然而,虽然 GStreamer 现在出现在参考资料中,但当我尝试编译一个用 C# 完成但基于官方 GStreamer SDK 教程的测试程序时。
测试程序:
Gst.Element pipeline;
Gst.Application.Init ();
pipeline = Gst.Parse.Launch("playbin2 uri=http://docs.gstreamer.com/media/sintel_trailer-480p.webm");
pipeline.SetState(Gst.State.Playing);
我收到此错误:An exception was thrown by the type initializer for Gst.GLib.GType
,在详细信息下,问题似乎是缺少库:System.TypeInitializationException: An exception was thrown by the type initializer for Gst.GLib.GType ---> System.Exception: libgstreamersharpglue-0.10.so
感谢 otopolsky 帮助我们走到这一步!提前感谢您提供的任何进一步帮助。
更新:问题貌似已经解决了,解决方法请看下面的答案。
我解决了问题!
使用 apt-cache search 'gstreamer'
我找到并安装了库 libgstreamer0.10-cil-dev
,现在 GStreamer 出现在 MonoDevelop 中!
感谢 otopolsky 的帮助。
编辑:看到上面的问题,我以为问题已经解决了,但又出现了另一个问题。
更新:问题已解决!结果是库 libgstreamersharpglue
不在 ldconfig 已知的目录中。最终我找到了这个解释如何让 ldconfig 使用这个目录的答案:
这个网站解释了如何将库添加到 ldconfig 缓存也很有帮助:https://codeyarns.com/2014/01/14/how-to-add-library-directory-to-ldconfig-cache/