summaryrefslogtreecommitdiff
path: root/gstreamer-sharp/AppSink.custom
blob: df6632744273acbcb0483c76ee3f2c99c0df0139 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
  [DllImport("libgstreamer-0.10.dll") ]
  static extern IntPtr gst_element_factory_make (IntPtr element, IntPtr name);

  public AppSink (string name) : base (IntPtr.Zero) {
    IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
    IntPtr native_element = GLib.Marshaller.StringToPtrGStrdup ("appsink");
    Raw = gst_element_factory_make (native_element, native_name);
    GLib.Marshaller.Free (native_name);
    GLib.Marshaller.Free (native_element);
    if (Raw == IntPtr.Zero)
      throw new Exception ("Failed to instantiate element \"appsink\"");
  }

  public AppSink () : this ((string) null) { }