mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 00:31:13 +00:00
Add bindings for memindex and fileindex
This commit is contained in:
parent
4f329b23a5
commit
b8d3082a96
3 changed files with 76 additions and 2 deletions
|
@ -7,10 +7,12 @@ METADATA_FILES = typefind.metadata \
|
|||
fakesrc.metadata \
|
||||
fakesink.metadata \
|
||||
identity.metadata
|
||||
CS_FILES = $(patsubst %,%.cs,$(ELEMENTS))
|
||||
CS_FILES = $(patsubst %,%.cs,$(ELEMENTS)) \
|
||||
memindex.cs \
|
||||
fileindex.cs
|
||||
XML_FILES = $(patsubst %,%.xml,$(ELEMENTS))
|
||||
|
||||
EXTRA_DIST = $(CUSTOM_FILES) $(INSPECT_FILES)
|
||||
EXTRA_DIST = $(CUSTOM_FILES) $(INSPECT_FILES) memindex.cs fileindex.cs
|
||||
CLEANFILES = $(XML_FILES) $(CS_FILES)
|
||||
|
||||
plugins-update: $(patsubst inspect/%.raw, inspect-%, $(INSPECT_FILES))
|
||||
|
|
44
gstreamer-sharp/coreplugins/fileindex.cs
Normal file
44
gstreamer-sharp/coreplugins/fileindex.cs
Normal file
|
@ -0,0 +1,44 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
using 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 = GLib.Marshaller.StringToPtrGStrdup ("fileindex");
|
||||
Raw = gst_index_factory_make (native_index);
|
||||
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;
|
||||
}
|
||||
|
||||
[GLib.Property ("location")]
|
||||
public string Location {
|
||||
get {
|
||||
GLib.Value val = GetProperty ("location");
|
||||
string ret = (string) val.Val;
|
||||
val.Dispose ();
|
||||
return ret;
|
||||
}
|
||||
set {
|
||||
GLib.Value val = new GLib.Value (this, "location");
|
||||
val.Val = value;
|
||||
SetProperty ("location", val);
|
||||
val.Dispose ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
28
gstreamer-sharp/coreplugins/memindex.cs
Normal file
28
gstreamer-sharp/coreplugins/memindex.cs
Normal file
|
@ -0,0 +1,28 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
using GLib;
|
||||
using Gst;
|
||||
|
||||
namespace Gst.CorePlugins {
|
||||
[GTypeName ("GstMemIndex")]
|
||||
public class MemIndex : Gst.Index {
|
||||
public MemIndex (IntPtr raw) : base (raw) { }
|
||||
|
||||
[DllImport("libgstreamer-0.10.dll") ]
|
||||
static extern IntPtr gst_index_factory_make (IntPtr index);
|
||||
|
||||
public MemIndex () : base (IntPtr.Zero) {
|
||||
IntPtr native_index = GLib.Marshaller.StringToPtrGStrdup ("memindex");
|
||||
Raw = gst_index_factory_make (native_index);
|
||||
GLib.Marshaller.Free (native_index);
|
||||
if (Raw == IntPtr.Zero)
|
||||
throw new Exception ("Failed to instantiate index \"memindex\"");
|
||||
}
|
||||
|
||||
public static MemIndex Make () {
|
||||
return Gst.IndexFactory.Make ("memindex") as MemIndex;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue