在Linux上运行的Gstreamer-sharp [英] Gstreamer-sharp running on Linux
问题描述
由于我目前正在为我的项目开发gstreamer绑定并获得了信息,即gstreamer-sharp 0.99.x仅与glib-sharp 2.99.x一起使用,所以我认为创建测试项目是一个好主意.因此,我为monodevelop下载了名为"GTK#3简单项目模板"的插件,并对其进行了编译->运行正常.现在,我添加了之前编译的gstreamer-sharp 0.99 dll,并添加了以下代码:
since I'm currently working on a gstreamer binding for my project and got the information, that gstreamer-sharp 0.99.x is only working with glib-sharp 2.99.x, I thought it a good idea to create a test project. So I downloaded the addin for monodevelop named "GTK# 3 Simple Project Template" and compiled it -> worked. Now I added the gstreamer-sharp 0.99 dll I compiled before and added the following code:
Gst.Application.Init();
Element music = Parse.Launch("playbin uri=\"file:////media/Auslagerung/DJ/IDs/android.mp3\"");
music.SetState(Gst.State.Playing);
播放此代码时,出现以下异常:
I get the following exception, when I play this code:
Marshaling clicked signal
Exception in Gtk# callback delegate
Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception.
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: An exception was thrown by the type initializer for Gst.Pipeline ---> System.DllNotFoundException: libgstreamersharpglue-1.0.0.dll
at (wrapper managed-to-native) Gst.Pipeline:gstsharp_gst_pipeline_get_fixed_clock_offset ()
at Gst.Pipeline..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)
at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00002] in /builddir/build/BUILD/mono-3.4.0/mcs/class/corlib/System.Reflection/MonoMethod.cs:537
--- End of inner exception stack trace ---
at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00013] in /builddir/build/BUILD/mono-3.4.0/mcs/class/corlib/System.Reflection/MonoMethod.cs:543
at System.Reflection.MonoCMethod.DoInvoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x000a5] in /builddir/build/BUILD/mono-3.4.0/mcs/class/corlib/System.Reflection/MonoMethod.cs:528
at System.Reflection.MonoCMethod.Invoke (BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in /builddir/build/BUILD/mono-3.4.0/mcs/class/corlib/System.Reflection/MonoMethod.cs:556
at System.Activator.CreateInstance (System.Type type, BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes) [0x00174] in /builddir/build/BUILD/mono-3.4.0/mcs/class/corlib/System/Activator.cs:301
at System.Activator.CreateInstance (System.Type type, BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture) [0x00000] in /builddir/build/BUILD/mono-3.4.0/mcs/class/corlib/System/Activator.cs:238
at GLib.ObjectManager.CreateObject (IntPtr raw) [0x00000] in <filename unknown>:0
at GLib.Object.GetObject (IntPtr o, Boolean owned_ref) [0x00000] in <filename unknown>:0
at GLib.Object.GetObject (IntPtr o) [0x00000] in <filename unknown>:0
at Gst.Parse.Launch (System.String pipeline_description) [0x00000] in <filename unknown>:0
at MainWindow.onButtonClick (System.Object sender, System.EventArgs a) [0x00039] in /media/Auslagerung/tmp/Gtk3-Sharp-Test/Gtk3-Sharp-Test/MainWindow.cs:25
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00054] in /builddir/build/BUILD/mono-3.4.0/mcs/class/corlib/System.Reflection/MonoMethod.cs:230
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00069] in /builddir/build/BUILD/mono-3.4.0/mcs/class/corlib/System.Reflection/MonoMethod.cs:238
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in /builddir/build/BUILD/mono-3.4.0/mcs/class/corlib/System.Reflection/MethodBase.cs:114
at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x000cf] in /builddir/build/BUILD/mono-3.4.0/mcs/class/corlib/System/Delegate.cs:424
at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) [0x00018] in /builddir/build/BUILD/mono-3.4.0/mcs/class/corlib/System/MulticastDelegate.cs:70
at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000] in /builddir/build/BUILD/mono-3.4.0/mcs/class/corlib/System/Delegate.cs:398
at GLib.Signal.ClosureInvokedCB (System.Object o, GLib.ClosureInvokedArgs args) [0x00000] in <filename unknown>:0
at GLib.SignalClosure.Invoke (GLib.ClosureInvokedArgs args) [0x00000] in <filename unknown>:0
at GLib.SignalClosure.MarshalCallback (IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data) [0x00000] in <filename unknown>:0
at GLib.ExceptionManager.RaiseUnhandledException(System.Exception e, Boolean is_terminal)
at GLib.SignalClosure.MarshalCallback(IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data)
at Gtk.Application.gtk_main()
at Gtk.Application.Run()
at Gtk3SharpTest.MainClass.Main(System.String[] args) in /media/Auslagerung/tmp/Gtk3-Sharp-Test/Gtk3-Sharp-Test/Program.cs:line 14
Unhandled Exception:
System.TypeInitializationException: An exception was thrown by the type initializer for Gst.Pipeline ---> System.DllNotFoundException: libgstreamersharpglue-1.0.0.dll
at (wrapper managed-to-native) Gst.Pipeline:gstsharp_gst_pipeline_get_fixed_clock_offset ()
at Gst.Pipeline..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)
at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00002] in /builddir/build/BUILD/mono-3.4.0/mcs/class/corlib/System.Reflection/MonoMethod.cs:537
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: An exception was thrown by the type initializer for Gst.Pipeline ---> System.DllNotFoundException: libgstreamersharpglue-1.0.0.dll
at (wrapper managed-to-native) Gst.Pipeline:gstsharp_gst_pipeline_get_fixed_clock_offset ()
at Gst.Pipeline..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)
at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00002] in /builddir/build/BUILD/mono-3.4.0/mcs/class/corlib/System.Reflection/MonoMethod.cs:537
任何人都可以帮助我,在哪里可以找到dll?还是我在建筑中错过了什么?!
Anyone can help me, where I can find the dll? Or did I miss something in building?!
谢谢.
推荐答案
您的Output目录中没有libgstreamerglue-1.0.0.
You don't have libgstreamerglue-1.0.0 in your Output directory.
这篇关于在Linux上运行的Gstreamer-sharp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!