mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
aa7bb8fa1c
glib-sharp will only get a new release with the new API that we need for 3.0 in a year or something. Instead of waiting a year before we can release something we now have our own internal copy of glib-sharp trunk that will be dropped once glib-sharp 3.0 is released. Everything is now compilable and working without any additional patches.
44 lines
1.5 KiB
C#
44 lines
1.5 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Runtime.InteropServices;
|
|
using Gst.GLib;
|
|
using Gst;
|
|
|
|
namespace Gst.CorePlugins {
|
|
[GTypeName ("GstFileIndex")]
|
|
public class FileIndex : Gst.Index {
|
|
public FileIndex (IntPtr raw) : base (raw) { }
|
|
|
|
[DllImport("libgstreamer-0.10.dll") ]
|
|
static extern IntPtr gst_index_factory_make (IntPtr index);
|
|
|
|
public FileIndex () : base (IntPtr.Zero) {
|
|
IntPtr native_index = Gst.GLib.Marshaller.StringToPtrGStrdup ("fileindex");
|
|
Raw = gst_index_factory_make (native_index);
|
|
Gst.GLib.Marshaller.Free (native_index);
|
|
if (Raw == IntPtr.Zero)
|
|
throw new Exception ("Failed to instantiate index \"fileindex\"");
|
|
}
|
|
|
|
public static FileIndex Make () {
|
|
return Gst.IndexFactory.Make ("fileindex") as FileIndex;
|
|
}
|
|
|
|
[Gst.GLib.Property ("location")]
|
|
public string Location {
|
|
get {
|
|
Gst.GLib.Value val = GetProperty ("location");
|
|
string ret = (string) val.Val;
|
|
val.Dispose ();
|
|
return ret;
|
|
}
|
|
set {
|
|
Gst.GLib.Value val = new Gst.GLib.Value (this, "location");
|
|
val.Val = value;
|
|
SetProperty ("location", val);
|
|
val.Dispose ();
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|