C# 在Linux上运行的Gstreamer sharp

C# 在Linux上运行的Gstreamer sharp,c#,mono,gstreamer,gtk#,C#,Mono,Gstreamer,Gtk#,由于我目前正在为我的项目开发一个gstreamer绑定,并且得到了信息,gstreamer sharp 0.99.x只与glib sharp 2.99.x一起工作,所以我认为创建一个测试项目是一个好主意。因此,我下载了名为“GTK#3简单项目模板”的monodevelop插件,并对其进行了编译。现在,我添加了之前编译的gstreamer sharp 0.99 dll,并添加了以下代码: Gst.Application.Init(); Element music = Parse.Launch("p

由于我目前正在为我的项目开发一个gstreamer绑定,并且得到了信息,gstreamer sharp 0.99.x只与glib sharp 2.99.x一起工作,所以我认为创建一个测试项目是一个好主意。因此,我下载了名为“GTK#3简单项目模板”的monodevelop插件,并对其进行了编译。现在,我添加了之前编译的gstreamer sharp 0.99 dll,并添加了以下代码:

Gst.Application.Init();
Element music = Parse.Launch("playbin uri=\"file:////media/Auslagerung/DJ/IDs/android.mp3\"");
music.SetState(Gst.State.Playing);
当我播放此代码时,会出现以下异常:

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 
封送单击的信号
Gtk回调委托中出现异常
注意:应用程序可以使用GLib.ExceptionManager.UnhandledException来处理异常。
System.Reflection.TargetInvocationException:调用的目标已引发异常。-->System.Reflection.TargetInvocationException:调用的目标已引发异常。-->System.TypeInitializationException:Gst.Pipeline-->System.DllNotFoundException:libgstreamersharpglue-1.0.0.dll的类型初始值设定项引发了异常
at(包装器管理为本机)Gst.Pipeline:gstsharp\u Gst\u Pipeline\u get\u fixed\u clock\u offset()
位于Gst.Pipeline..cctor()[0x00000]中:0
---内部异常堆栈跟踪的结束---
at(包装器管理为本机)System.Reflection.MonoCMethod:InternalInvoke(System.Reflection.MonoCMethod,object,object[],System.Exception&)
在/builddir/build/build/mono-3.4.0/mcs/class/corlib/System.Reflection/MonoMethod.cs:537中的System.Reflection.MonoCMethod.InternalInvoke(System.Object obj,System.Object[]参数)[0x00002]
---内部异常堆栈跟踪的结束---
在/builddir/build/build/mono-3.4.0/mcs/class/corlib/System.Reflection/MonoMethod.cs:543中的System.Reflection.MonoCMethod.InternalInvoke(System.Object obj,System.Object[]参数)[0x00013]处
在/builddir/build/build/mono-3.4.0/mcs/class/corlib/System.Reflection/MonoMethod.cs:528中的System.Reflection.MonoCMethod.DoInvoke(System.Object obj、BindingFlags invokeAttr、System.Reflection.Binder、System.Object[]参数、System.Globalization.CultureInfo-culture)处
在/builddir/build/build/mono-3.4.0/mcs/class/corlib/System.Reflection/MonoMethod.cs:556中的System.Reflection.MonoCMethod.Invoke(BindingFlags invokeAttr、System.Reflection.Binder、System.Object[]参数、System.Globalization.CultureInfo-culture)处
在/builddir/build/build/mono-3.4.0/mcs/class/corlib/System/Activator.cs:301中的System.Activator.CreateInstance(System.Type类型,BindingFlags bindingAttr,System.Reflection.Binder Binder,System.Object[]args,System.Globalization.CultureInfo culture,System.Object[]ActivationAttribute)[0x00174]处
在/builddir/build/build/mono-3.4.0/mcs/class/corlib/System/Activator.cs:238中的System.Activator.CreateInstance(System.Type类型,BindingFlags bindingAttr,System.Reflection.Binder Binder,System.Object[]args,System.Globalization.CultureInfo culture)[0x00000]处
在GLib.ObjectManager.CreateObject(IntPtr raw)[0x00000]中:0
在GLib.Object.GetObject(IntPtr o,Boolean-owned\u-ref)[0x00000]中:0
在GLib.Object.GetObject(IntPtr o)[0x00000]中:0
在:0中的Gst.Parse.Launch(System.String管道描述)[0x00000]处
在MainWindow.on按钮中,单击/media/Auslagerung/tmp/Gtk3夏普测试/Gtk3夏普测试/MainWindow.cs:25中的(System.Object sender,System.EventArgs a)[0x00039]
at(包装器管理为本机)System.Reflection.monmethod:InternalInvoke(System.Reflection.monmethod,object,object[],System.Exception&)
在/builddir/build/build/mono-3.4.0/mcs/class/corlib/System.Reflection/MonoMethod.cs:230中的System.Reflection.MonoMethod.Invoke(System.Object obj、BindingFlags invokeAttr、System.Reflection.Binder Binder、System.Object[]参数、System.Globalization.CultureInfo-culture)[0x00054]处
---内部异常堆栈跟踪的结束---
在/builddir/build/build/mono-3.4.0/mcs/class/corlib/System.Reflection/MonoMethod.cs:238中的System.Reflection.MonoMethod.Invoke(System.Object obj、BindingFlags invokeAttr、System.Reflection.Binder Binder、System.Object[]参数、System.Globalization.CultureInfo-culture)处
在/builddir/build/build/mono-3.4.0/mcs/class/corlib/System.Reflection/MethodBase.cs:114中的System.Reflection.MethodBase.Invoke(System.Object obj,System.Object[]参数)[0x00000]处
在/builddir/build/build/mono-3.4.0/mcs/class/corlib/System/Delegate.cs:424中的System.Delegate.DynamicInvokeImpl(System.Object[]args)[0x000cf]处
在/builddir/build/build/mono-3.4.0/mcs/class/corlib/System/MulticastDelegate.cs:70中的System.MulticastDelegate.DynamicInvokeImpl(System.Object[]args)[0x00018]处
在/builddir/build/build/mono-3.4.0/mcs/class/corlib/System/Delegate.cs:398中的System.Delegate.DynamicInvoke(System.Object[]args)[0x00000]处
在GLib.Signal.ClosureInvokedCB(System.Object o,GLib.ClosureInvokedArgs args)[0x00000]中:0
在0中的GLib.SignalClosure.Invoke(GLib.ClosureInvokedArgs args)[0x00000]处
在GLib.SignalClosure.marshallcallback(IntPtr raw_closure、IntPtr return_val、UInt32 n_参数值、IntPtr参数值、IntPtr调用提示、IntPtr封送数据)[0x00000]in:0
在GLib.ExceptionManager.RaiseUnhandledException(System.Exception e,布尔值是_终端)
在GLib.SignalClosure.MarshallCallback(IntPtr原始闭包、IntPtr返回值、UInt32 n参数值、IntPtr参数值、IntPtr调用提示、IntPtr封送数据)
在Gtk.Application.Gtk_main()上
在Gtk.Application.Run()处
在/media/Auslagerung/tmp/Gtk3 Sharp-Test/Gtk3 Sharp-Test/Program.cs中的gtk3sharp-Test.MainClass.Main(System.String[]args)处:第14行
未处理的异常:
System.TypeInitializationException:Gst.Pipeline-->System.DllNotFoundException:libgstreamersharpglue-1.0.0.dll的类型初始值设定项引发了异常
at(包装器管理为本机)Gst.Pipeline:gstsharp\u Gst\u Pipeline\u get\u fixed\u clock\u offset()
位于Gst.Pipeline..cctor()[0x00000]中:0
---内部异常堆栈跟踪的结束---
at(wr)