2009-06-12 13:21:28 +00:00
|
|
|
[DllImport ("libgstreamer-0.10.dll") ]
|
|
|
|
static extern IntPtr gst_element_factory_make (IntPtr element, IntPtr name);
|
|
|
|
|
|
|
|
public AppSrc (string name) : base (IntPtr.Zero) {
|
2009-08-05 14:57:20 +00:00
|
|
|
IntPtr native_name = Gst.GLib.Marshaller.StringToPtrGStrdup (name);
|
|
|
|
IntPtr native_element = Gst.GLib.Marshaller.StringToPtrGStrdup ("appsrc");
|
2009-06-12 13:21:28 +00:00
|
|
|
Raw = gst_element_factory_make (native_element, native_name);
|
2009-08-05 14:57:20 +00:00
|
|
|
Gst.GLib.Marshaller.Free (native_name);
|
|
|
|
Gst.GLib.Marshaller.Free (native_element);
|
2009-06-12 13:21:28 +00:00
|
|
|
if (Raw == IntPtr.Zero)
|
|
|
|
throw new Exception ("Failed to instantiate element \"appsrc\"");
|
|
|
|
}
|
|
|
|
|
|
|
|
public AppSrc () : this ( (string) null) { }
|