mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 15:08:53 +00:00
Extend the code generator to handle GstMiniObject and implement Gst.MiniObject
Also fix indention everywhere and change code to use Gst.MiniObject.GetObject() instead of GLib.Opaque.GetOpaque(). It's currently not possible to implement or use GInterfaces on mini objects but apart from that this should be a great improvement, especially new mini object classes can be defined in C# now.
This commit is contained in:
parent
4582abb4f3
commit
cf9fd6ec9a
21 changed files with 1216 additions and 431 deletions
1
TODO
1
TODO
|
@ -1,5 +1,4 @@
|
||||||
- Interfaces currently contain things that should only be called by implementors
|
- Interfaces currently contain things that should only be called by implementors
|
||||||
- GstMiniObject binding is broken, we need our own codegen and handle it like a GObject without toggle refs, signals and properties
|
|
||||||
- Check vmethods and write them by hand if there are parameters that should be hidden (Gst.Index!)
|
- Check vmethods and write them by hand if there are parameters that should be hidden (Gst.Index!)
|
||||||
- Check ownership of callback parameters and vmethods
|
- Check ownership of callback parameters and vmethods
|
||||||
- Make sure callbacks are only GC'd when they can be (TagMergeFunc, TypeFind, ..)
|
- Make sure callbacks are only GC'd when they can be (TagMergeFunc, TypeFind, ..)
|
||||||
|
|
|
@ -35,6 +35,7 @@ sources = \
|
||||||
MethodBase.cs \
|
MethodBase.cs \
|
||||||
MethodBody.cs \
|
MethodBody.cs \
|
||||||
Method.cs \
|
Method.cs \
|
||||||
|
MiniObjectGen.cs \
|
||||||
ObjectField.cs \
|
ObjectField.cs \
|
||||||
ObjectBase.cs \
|
ObjectBase.cs \
|
||||||
ObjectGen.cs \
|
ObjectGen.cs \
|
||||||
|
|
321
generator/MiniObjectGen.cs
Normal file
321
generator/MiniObjectGen.cs
Normal file
|
@ -0,0 +1,321 @@
|
||||||
|
// GtkSharp.Generation.MiniObjectGen.cs - The Mini Object Generatable.
|
||||||
|
//
|
||||||
|
// Author: Mike Kestner <mkestner@ximian.com>
|
||||||
|
//
|
||||||
|
// Copyright (c) 2001-2003 Mike Kestner
|
||||||
|
// Copyright (c) 2003-2004 Novell, Inc.
|
||||||
|
// Copyright (c) 2009 Sebastian Dröge <sebastian.droege@collabora.co.uk>.
|
||||||
|
//
|
||||||
|
// This program is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of version 2 of the GNU General Public
|
||||||
|
// License as published by the Free Software Foundation.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public
|
||||||
|
// License along with this program; if not, write to the
|
||||||
|
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
// Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
|
||||||
|
namespace GtkSharp.Generation {
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.IO;
|
||||||
|
using System.Text;
|
||||||
|
using System.Xml;
|
||||||
|
|
||||||
|
public class MiniObjectGen : ObjectBase {
|
||||||
|
|
||||||
|
private ArrayList custom_attrs = new ArrayList();
|
||||||
|
private ArrayList strings = new ArrayList();
|
||||||
|
private static Hashtable dirs = new Hashtable ();
|
||||||
|
|
||||||
|
public MiniObjectGen (XmlElement ns, XmlElement elem) : base (ns, elem, false)
|
||||||
|
{
|
||||||
|
foreach (XmlNode node in elem.ChildNodes) {
|
||||||
|
if (!(node is XmlElement)) continue;
|
||||||
|
XmlElement member = (XmlElement) node;
|
||||||
|
if (member.HasAttribute ("hidden") && member.GetAttribute ("hidden") == "1") continue;
|
||||||
|
|
||||||
|
switch (node.Name) {
|
||||||
|
case "custom-attribute":
|
||||||
|
custom_attrs.Add (member.InnerXml);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "static-string":
|
||||||
|
strings.Add (node);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
if (!IsNodeNameHandled (node.Name))
|
||||||
|
Console.WriteLine ("Unexpected node " + node.Name + " in " + CName);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool Validate ()
|
||||||
|
{
|
||||||
|
ArrayList invalids = new ArrayList ();
|
||||||
|
|
||||||
|
return base.Validate ();
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool DisableVoidCtor {
|
||||||
|
get {
|
||||||
|
return Elem.HasAttribute ("disable_void_ctor");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool DisableGTypeCtor {
|
||||||
|
get {
|
||||||
|
return Elem.HasAttribute ("disable_gtype_ctor");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private class DirectoryInfo {
|
||||||
|
public string assembly_name;
|
||||||
|
public Hashtable objects;
|
||||||
|
|
||||||
|
public DirectoryInfo (string assembly_name) {
|
||||||
|
this.assembly_name = assembly_name;
|
||||||
|
objects = new Hashtable ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static DirectoryInfo GetDirectoryInfo (string dir, string assembly_name)
|
||||||
|
{
|
||||||
|
DirectoryInfo result;
|
||||||
|
|
||||||
|
if (dirs.ContainsKey (dir)) {
|
||||||
|
result = dirs [dir] as DirectoryInfo;
|
||||||
|
if (result.assembly_name != assembly_name) {
|
||||||
|
Console.WriteLine ("Can't put multiple assemblies in one directory.");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
result = new DirectoryInfo (assembly_name);
|
||||||
|
dirs.Add (dir, result);
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Generate (GenerationInfo gen_info)
|
||||||
|
{
|
||||||
|
gen_info.CurrentType = Name;
|
||||||
|
|
||||||
|
string asm_name = gen_info.AssemblyName.Length == 0 ? NS.ToLower () + "-sharp" : gen_info.AssemblyName;
|
||||||
|
DirectoryInfo di = GetDirectoryInfo (gen_info.Dir, asm_name);
|
||||||
|
|
||||||
|
StreamWriter sw = gen_info.Writer = gen_info.OpenStream (Name);
|
||||||
|
|
||||||
|
sw.WriteLine ("namespace " + NS + " {");
|
||||||
|
sw.WriteLine ();
|
||||||
|
sw.WriteLine ("\tusing System;");
|
||||||
|
sw.WriteLine ("\tusing System.Collections;");
|
||||||
|
sw.WriteLine ("\tusing System.Runtime.InteropServices;");
|
||||||
|
sw.WriteLine ();
|
||||||
|
|
||||||
|
SymbolTable table = SymbolTable.Table;
|
||||||
|
|
||||||
|
sw.WriteLine ("#region Autogenerated code");
|
||||||
|
if (IsDeprecated)
|
||||||
|
sw.WriteLine ("\t[Obsolete]");
|
||||||
|
foreach (string attr in custom_attrs)
|
||||||
|
sw.WriteLine ("\t" + attr);
|
||||||
|
sw.Write ("\t{0} {1}class " + Name, IsInternal ? "internal" : "public", IsAbstract ? "abstract " : "");
|
||||||
|
string cs_parent = table.GetCSType(Elem.GetAttribute("parent"));
|
||||||
|
if (cs_parent != "") {
|
||||||
|
di.objects.Add (CName, QualifiedName);
|
||||||
|
sw.Write (" : " + cs_parent);
|
||||||
|
}
|
||||||
|
foreach (string iface in managed_interfaces) {
|
||||||
|
if (Parent != null && Parent.Implements (iface))
|
||||||
|
continue;
|
||||||
|
sw.Write (", " + iface);
|
||||||
|
}
|
||||||
|
sw.WriteLine (" {");
|
||||||
|
sw.WriteLine ();
|
||||||
|
|
||||||
|
GenCtors (gen_info);
|
||||||
|
GenFields (gen_info);
|
||||||
|
|
||||||
|
GenClassMembers (gen_info, cs_parent);
|
||||||
|
GenMethods (gen_info, null, null);
|
||||||
|
|
||||||
|
foreach (XmlElement str in strings) {
|
||||||
|
sw.Write ("\t\tpublic static string " + str.GetAttribute ("name"));
|
||||||
|
sw.WriteLine (" {\n\t\t\t get { return \"" + str.GetAttribute ("value") + "\"; }\n\t\t}");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cs_parent != String.Empty && GetExpected (CName) != QualifiedName) {
|
||||||
|
sw.WriteLine ();
|
||||||
|
sw.WriteLine ("\t\tstatic " + Name + " ()");
|
||||||
|
sw.WriteLine ("\t\t{");
|
||||||
|
sw.WriteLine ("\t\t\tGtkSharp." + Studlify (asm_name) + ".ObjectManager.Initialize ();");
|
||||||
|
sw.WriteLine ("\t\t}");
|
||||||
|
}
|
||||||
|
|
||||||
|
sw.WriteLine ("#endregion");
|
||||||
|
AppendCustom (sw, gen_info.CustomDir);
|
||||||
|
|
||||||
|
sw.WriteLine ("\t}");
|
||||||
|
sw.WriteLine ("}");
|
||||||
|
|
||||||
|
sw.Close ();
|
||||||
|
gen_info.Writer = null;
|
||||||
|
Statistics.ObjectCount++;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void GenCtors (GenerationInfo gen_info)
|
||||||
|
{
|
||||||
|
if (!Elem.HasAttribute("parent"))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (!DisableGTypeCtor) {
|
||||||
|
gen_info.Writer.WriteLine("\t\t[Obsolete]");
|
||||||
|
gen_info.Writer.WriteLine("\t\tprotected " + Name + "(GLib.GType gtype) : base(gtype) {}");
|
||||||
|
}
|
||||||
|
gen_info.Writer.WriteLine("\t\tpublic " + Name + "(IntPtr raw) : base(raw) {}");
|
||||||
|
if (ctors.Count == 0 && !DisableVoidCtor) {
|
||||||
|
gen_info.Writer.WriteLine();
|
||||||
|
gen_info.Writer.WriteLine("\t\tprotected " + Name + "() : base(IntPtr.Zero)");
|
||||||
|
gen_info.Writer.WriteLine("\t\t{");
|
||||||
|
gen_info.Writer.WriteLine("\t\t\tCreateNativeObject ();");
|
||||||
|
gen_info.Writer.WriteLine("\t\t}");
|
||||||
|
}
|
||||||
|
gen_info.Writer.WriteLine();
|
||||||
|
|
||||||
|
base.GenCtors (gen_info);
|
||||||
|
}
|
||||||
|
|
||||||
|
void GenClassMembers (GenerationInfo gen_info, string cs_parent)
|
||||||
|
{
|
||||||
|
GenVirtualMethods (gen_info, null);
|
||||||
|
|
||||||
|
if (class_struct_name == null || !CanGenerateClassStruct) return;
|
||||||
|
StreamWriter sw = gen_info.Writer;
|
||||||
|
GenerateClassStruct (gen_info);
|
||||||
|
if (cs_parent == "")
|
||||||
|
sw.WriteLine ("\t\tstatic uint class_offset = 0;");
|
||||||
|
else
|
||||||
|
sw.WriteLine ("\t\tstatic uint class_offset = ((GLib.GType) typeof ({0})).ClassSize;", cs_parent);
|
||||||
|
sw.WriteLine ("\t\tstatic Hashtable class_structs;");
|
||||||
|
sw.WriteLine ();
|
||||||
|
sw.WriteLine ("\t\tstatic {0} GetClassStruct (GLib.GType gtype, bool use_cache)", class_struct_name);
|
||||||
|
sw.WriteLine ("\t\t{");
|
||||||
|
sw.WriteLine ("\t\t\tif (class_structs == null)");
|
||||||
|
sw.WriteLine ("\t\t\t\tclass_structs = new Hashtable ();");
|
||||||
|
sw.WriteLine ();
|
||||||
|
sw.WriteLine ("\t\t\tif (use_cache && class_structs.Contains (gtype))");
|
||||||
|
sw.WriteLine ("\t\t\t\treturn ({0}) class_structs [gtype];", class_struct_name);
|
||||||
|
sw.WriteLine ("\t\t\telse {");
|
||||||
|
sw.WriteLine ("\t\t\t\tIntPtr class_ptr = new IntPtr (gtype.ClassPtr.ToInt64 () + class_offset);");
|
||||||
|
sw.WriteLine ("\t\t\t\t{0} class_struct = ({0}) Marshal.PtrToStructure (class_ptr, typeof ({0}));", class_struct_name);
|
||||||
|
sw.WriteLine ("\t\t\t\tif (use_cache)");
|
||||||
|
sw.WriteLine ("\t\t\t\t\tclass_structs.Add (gtype, class_struct);");
|
||||||
|
sw.WriteLine ("\t\t\t\treturn class_struct;");
|
||||||
|
sw.WriteLine ("\t\t\t}");
|
||||||
|
sw.WriteLine ("\t\t}");
|
||||||
|
sw.WriteLine ();
|
||||||
|
sw.WriteLine ("\t\tstatic void OverrideClassStruct (GLib.GType gtype, {0} class_struct)", class_struct_name);
|
||||||
|
sw.WriteLine ("\t\t{");
|
||||||
|
sw.WriteLine ("\t\t\tIntPtr class_ptr = new IntPtr (gtype.ClassPtr.ToInt64 () + class_offset);");
|
||||||
|
sw.WriteLine ("\t\t\tMarshal.StructureToPtr (class_struct, class_ptr, false);");
|
||||||
|
sw.WriteLine ("\t\t}");
|
||||||
|
sw.WriteLine ();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Keep this in sync with the one in glib/GType.cs */
|
||||||
|
private static string GetExpected (string cname)
|
||||||
|
{
|
||||||
|
for (int i = 1; i < cname.Length; i++) {
|
||||||
|
if (Char.IsUpper (cname[i])) {
|
||||||
|
if (i == 1 && cname[0] == 'G')
|
||||||
|
return "GLib." + cname.Substring (1);
|
||||||
|
else
|
||||||
|
return cname.Substring (0, i) + "." + cname.Substring (i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new ArgumentException ("cname doesn't follow the NamespaceType capitalization style: " + cname);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static bool NeedsMap (Hashtable objs, string assembly_name)
|
||||||
|
{
|
||||||
|
foreach (string key in objs.Keys)
|
||||||
|
if (GetExpected (key) != ((string) objs[key]))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string Studlify (string name)
|
||||||
|
{
|
||||||
|
string result = "";
|
||||||
|
|
||||||
|
string[] subs = name.Split ('-');
|
||||||
|
foreach (string sub in subs)
|
||||||
|
result += Char.ToUpper (sub[0]) + sub.Substring (1);
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void GenerateMappers ()
|
||||||
|
{
|
||||||
|
foreach (string dir in dirs.Keys) {
|
||||||
|
|
||||||
|
DirectoryInfo di = dirs[dir] as DirectoryInfo;
|
||||||
|
|
||||||
|
if (!NeedsMap (di.objects, di.assembly_name))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
GenerationInfo gen_info = new GenerationInfo (dir, di.assembly_name);
|
||||||
|
|
||||||
|
GenerateMapper (di, gen_info);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void GenerateMapper (DirectoryInfo dir_info, GenerationInfo gen_info)
|
||||||
|
{
|
||||||
|
StreamWriter sw = gen_info.OpenStream ("ObjectManager");
|
||||||
|
|
||||||
|
sw.WriteLine ("namespace GtkSharp." + Studlify (dir_info.assembly_name) + " {");
|
||||||
|
sw.WriteLine ();
|
||||||
|
sw.WriteLine ("\tpublic class ObjectManager {");
|
||||||
|
sw.WriteLine ();
|
||||||
|
sw.WriteLine ("\t\tstatic bool initialized = false;");
|
||||||
|
sw.WriteLine ("\t\t// Call this method from the appropriate module init function.");
|
||||||
|
sw.WriteLine ("\t\tpublic static void Initialize ()");
|
||||||
|
sw.WriteLine ("\t\t{");
|
||||||
|
sw.WriteLine ("\t\t\tif (initialized)");
|
||||||
|
sw.WriteLine ("\t\t\t\treturn;");
|
||||||
|
sw.WriteLine ("");
|
||||||
|
sw.WriteLine ("\t\t\tinitialized = true;");
|
||||||
|
|
||||||
|
foreach (string key in dir_info.objects.Keys) {
|
||||||
|
if (GetExpected(key) != ((string) dir_info.objects[key]))
|
||||||
|
sw.WriteLine ("\t\t\tGLib.GType.Register ({0}.GType, typeof ({0}));", dir_info.objects [key]);
|
||||||
|
}
|
||||||
|
|
||||||
|
sw.WriteLine ("\t\t}");
|
||||||
|
sw.WriteLine ("\t}");
|
||||||
|
sw.WriteLine ("}");
|
||||||
|
sw.Close ();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string FromNative (string var, bool owned)
|
||||||
|
{
|
||||||
|
return "Gst.MiniObject.GetObject(" + var + (owned ? ", true" : "") + ") as " + QualifiedName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -138,6 +138,9 @@ namespace GtkSharp.Generation {
|
||||||
case "object":
|
case "object":
|
||||||
result.Add (new ObjectGen (ns, elem));
|
result.Add (new ObjectGen (ns, elem));
|
||||||
break;
|
break;
|
||||||
|
case "mini-object":
|
||||||
|
result.Add (new MiniObjectGen (ns, elem));
|
||||||
|
break;
|
||||||
case "class":
|
case "class":
|
||||||
result.Add (new ClassGen (ns, elem));
|
result.Add (new ClassGen (ns, elem));
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -116,6 +116,7 @@ namespace GtkSharp.Generation {
|
||||||
// manually wrapped types requiring more complex marshaling
|
// manually wrapped types requiring more complex marshaling
|
||||||
AddType (new ManualGen ("GInitiallyUnowned", "GLib.InitiallyUnowned", "GLib.Object.GetObject ({0})"));
|
AddType (new ManualGen ("GInitiallyUnowned", "GLib.InitiallyUnowned", "GLib.Object.GetObject ({0})"));
|
||||||
AddType (new ManualGen ("GObject", "GLib.Object", "GLib.Object.GetObject ({0})"));
|
AddType (new ManualGen ("GObject", "GLib.Object", "GLib.Object.GetObject ({0})"));
|
||||||
|
AddType (new ManualGen ("GstMiniObject", "Gst.MiniObject", "Gst.MiniObject.GetObject ({0})"));
|
||||||
AddType (new ManualGen ("GList", "GLib.List"));
|
AddType (new ManualGen ("GList", "GLib.List"));
|
||||||
AddType (new ManualGen ("GPtrArray", "GLib.PtrArray"));
|
AddType (new ManualGen ("GPtrArray", "GLib.PtrArray"));
|
||||||
AddType (new ManualGen ("GSList", "GLib.SList"));
|
AddType (new ManualGen ("GSList", "GLib.SList"));
|
||||||
|
@ -338,7 +339,8 @@ namespace GtkSharp.Generation {
|
||||||
|
|
||||||
public bool IsObject(string c_type)
|
public bool IsObject(string c_type)
|
||||||
{
|
{
|
||||||
if (this[c_type] is ObjectGen)
|
if ((this[c_type] is ObjectGen) ||
|
||||||
|
(this[c_type] is MiniObjectGen))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -71,17 +71,18 @@ public byte this [uint index] {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[DllImport ("gstreamer-0.10.dll") ]
|
||||||
|
static extern void gst_mini_object_unref (IntPtr raw);
|
||||||
|
|
||||||
/* FIXME: This is not optimal */
|
/* FIXME: This is not optimal */
|
||||||
public void MakeMetadataWritable() {
|
public void MakeMetadataWritable() {
|
||||||
if (IsMetadataWritable)
|
if (IsMetadataWritable)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
IntPtr sub = gst_buffer_create_sub (Raw, 0, Size);
|
IntPtr old = Handle;
|
||||||
|
IntPtr sub = gst_buffer_create_sub (Handle, 0, Size);
|
||||||
Raw = sub;
|
Raw = sub;
|
||||||
/* ^--- Takes a second ref, not good */
|
gst_mini_object_unref (old);
|
||||||
Unref (Raw);
|
|
||||||
/* ^--- Sets Owned = false, wrong! */
|
|
||||||
Owned = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[DllImport ("gstreamer-0.10.dll") ]
|
[DllImport ("gstreamer-0.10.dll") ]
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
protected Event () : base () { }
|
|
||||||
|
|
||||||
public Event (GLib.Value val) : base (val) { }
|
public Event (GLib.Value val) : base (val) { }
|
||||||
|
|
||||||
[DllImport ("gstreamersharpglue-0.10") ]
|
[DllImport ("gstreamersharpglue-0.10") ]
|
||||||
|
@ -143,7 +141,7 @@ public static uint GetTypeNumber (Gst.EventType type) {
|
||||||
static extern IntPtr gst_event_new_custom (Gst.EventType type, IntPtr structure);
|
static extern IntPtr gst_event_new_custom (Gst.EventType type, IntPtr structure);
|
||||||
|
|
||||||
public static Gst.Event NewCustom (Gst.EventType type, Gst.Structure structure) {
|
public static Gst.Event NewCustom (Gst.EventType type, Gst.Structure structure) {
|
||||||
Gst.Event ev = (Gst.Event) GLib.Opaque.GetOpaque (gst_event_new_custom (type, (structure != null) ? structure.Handle : IntPtr.Zero), typeof (Gst.Event), true);
|
Gst.Event ev = (Gst.Event) Gst.MiniObject.GetObject (gst_event_new_custom (type, (structure != null) ? structure.Handle : IntPtr.Zero), true);
|
||||||
ev.cached_structure = structure;
|
ev.cached_structure = structure;
|
||||||
structure.FreeNative = false;
|
structure.FreeNative = false;
|
||||||
|
|
||||||
|
@ -154,7 +152,7 @@ public static Gst.Event NewCustom (Gst.EventType type, Gst.Structure structure)
|
||||||
static extern IntPtr gst_event_new_flush_start ();
|
static extern IntPtr gst_event_new_flush_start ();
|
||||||
|
|
||||||
public static Gst.Event NewFlushStart () {
|
public static Gst.Event NewFlushStart () {
|
||||||
Gst.Event ev = (Gst.Event) GLib.Opaque.GetOpaque (gst_event_new_flush_start (), typeof (Gst.Event), true);
|
Gst.Event ev = (Gst.Event) Gst.MiniObject.GetObject (gst_event_new_flush_start (), true);
|
||||||
|
|
||||||
return ev;
|
return ev;
|
||||||
}
|
}
|
||||||
|
@ -163,7 +161,7 @@ public static Gst.Event NewFlushStart () {
|
||||||
static extern IntPtr gst_event_new_flush_stop ();
|
static extern IntPtr gst_event_new_flush_stop ();
|
||||||
|
|
||||||
public static Gst.Event NewFlushStop () {
|
public static Gst.Event NewFlushStop () {
|
||||||
Gst.Event ev = (Gst.Event) GLib.Opaque.GetOpaque (gst_event_new_flush_stop (), typeof (Gst.Event), true);
|
Gst.Event ev = (Gst.Event) Gst.MiniObject.GetObject (gst_event_new_flush_stop (), true);
|
||||||
|
|
||||||
return ev;
|
return ev;
|
||||||
}
|
}
|
||||||
|
@ -172,7 +170,7 @@ public static Gst.Event NewFlushStop () {
|
||||||
static extern IntPtr gst_event_new_eos ();
|
static extern IntPtr gst_event_new_eos ();
|
||||||
|
|
||||||
public static Gst.Event NewEos () {
|
public static Gst.Event NewEos () {
|
||||||
Gst.Event ev = (Gst.Event) GLib.Opaque.GetOpaque (gst_event_new_eos (), typeof (Gst.Event), true);
|
Gst.Event ev = (Gst.Event) Gst.MiniObject.GetObject (gst_event_new_eos (), true);
|
||||||
|
|
||||||
return ev;
|
return ev;
|
||||||
}
|
}
|
||||||
|
@ -181,7 +179,7 @@ public static Gst.Event NewEos () {
|
||||||
static extern IntPtr gst_event_new_new_segment_full (bool update, double rate, double applied_rate, Gst.Format format, long start, long stop, long position);
|
static extern IntPtr gst_event_new_new_segment_full (bool update, double rate, double applied_rate, Gst.Format format, long start, long stop, long position);
|
||||||
|
|
||||||
public static Gst.Event NewNewSegment (bool update, double rate, double applied_rate, Gst.Format format, long start, long stop, long position) {
|
public static Gst.Event NewNewSegment (bool update, double rate, double applied_rate, Gst.Format format, long start, long stop, long position) {
|
||||||
Gst.Event ev = (Gst.Event) GLib.Opaque.GetOpaque (gst_event_new_new_segment_full (update, rate, applied_rate, format, start, stop, position), typeof (Gst.Event), true);
|
Gst.Event ev = (Gst.Event) Gst.MiniObject.GetObject (gst_event_new_new_segment_full (update, rate, applied_rate, format, start, stop, position), true);
|
||||||
|
|
||||||
return ev;
|
return ev;
|
||||||
}
|
}
|
||||||
|
@ -213,7 +211,7 @@ static extern IntPtr gst_event_new_tag (IntPtr tags);
|
||||||
static extern IntPtr gst_tag_list_copy (IntPtr raw);
|
static extern IntPtr gst_tag_list_copy (IntPtr raw);
|
||||||
|
|
||||||
public static Gst.Event NewTag (Gst.TagList tags) {
|
public static Gst.Event NewTag (Gst.TagList tags) {
|
||||||
Gst.Event ev = (Gst.Event) GLib.Opaque.GetOpaque (gst_event_new_tag ( (tags != null) ? gst_tag_list_copy (tags.Handle) : IntPtr.Zero), typeof (Gst.Event), true);
|
Gst.Event ev = (Gst.Event) Gst.MiniObject.GetObject (gst_event_new_tag ( (tags != null) ? gst_tag_list_copy (tags.Handle) : IntPtr.Zero), true);
|
||||||
|
|
||||||
return ev;
|
return ev;
|
||||||
}
|
}
|
||||||
|
@ -239,7 +237,7 @@ public void ParseTag (out TagList tags) {
|
||||||
static extern IntPtr gst_event_new_buffer_size (Gst.Format format, long min, long max, bool async);
|
static extern IntPtr gst_event_new_buffer_size (Gst.Format format, long min, long max, bool async);
|
||||||
|
|
||||||
public static Gst.Event NewBufferSize (Gst.Format format, long min, long max, bool async) {
|
public static Gst.Event NewBufferSize (Gst.Format format, long min, long max, bool async) {
|
||||||
Gst.Event ev = (Gst.Event) GLib.Opaque.GetOpaque (gst_event_new_buffer_size (format, min, max, async), typeof (Gst.Event), true);
|
Gst.Event ev = (Gst.Event) Gst.MiniObject.GetObject (gst_event_new_buffer_size (format, min, max, async), true);
|
||||||
|
|
||||||
return ev;
|
return ev;
|
||||||
}
|
}
|
||||||
|
@ -258,7 +256,7 @@ public void ParseBufferSize (out Gst.Format format, out long min, out long max,
|
||||||
static extern IntPtr gst_event_new_qos (double proportion, long diff, ulong timestamp);
|
static extern IntPtr gst_event_new_qos (double proportion, long diff, ulong timestamp);
|
||||||
|
|
||||||
public static Gst.Event NewQos (double proportion, long diff, ulong timestamp) {
|
public static Gst.Event NewQos (double proportion, long diff, ulong timestamp) {
|
||||||
Gst.Event ev = (Gst.Event) GLib.Opaque.GetOpaque (gst_event_new_qos (proportion, diff, timestamp), typeof (Gst.Event), true);
|
Gst.Event ev = (Gst.Event) Gst.MiniObject.GetObject (gst_event_new_qos (proportion, diff, timestamp), true);
|
||||||
|
|
||||||
return ev;
|
return ev;
|
||||||
}
|
}
|
||||||
|
@ -278,7 +276,7 @@ public void ParseQos (out double proportion, out long diff, out ulong timestamp)
|
||||||
static extern IntPtr gst_event_new_seek (double rate, Gst.Format format, Gst.SeekFlags flags, Gst.SeekType start_type, long start, Gst.SeekType stop_type, long stop);
|
static extern IntPtr gst_event_new_seek (double rate, Gst.Format format, Gst.SeekFlags flags, Gst.SeekType start_type, long start, Gst.SeekType stop_type, long stop);
|
||||||
|
|
||||||
public static Gst.Event NewSeek (double rate, Gst.Format format, Gst.SeekFlags flags, Gst.SeekType start_type, long start, Gst.SeekType stop_type, long stop) {
|
public static Gst.Event NewSeek (double rate, Gst.Format format, Gst.SeekFlags flags, Gst.SeekType start_type, long start, Gst.SeekType stop_type, long stop) {
|
||||||
Gst.Event ev = (Gst.Event) GLib.Opaque.GetOpaque (gst_event_new_seek (rate, format, flags, start_type, start, stop_type, stop), typeof (Gst.Event), true);
|
Gst.Event ev = (Gst.Event) Gst.MiniObject.GetObject (gst_event_new_seek (rate, format, flags, start_type, start, stop_type, stop), true);
|
||||||
|
|
||||||
return ev;
|
return ev;
|
||||||
}
|
}
|
||||||
|
@ -297,7 +295,7 @@ public void ParseSeek (out double rate, out Gst.Format format, out Gst.SeekFlags
|
||||||
static extern IntPtr gst_event_new_navigation (IntPtr structure);
|
static extern IntPtr gst_event_new_navigation (IntPtr structure);
|
||||||
|
|
||||||
public static Gst.Event NewNavigation (Gst.Structure structure) {
|
public static Gst.Event NewNavigation (Gst.Structure structure) {
|
||||||
Gst.Event ev = (Gst.Event) GLib.Opaque.GetOpaque (gst_event_new_navigation (structure.Handle), typeof (Gst.Event), true);
|
Gst.Event ev = (Gst.Event) Gst.MiniObject.GetObject (gst_event_new_navigation (structure.Handle), true);
|
||||||
ev.cached_structure = structure;
|
ev.cached_structure = structure;
|
||||||
structure.FreeNative = false;
|
structure.FreeNative = false;
|
||||||
|
|
||||||
|
@ -308,7 +306,7 @@ public static Gst.Event NewNavigation (Gst.Structure structure) {
|
||||||
static extern IntPtr gst_event_new_latency (ulong latency);
|
static extern IntPtr gst_event_new_latency (ulong latency);
|
||||||
|
|
||||||
public static Gst.Event NewLatency (ulong latency) {
|
public static Gst.Event NewLatency (ulong latency) {
|
||||||
Gst.Event ev = (Gst.Event) GLib.Opaque.GetOpaque (gst_event_new_latency (latency), typeof (Gst.Event), true);
|
Gst.Event ev = (Gst.Event) Gst.MiniObject.GetObject (gst_event_new_latency (latency), true);
|
||||||
|
|
||||||
return ev;
|
return ev;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<metadata>
|
<metadata>
|
||||||
<attr path="/api/namespace/object" name="disable_gtype_ctor">1</attr>
|
<attr path="/api/namespace/object" name="disable_gtype_ctor">1</attr>
|
||||||
|
<attr path="/api/namespace/mini-object" name="disable_gtype_ctor">1</attr>
|
||||||
|
|
||||||
<attr path="/api/namespace/enum/member[@name='NumErrors']" name="hidden">1</attr>
|
<attr path="/api/namespace/enum/member[@name='NumErrors']" name="hidden">1</attr>
|
||||||
|
|
||||||
|
@ -45,28 +46,27 @@
|
||||||
|
|
||||||
<attr path="/api/namespace/enum[@name='BinFlags']/member[@cname='GST_BIN_FLAG_LAST']" name="value">ElementFlags.Last << 5</attr>
|
<attr path="/api/namespace/enum[@name='BinFlags']/member[@cname='GST_BIN_FLAG_LAST']" name="value">ElementFlags.Last << 5</attr>
|
||||||
|
|
||||||
<change-node-type path="/api/namespace/object[@name='Buffer']">boxed</change-node-type>
|
<change-node-type path="/api/namespace/object[@name='Buffer']">mini-object</change-node-type>
|
||||||
<attr path="/api/namespace/boxed[@name='Buffer']" name="opaque">true</attr>
|
<attr path="/api/namespace/mini-object[@name='Buffer']/method[@cname='gst_buffer_get_type']" name="new_flag">1</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='Buffer']/method[@cname='gst_buffer_get_type']" name="new_flag">1</attr>
|
<attr path="/api/namespace/mini-object[@name='Buffer']/method[@cname='gst_buffer_get_caps']/return-type" name="owned">true</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='Buffer']/method[@cname='gst_buffer_get_caps']/return-type" name="owned">true</attr>
|
<attr path="/api/namespace/mini-object[@name='Buffer']/field[@name='Data']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='Buffer']/field[@name='Data']" name="hidden">1</attr>
|
<attr path="/api/namespace/mini-object[@name='Buffer']/field[@name='Duration']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='Buffer']/field[@name='Duration']" name="hidden">1</attr>
|
<attr path="/api/namespace/mini-object[@name='Buffer']/field[@name='MallocData']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='Buffer']/field[@name='MallocData']" name="hidden">1</attr>
|
<attr path="/api/namespace/mini-object[@name='Buffer']/field[@name='Offset']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='Buffer']/field[@name='Offset']" name="hidden">1</attr>
|
<attr path="/api/namespace/mini-object[@name='Buffer']/field[@name='OffsetEnd']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='Buffer']/field[@name='OffsetEnd']" name="hidden">1</attr>
|
<attr path="/api/namespace/mini-object[@name='Buffer']/field[@name='Timestamp']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='Buffer']/field[@name='Timestamp']" name="hidden">1</attr>
|
<attr path="/api/namespace/mini-object[@name='Buffer']/field[@name='Caps']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='Buffer']/field[@name='Caps']" name="hidden">1</attr>
|
<attr path="/api/namespace/mini-object[@name='Buffer']/field[@name='FreeFunc']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='Buffer']/field[@name='FreeFunc']" name="hidden">1</attr>
|
<attr path="/api/namespace/mini-object[@name='Buffer']/method[@cname='gst_buffer_get_caps']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='Buffer']/method[@cname='gst_buffer_get_caps']" name="hidden">1</attr>
|
<attr path="/api/namespace/mini-object[@name='Buffer']/method[@cname='gst_buffer_set_caps']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='Buffer']/method[@cname='gst_buffer_set_caps']" name="hidden">1</attr>
|
<attr path="/api/namespace/mini-object[@name='Buffer']/method[@cname='gst_buffer_stamp']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='Buffer']/method[@cname='gst_buffer_stamp']" name="hidden">1</attr>
|
<attr path="/api/namespace/mini-object[@name='Buffer']/method[@cname='gst_buffer_join']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='Buffer']/method[@cname='gst_buffer_join']" name="hidden">1</attr>
|
<attr path="/api/namespace/mini-object[@name='Buffer']/method[@cname='gst_buffer_make_metadata_writable']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='Buffer']/method[@cname='gst_buffer_make_metadata_writable']" name="hidden">1</attr>
|
<attr path="/api/namespace/mini-object[@name='Buffer']/constructor[@cname='gst_buffer_new_and_alloc']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='Buffer']/constructor[@cname='gst_buffer_new_and_alloc']" name="hidden">1</attr>
|
<attr path="/api/namespace/mini-object[@name='Buffer']/method[@cname='gst_buffer_try_new_and_alloc']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='Buffer']/method[@cname='gst_buffer_try_new_and_alloc']" name="hidden">1</attr>
|
<attr path="/api/namespace/mini-object[@name='Buffer']/method[@cname='gst_buffer_create_sub']/return-type" name="owned">true</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='Buffer']/method[@cname='gst_buffer_create_sub']/return-type" name="owned">true</attr>
|
<attr path="/api/namespace/mini-object[@name='Buffer']/method[@cname='gst_buffer_merge']/return-type" name="owned">true</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='Buffer']/method[@cname='gst_buffer_merge']/return-type" name="owned">true</attr>
|
<attr path="/api/namespace/mini-object[@name='Buffer']/method[@cname='gst_buffer_span']/return-type" name="owned">true</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='Buffer']/method[@cname='gst_buffer_span']/return-type" name="owned">true</attr>
|
|
||||||
|
|
||||||
<attr path="/api/namespace/enum[@name='BufferFlag']" name="name">BufferFlags</attr>
|
<attr path="/api/namespace/enum[@name='BufferFlag']" name="name">BufferFlags</attr>
|
||||||
<attr path="/api/namespace/enum[@name='BufferFlags']/member[@cname='GST_BUFFER_FLAG_READONLY']" name="value">MiniObjectFlags.Readonly</attr>
|
<attr path="/api/namespace/enum[@name='BufferFlags']/member[@cname='GST_BUFFER_FLAG_READONLY']" name="value">MiniObjectFlags.Readonly</attr>
|
||||||
|
@ -316,18 +316,17 @@
|
||||||
<attr path="/api/namespace/enum[@name='ElementFlags']/member[@cname='GST_ELEMENT_UNPARENTING']" name="value">ObjectFlags.Last << 2</attr>
|
<attr path="/api/namespace/enum[@name='ElementFlags']/member[@cname='GST_ELEMENT_UNPARENTING']" name="value">ObjectFlags.Last << 2</attr>
|
||||||
<attr path="/api/namespace/enum[@name='ElementFlags']/member[@cname='GST_ELEMENT_FLAG_LAST']" name="value">ObjectFlags.Last << 16</attr>
|
<attr path="/api/namespace/enum[@name='ElementFlags']/member[@cname='GST_ELEMENT_FLAG_LAST']" name="value">ObjectFlags.Last << 16</attr>
|
||||||
|
|
||||||
<change-node-type path="/api/namespace/object[@name='Event']">boxed</change-node-type>
|
<change-node-type path="/api/namespace/object[@name='Event']">mini-object</change-node-type>
|
||||||
<attr path="/api/namespace/boxed[@name='Event']" name="opaque">true</attr>
|
<attr path="/api/namespace/mini-object[@name='Event']/method[@cname='gst_event_get_type']" name="new_flag">1</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='Event']/method[@cname='gst_event_get_type']" name="new_flag">1</attr>
|
<attr path="/api/namespace/mini-object[@name='Event']/field[@name='Timestamp']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='Event']/field[@name='Timestamp']" name="hidden">1</attr>
|
<attr path="/api/namespace/mini-object[@name='Event']/field[@name='Src']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='Event']/field[@name='Src']" name="hidden">1</attr>
|
<attr path="/api/namespace/mini-object[@name='Event']/field[@name='Structure']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='Event']/field[@name='Structure']" name="hidden">1</attr>
|
<attr path="/api/namespace/mini-object[@name='Event']/field[@name='Seqnum']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='Event']/field[@name='Seqnum']" name="hidden">1</attr>
|
<attr path="/api/namespace/mini-object[@name='Event']/constructor" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='Event']/constructor" name="hidden">1</attr>
|
<attr path="/api/namespace/mini-object[@name='Event']/method" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='Event']/method" name="hidden">1</attr>
|
<remove-attr path="/api/namespace/mini-object[@name='Event']/method[@cname='gst_event_get_type']" name="hidden" />
|
||||||
<remove-attr path="/api/namespace/boxed[@name='Event']/method[@cname='gst_event_get_type']" name="hidden" />
|
<remove-attr path="/api/namespace/mini-object[@name='Event']/method[@cname='gst_event_type_get_name']" name="hidden" />
|
||||||
<remove-attr path="/api/namespace/boxed[@name='Event']/method[@cname='gst_event_type_get_name']" name="hidden" />
|
<attr path="/api/namespace/mini-object[@name='Event']/method[@cname='gst_event_type_get_name']" name="name">GetTypeName</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='Event']/method[@cname='gst_event_type_get_name']" name="name">GetTypeName</attr>
|
|
||||||
|
|
||||||
<remove-node path="/api/namespace/enum[@name='EventType']/member[@name='0_']" />
|
<remove-node path="/api/namespace/enum[@name='EventType']/member[@name='0_']" />
|
||||||
<remove-node path="/api/namespace/enum[@name='EventType']/member[@name='Flag']" />
|
<remove-node path="/api/namespace/enum[@name='EventType']/member[@name='Flag']" />
|
||||||
|
@ -466,30 +465,22 @@
|
||||||
|
|
||||||
<remove-node path="/api/namespace/class[@name='Init']" />
|
<remove-node path="/api/namespace/class[@name='Init']" />
|
||||||
|
|
||||||
<change-node-type path="/api/namespace/object[@name='Message']">boxed</change-node-type>
|
<change-node-type path="/api/namespace/object[@name='Message']">mini-object</change-node-type>
|
||||||
<attr path="/api/namespace/boxed[@name='Message']" name="opaque">true</attr>
|
<attr path="/api/namespace/mini-object[@name='Message']/method[@cname='gst_message_get_type']" name="new_flag">1</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='Message']/method[@cname='gst_message_get_type']" name="new_flag">1</attr>
|
<attr path="/api/namespace/mini-object[@name='Message']/field[@name='Timestamp']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='Message']/field[@name='Timestamp']" name="hidden">1</attr>
|
<attr path="/api/namespace/mini-object[@name='Message']/field[@name='Src']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='Message']/field[@name='Src']" name="hidden">1</attr>
|
<attr path="/api/namespace/mini-object[@name='Message']/field[@name='Structure']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='Message']/field[@name='Structure']" name="hidden">1</attr>
|
<attr path="/api/namespace/mini-object[@name='Message']/method[@cname='gst_message_type_to_quark']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='Message']/method[@cname='gst_message_type_to_quark']" name="hidden">1</attr>
|
<attr path="/api/namespace/mini-object[@name='Message']/method[@cname='gst_message_type_get_name']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='Message']/method[@cname='gst_message_type_get_name']" name="hidden">1</attr>
|
<attr path="/api/namespace/mini-object[@name='Message']/constructor" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='Message']/constructor" name="hidden">1</attr>
|
<attr path="/api/namespace/mini-object[@name='Message']/method" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='Message']/method" name="hidden">1</attr>
|
<remove-attr path="/api/namespace/mini-object[@name='Message']/method[@cname='gst_message_get_type']" name="hidden" />
|
||||||
<remove-attr path="/api/namespace/boxed[@name='Message']/method[@cname='gst_message_get_type']" name="hidden" />
|
|
||||||
|
|
||||||
<attr path="/api/namespace/enum[@name='MessageType']" name="parent">uint</attr>
|
<attr path="/api/namespace/enum[@name='MessageType']" name="parent">uint</attr>
|
||||||
<attr path="/api/namespace/enum[@name='MessageType']/member[@name='Unknown']" name="value">0U</attr>
|
<attr path="/api/namespace/enum[@name='MessageType']/member[@name='Unknown']" name="value">0U</attr>
|
||||||
<attr path="/api/namespace/enum[@name='MessageType']/member[@name='Any']" name="value">0xffffffff</attr>
|
<attr path="/api/namespace/enum[@name='MessageType']/member[@name='Any']" name="value">0xffffffff</attr>
|
||||||
|
|
||||||
<change-node-type path="/api/namespace/object[@name='MiniObject']">boxed</change-node-type>
|
<attr path="/api/namespace/object[@name='MiniObject']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='MiniObject']" name="opaque">true</attr>
|
|
||||||
<remove-attr path="/api/namespace/boxed[@name='MiniObject']" name="parent" />
|
|
||||||
<attr path="/api/namespace/boxed[@name='MiniObject']/field[@name='Flags']" name="writeable">true</attr>
|
|
||||||
<attr path="/api/namespace/boxed[@name='MiniObject']/field[@name='Flags']" name="type">GstMiniObjectFlags</attr>
|
|
||||||
<attr path="/api/namespace/boxed[@name='MiniObject']/method[@cname='gst_mini_object_copy']" name="hidden">1</attr>
|
|
||||||
<attr path="/api/namespace/boxed[@name='MiniObject']/method[@cname='gst_mini_object_make_writable']" name="hidden">1</attr>
|
|
||||||
<attr path="/api/namespace/boxed[@name='MiniObject']/method[@cname='gst_mini_object_replace']" name="hidden">1</attr>
|
|
||||||
|
|
||||||
<attr path="/api/namespace/callback[@name='MiniObjectCopyFunction']" name="hidden">1</attr>
|
<attr path="/api/namespace/callback[@name='MiniObjectCopyFunction']" name="hidden">1</attr>
|
||||||
|
|
||||||
|
@ -744,19 +735,19 @@
|
||||||
<attr path="/api/namespace/interface[@name='Preset']/method[@cname='gst_preset_get_meta']/parameters/parameter[@name='value']" name="pass_as">out</attr>
|
<attr path="/api/namespace/interface[@name='Preset']/method[@cname='gst_preset_get_meta']/parameters/parameter[@name='value']" name="pass_as">out</attr>
|
||||||
<attr path="/api/namespace/interface[@name='Preset']/virtual_method[@cname='get_meta']/parameters/parameter[@name='value']" name="pass_as">out</attr>
|
<attr path="/api/namespace/interface[@name='Preset']/virtual_method[@cname='get_meta']/parameters/parameter[@name='value']" name="pass_as">out</attr>
|
||||||
|
|
||||||
<change-node-type path="/api/namespace/object[@name='Query']">boxed</change-node-type>
|
<change-node-type path="/api/namespace/object[@name='Query']">mini-object</change-node-type>
|
||||||
<attr path="/api/namespace/boxed[@name='Query']" name="opaque">true</attr>
|
<attr path="/api/namespace/mini-object[@name='Query']" name="opaque">true</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='Query']/method[@cname='gst_query_get_type']" name="new_flag">1</attr>
|
<attr path="/api/namespace/mini-object[@name='Query']/method[@cname='gst_query_get_type']" name="new_flag">1</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='Query']/field[@name='Structure']" name="hidden">1</attr>
|
<attr path="/api/namespace/mini-object[@name='Query']/field[@name='Structure']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='Query']/method" name="hidden">1</attr>
|
<attr path="/api/namespace/mini-object[@name='Query']/method" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='Query']/constructor" name="hidden">1</attr>
|
<attr path="/api/namespace/mini-object[@name='Query']/constructor" name="hidden">1</attr>
|
||||||
<remove-attr path="/api/namespace/boxed[@name='Query']/method[@cname='gst_query_get_type']" name="hidden" />
|
<remove-attr path="/api/namespace/mini-object[@name='Query']/method[@cname='gst_query_get_type']" name="hidden" />
|
||||||
<remove-attr path="/api/namespace/boxed[@name='Query']/method[@cname='gst_query_type_get_by_nick']" name="hidden" />
|
<remove-attr path="/api/namespace/mini-object[@name='Query']/method[@cname='gst_query_type_get_by_nick']" name="hidden" />
|
||||||
<attr path="/api/namespace/boxed[@name='Query']/method[@cname='gst_query_type_get_by_nick']" name="name">GetTypeByNick</attr>
|
<attr path="/api/namespace/mini-object[@name='Query']/method[@cname='gst_query_type_get_by_nick']" name="name">GetTypeByNick</attr>
|
||||||
<remove-attr path="/api/namespace/boxed[@name='Query']/method[@cname='gst_query_type_get_name']" name="hidden" />
|
<remove-attr path="/api/namespace/mini-object[@name='Query']/method[@cname='gst_query_type_get_name']" name="hidden" />
|
||||||
<attr path="/api/namespace/boxed[@name='Query']/method[@cname='gst_query_type_get_name']" name="name">GetTypeName</attr>
|
<attr path="/api/namespace/mini-object[@name='Query']/method[@cname='gst_query_type_get_name']" name="name">GetTypeName</attr>
|
||||||
<remove-attr path="/api/namespace/boxed[@name='Query']/method[@cname='gst_query_type_register']" name="hidden" />
|
<remove-attr path="/api/namespace/mini-object[@name='Query']/method[@cname='gst_query_type_register']" name="hidden" />
|
||||||
<attr path="/api/namespace/boxed[@name='Query']/method[@cname='gst_query_type_register']" name="name">RegisterType</attr>
|
<attr path="/api/namespace/mini-object[@name='Query']/method[@cname='gst_query_type_register']" name="name">RegisterType</attr>
|
||||||
|
|
||||||
<attr path="/api/namespace/struct[@name='QueryTypeDefinition']" name="hidden">1</attr>
|
<attr path="/api/namespace/struct[@name='QueryTypeDefinition']" name="hidden">1</attr>
|
||||||
|
|
||||||
|
|
|
@ -47,6 +47,7 @@ sources = \
|
||||||
PropertyInfo.cs \
|
PropertyInfo.cs \
|
||||||
EnumInfo.cs \
|
EnumInfo.cs \
|
||||||
Iterator.cs \
|
Iterator.cs \
|
||||||
|
MiniObject.cs \
|
||||||
GstSharp.PadQueryTypeFunctionNative.cs \
|
GstSharp.PadQueryTypeFunctionNative.cs \
|
||||||
PadQueryTypeFunction.cs \
|
PadQueryTypeFunction.cs \
|
||||||
TypeFindDelegates.cs \
|
TypeFindDelegates.cs \
|
||||||
|
@ -89,7 +90,6 @@ customs = \
|
||||||
PadTemplate.custom \
|
PadTemplate.custom \
|
||||||
Plugin.custom \
|
Plugin.custom \
|
||||||
Task.custom \
|
Task.custom \
|
||||||
MiniObject.custom \
|
|
||||||
IndexEntry.custom \
|
IndexEntry.custom \
|
||||||
Index.custom \
|
Index.custom \
|
||||||
IndexFactory.custom \
|
IndexFactory.custom \
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
protected Message () : base () { }
|
|
||||||
|
|
||||||
public Message (GLib.Value val) : base (val) { }
|
public Message (GLib.Value val) : base (val) { }
|
||||||
|
|
||||||
[DllImport ("gstreamersharpglue-0.10") ]
|
[DllImport ("gstreamersharpglue-0.10") ]
|
||||||
|
@ -104,7 +102,7 @@ public Gst.Structure Structure {
|
||||||
static extern IntPtr gst_message_new_eos (IntPtr src);
|
static extern IntPtr gst_message_new_eos (IntPtr src);
|
||||||
|
|
||||||
public static Message NewEos (Gst.Object src) {
|
public static Message NewEos (Gst.Object src) {
|
||||||
Message msg = (Message) GLib.Opaque.GetOpaque (gst_message_new_eos (src.Handle), typeof (Message), true);
|
Message msg = (Message) Gst.MiniObject.GetObject (gst_message_new_eos (src.Handle), true);
|
||||||
|
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
@ -140,7 +138,7 @@ public static Message NewError (Gst.Object src, Gst.CoreError error, string mess
|
||||||
|
|
||||||
IntPtr raw_ptr = (debug == null) ? IntPtr.Zero : GLib.Marshaller.StringToPtrGStrdup (debug);
|
IntPtr raw_ptr = (debug == null) ? IntPtr.Zero : GLib.Marshaller.StringToPtrGStrdup (debug);
|
||||||
|
|
||||||
Message msg = (Message) GLib.Opaque.GetOpaque (gst_message_new_error (src.Handle, ref err, raw_ptr), typeof (Message), true);
|
Message msg = (Message) Gst.MiniObject.GetObject (gst_message_new_error (src.Handle, ref err, raw_ptr), true);
|
||||||
|
|
||||||
GLib.Marshaller.Free (raw_ptr);
|
GLib.Marshaller.Free (raw_ptr);
|
||||||
err.Unset ();
|
err.Unset ();
|
||||||
|
@ -162,7 +160,7 @@ public static Message NewError (Gst.Object src, Gst.StreamError error, string me
|
||||||
|
|
||||||
IntPtr raw_ptr = (debug == null) ? IntPtr.Zero : GLib.Marshaller.StringToPtrGStrdup (debug);
|
IntPtr raw_ptr = (debug == null) ? IntPtr.Zero : GLib.Marshaller.StringToPtrGStrdup (debug);
|
||||||
|
|
||||||
Message msg = (Message) GLib.Opaque.GetOpaque (gst_message_new_error (src.Handle, ref err, raw_ptr), typeof (Message), true);
|
Message msg = (Message) Gst.MiniObject.GetObject (gst_message_new_error (src.Handle, ref err, raw_ptr), true);
|
||||||
|
|
||||||
GLib.Marshaller.Free (raw_ptr);
|
GLib.Marshaller.Free (raw_ptr);
|
||||||
err.Unset ();
|
err.Unset ();
|
||||||
|
@ -184,7 +182,7 @@ public static Message NewError (Gst.Object src, Gst.LibraryError error, string m
|
||||||
|
|
||||||
IntPtr raw_ptr = (debug == null) ? IntPtr.Zero : GLib.Marshaller.StringToPtrGStrdup (debug);
|
IntPtr raw_ptr = (debug == null) ? IntPtr.Zero : GLib.Marshaller.StringToPtrGStrdup (debug);
|
||||||
|
|
||||||
Message msg = (Message) GLib.Opaque.GetOpaque (gst_message_new_error (src.Handle, ref err, raw_ptr), typeof (Message), true);
|
Message msg = (Message) Gst.MiniObject.GetObject (gst_message_new_error (src.Handle, ref err, raw_ptr), true);
|
||||||
|
|
||||||
GLib.Marshaller.Free (raw_ptr);
|
GLib.Marshaller.Free (raw_ptr);
|
||||||
err.Unset ();
|
err.Unset ();
|
||||||
|
@ -205,7 +203,7 @@ public static Message NewError (Gst.Object src, Gst.ResourceError error, string
|
||||||
|
|
||||||
IntPtr raw_ptr = (debug == null) ? IntPtr.Zero : GLib.Marshaller.StringToPtrGStrdup (debug);
|
IntPtr raw_ptr = (debug == null) ? IntPtr.Zero : GLib.Marshaller.StringToPtrGStrdup (debug);
|
||||||
|
|
||||||
Message msg = (Message) GLib.Opaque.GetOpaque (gst_message_new_error (src.Handle, ref err, raw_ptr), typeof (Message), true);
|
Message msg = (Message) Gst.MiniObject.GetObject (gst_message_new_error (src.Handle, ref err, raw_ptr), true);
|
||||||
|
|
||||||
GLib.Marshaller.Free (raw_ptr);
|
GLib.Marshaller.Free (raw_ptr);
|
||||||
err.Unset ();
|
err.Unset ();
|
||||||
|
@ -278,7 +276,7 @@ public static Message NewWarning (Gst.Object src, Gst.CoreError error, string me
|
||||||
|
|
||||||
IntPtr raw_ptr = (debug == null) ? IntPtr.Zero : GLib.Marshaller.StringToPtrGStrdup (debug);
|
IntPtr raw_ptr = (debug == null) ? IntPtr.Zero : GLib.Marshaller.StringToPtrGStrdup (debug);
|
||||||
|
|
||||||
Message msg = (Message) GLib.Opaque.GetOpaque (gst_message_new_warning (src.Handle, ref err, raw_ptr), typeof (Message), true);
|
Message msg = (Message) Gst.MiniObject.GetObject (gst_message_new_warning (src.Handle, ref err, raw_ptr), true);
|
||||||
|
|
||||||
GLib.Marshaller.Free (raw_ptr);
|
GLib.Marshaller.Free (raw_ptr);
|
||||||
err.Unset ();
|
err.Unset ();
|
||||||
|
@ -300,7 +298,7 @@ public static Message NewWarning (Gst.Object src, Gst.StreamError error, string
|
||||||
|
|
||||||
IntPtr raw_ptr = (debug == null) ? IntPtr.Zero : GLib.Marshaller.StringToPtrGStrdup (debug);
|
IntPtr raw_ptr = (debug == null) ? IntPtr.Zero : GLib.Marshaller.StringToPtrGStrdup (debug);
|
||||||
|
|
||||||
Message msg = (Message) GLib.Opaque.GetOpaque (gst_message_new_warning (src.Handle, ref err, raw_ptr), typeof (Message), true);
|
Message msg = (Message) Gst.MiniObject.GetObject (gst_message_new_warning (src.Handle, ref err, raw_ptr), true);
|
||||||
|
|
||||||
GLib.Marshaller.Free (raw_ptr);
|
GLib.Marshaller.Free (raw_ptr);
|
||||||
err.Unset ();
|
err.Unset ();
|
||||||
|
@ -322,7 +320,7 @@ public static Message NewWarning (Gst.Object src, Gst.LibraryError error, string
|
||||||
|
|
||||||
IntPtr raw_ptr = (debug == null) ? IntPtr.Zero : GLib.Marshaller.StringToPtrGStrdup (debug);
|
IntPtr raw_ptr = (debug == null) ? IntPtr.Zero : GLib.Marshaller.StringToPtrGStrdup (debug);
|
||||||
|
|
||||||
Message msg = (Message) GLib.Opaque.GetOpaque (gst_message_new_warning (src.Handle, ref err, raw_ptr), typeof (Message), true);
|
Message msg = (Message) Gst.MiniObject.GetObject (gst_message_new_warning (src.Handle, ref err, raw_ptr), true);
|
||||||
|
|
||||||
GLib.Marshaller.Free (raw_ptr);
|
GLib.Marshaller.Free (raw_ptr);
|
||||||
err.Unset ();
|
err.Unset ();
|
||||||
|
@ -344,7 +342,7 @@ public static Message NewWarning (Gst.Object src, Gst.ResourceError error, strin
|
||||||
|
|
||||||
IntPtr raw_ptr = (debug == null) ? IntPtr.Zero : GLib.Marshaller.StringToPtrGStrdup (debug);
|
IntPtr raw_ptr = (debug == null) ? IntPtr.Zero : GLib.Marshaller.StringToPtrGStrdup (debug);
|
||||||
|
|
||||||
Message msg = (Message) GLib.Opaque.GetOpaque (gst_message_new_warning (src.Handle, ref err, raw_ptr), typeof (Message), true);
|
Message msg = (Message) Gst.MiniObject.GetObject (gst_message_new_warning (src.Handle, ref err, raw_ptr), true);
|
||||||
|
|
||||||
GLib.Marshaller.Free (raw_ptr);
|
GLib.Marshaller.Free (raw_ptr);
|
||||||
err.Unset ();
|
err.Unset ();
|
||||||
|
@ -417,7 +415,7 @@ public static Message NewInfo (Gst.Object src, Gst.CoreError error, string messa
|
||||||
|
|
||||||
IntPtr raw_ptr = (debug == null) ? IntPtr.Zero : GLib.Marshaller.StringToPtrGStrdup (debug);
|
IntPtr raw_ptr = (debug == null) ? IntPtr.Zero : GLib.Marshaller.StringToPtrGStrdup (debug);
|
||||||
|
|
||||||
Message msg = (Message) GLib.Opaque.GetOpaque (gst_message_new_info (src.Handle, ref err, raw_ptr), typeof (Message), true);
|
Message msg = (Message) Gst.MiniObject.GetObject (gst_message_new_info (src.Handle, ref err, raw_ptr), true);
|
||||||
|
|
||||||
GLib.Marshaller.Free (raw_ptr);
|
GLib.Marshaller.Free (raw_ptr);
|
||||||
err.Unset ();
|
err.Unset ();
|
||||||
|
@ -439,7 +437,7 @@ public static Message NewInfo (Gst.Object src, Gst.StreamError error, string mes
|
||||||
|
|
||||||
IntPtr raw_ptr = (debug == null) ? IntPtr.Zero : GLib.Marshaller.StringToPtrGStrdup (debug);
|
IntPtr raw_ptr = (debug == null) ? IntPtr.Zero : GLib.Marshaller.StringToPtrGStrdup (debug);
|
||||||
|
|
||||||
Message msg = (Message) GLib.Opaque.GetOpaque (gst_message_new_info (src.Handle, ref err, raw_ptr), typeof (Message), true);
|
Message msg = (Message) Gst.MiniObject.GetObject (gst_message_new_info (src.Handle, ref err, raw_ptr), true);
|
||||||
|
|
||||||
GLib.Marshaller.Free (raw_ptr);
|
GLib.Marshaller.Free (raw_ptr);
|
||||||
err.Unset ();
|
err.Unset ();
|
||||||
|
@ -461,7 +459,7 @@ public static Message NewInfo (Gst.Object src, Gst.LibraryError error, string me
|
||||||
|
|
||||||
IntPtr raw_ptr = (debug == null) ? IntPtr.Zero : GLib.Marshaller.StringToPtrGStrdup (debug);
|
IntPtr raw_ptr = (debug == null) ? IntPtr.Zero : GLib.Marshaller.StringToPtrGStrdup (debug);
|
||||||
|
|
||||||
Message msg = (Message) GLib.Opaque.GetOpaque (gst_message_new_info (src.Handle, ref err, raw_ptr), typeof (Message), true);
|
Message msg = (Message) Gst.MiniObject.GetObject (gst_message_new_info (src.Handle, ref err, raw_ptr), true);
|
||||||
|
|
||||||
GLib.Marshaller.Free (raw_ptr);
|
GLib.Marshaller.Free (raw_ptr);
|
||||||
err.Unset ();
|
err.Unset ();
|
||||||
|
@ -483,7 +481,7 @@ public static Message NewInfo (Gst.Object src, Gst.ResourceError error, string m
|
||||||
|
|
||||||
IntPtr raw_ptr = (debug == null) ? IntPtr.Zero : GLib.Marshaller.StringToPtrGStrdup (debug);
|
IntPtr raw_ptr = (debug == null) ? IntPtr.Zero : GLib.Marshaller.StringToPtrGStrdup (debug);
|
||||||
|
|
||||||
Message msg = (Message) GLib.Opaque.GetOpaque (gst_message_new_info (src.Handle, ref err, raw_ptr), typeof (Message), true);
|
Message msg = (Message) Gst.MiniObject.GetObject (gst_message_new_info (src.Handle, ref err, raw_ptr), true);
|
||||||
|
|
||||||
GLib.Marshaller.Free (raw_ptr);
|
GLib.Marshaller.Free (raw_ptr);
|
||||||
err.Unset ();
|
err.Unset ();
|
||||||
|
@ -552,7 +550,7 @@ static extern IntPtr gst_message_new_tag (IntPtr src, IntPtr tags);
|
||||||
static extern IntPtr gst_tag_list_copy (IntPtr handle);
|
static extern IntPtr gst_tag_list_copy (IntPtr handle);
|
||||||
|
|
||||||
public static Message NewTag (Gst.Object src, TagList tags) {
|
public static Message NewTag (Gst.Object src, TagList tags) {
|
||||||
Message msg = (Message) GLib.Opaque.GetOpaque (gst_message_new_tag (src.Handle, gst_tag_list_copy (tags.Handle)), typeof (Message), true);
|
Message msg = (Message) Gst.MiniObject.GetObject (gst_message_new_tag (src.Handle, gst_tag_list_copy (tags.Handle)), true);
|
||||||
|
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
@ -577,7 +575,7 @@ public void ParseTag (out TagList tags) {
|
||||||
static extern IntPtr gst_message_new_buffering (IntPtr src, int percent);
|
static extern IntPtr gst_message_new_buffering (IntPtr src, int percent);
|
||||||
|
|
||||||
public static Message NewBuffering (Gst.Object src, int percent) {
|
public static Message NewBuffering (Gst.Object src, int percent) {
|
||||||
Message msg = (Message) GLib.Opaque.GetOpaque (gst_message_new_buffering (src.Handle, percent), typeof (Message), true);
|
Message msg = (Message) Gst.MiniObject.GetObject (gst_message_new_buffering (src.Handle, percent), true);
|
||||||
|
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
@ -618,7 +616,7 @@ public void ParseBufferingStats (out Gst.BufferingMode mode, out int avg_in, out
|
||||||
static extern IntPtr gst_message_new_state_changed (IntPtr src, State oldstate, State newstate, State pendingstate);
|
static extern IntPtr gst_message_new_state_changed (IntPtr src, State oldstate, State newstate, State pendingstate);
|
||||||
|
|
||||||
public static Message NewStateChanged (Gst.Object src, State oldstate, State newstate, State pendingstate) {
|
public static Message NewStateChanged (Gst.Object src, State oldstate, State newstate, State pendingstate) {
|
||||||
Message msg = (Message) GLib.Opaque.GetOpaque (gst_message_new_state_changed (src.Handle, oldstate, newstate, pendingstate), typeof (Message), true);
|
Message msg = (Message) Gst.MiniObject.GetObject (gst_message_new_state_changed (src.Handle, oldstate, newstate, pendingstate), true);
|
||||||
|
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
@ -637,7 +635,7 @@ public void ParseStateChanged (out State oldstate, out State newstate, out State
|
||||||
static extern IntPtr gst_message_new_state_dirty (IntPtr src);
|
static extern IntPtr gst_message_new_state_dirty (IntPtr src);
|
||||||
|
|
||||||
public static Message NewStateDirty (Gst.Object src) {
|
public static Message NewStateDirty (Gst.Object src) {
|
||||||
Message msg = (Message) GLib.Opaque.GetOpaque (gst_message_new_state_dirty (src.Handle), typeof (Message), true);
|
Message msg = (Message) Gst.MiniObject.GetObject (gst_message_new_state_dirty (src.Handle), true);
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -645,7 +643,7 @@ public static Message NewStateDirty (Gst.Object src) {
|
||||||
static extern IntPtr gst_message_new_clock_provide (IntPtr src, IntPtr clock, bool ready);
|
static extern IntPtr gst_message_new_clock_provide (IntPtr src, IntPtr clock, bool ready);
|
||||||
|
|
||||||
public static Message NewClockProvide (Gst.Object src, Gst.Clock clock, bool ready) {
|
public static Message NewClockProvide (Gst.Object src, Gst.Clock clock, bool ready) {
|
||||||
Message msg = (Message) GLib.Opaque.GetOpaque (gst_message_new_clock_provide (src.Handle, clock.Handle, ready), typeof (Message), true);
|
Message msg = (Message) Gst.MiniObject.GetObject (gst_message_new_clock_provide (src.Handle, clock.Handle, ready), true);
|
||||||
|
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
@ -668,7 +666,7 @@ public void ParseClockProvide (out Gst.Clock clock, out bool ready) {
|
||||||
static extern IntPtr gst_message_new_clock_lost (IntPtr src, IntPtr clock);
|
static extern IntPtr gst_message_new_clock_lost (IntPtr src, IntPtr clock);
|
||||||
|
|
||||||
public static Message NewClockLost (Gst.Object src, Gst.Clock clock) {
|
public static Message NewClockLost (Gst.Object src, Gst.Clock clock) {
|
||||||
Message msg = (Message) GLib.Opaque.GetOpaque (gst_message_new_clock_lost (src.Handle, clock.Handle), typeof (Message), true);
|
Message msg = (Message) Gst.MiniObject.GetObject (gst_message_new_clock_lost (src.Handle, clock.Handle), true);
|
||||||
|
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
@ -691,7 +689,7 @@ public void ParseClockLost (out Gst.Clock clock) {
|
||||||
static extern IntPtr gst_message_new_new_clock (IntPtr src, IntPtr clock);
|
static extern IntPtr gst_message_new_new_clock (IntPtr src, IntPtr clock);
|
||||||
|
|
||||||
public static Message NewNewClock (Gst.Object src, Gst.Clock clock) {
|
public static Message NewNewClock (Gst.Object src, Gst.Clock clock) {
|
||||||
Message msg = (Message) GLib.Opaque.GetOpaque (gst_message_new_new_clock (src.Handle, clock.Handle), typeof (Message), true);
|
Message msg = (Message) Gst.MiniObject.GetObject (gst_message_new_new_clock (src.Handle, clock.Handle), true);
|
||||||
|
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
@ -714,7 +712,7 @@ public void ParseNewClock (out Gst.Clock clock) {
|
||||||
static extern IntPtr gst_message_new_application (IntPtr src, IntPtr structure);
|
static extern IntPtr gst_message_new_application (IntPtr src, IntPtr structure);
|
||||||
|
|
||||||
public static Message NewApplication (Gst.Object src, Gst.Structure structure) {
|
public static Message NewApplication (Gst.Object src, Gst.Structure structure) {
|
||||||
Message msg = (Message) GLib.Opaque.GetOpaque (gst_message_new_application (src.Handle, (structure != null) ? structure.Handle : IntPtr.Zero), typeof (Message), true);
|
Message msg = (Message) Gst.MiniObject.GetObject (gst_message_new_application (src.Handle, (structure != null) ? structure.Handle : IntPtr.Zero), true);
|
||||||
msg.cached_structure = structure;
|
msg.cached_structure = structure;
|
||||||
structure.FreeNative = false;
|
structure.FreeNative = false;
|
||||||
|
|
||||||
|
@ -725,7 +723,7 @@ public static Message NewApplication (Gst.Object src, Gst.Structure structure) {
|
||||||
static extern IntPtr gst_message_new_element (IntPtr src, IntPtr structure);
|
static extern IntPtr gst_message_new_element (IntPtr src, IntPtr structure);
|
||||||
|
|
||||||
public static Message NewElement (Gst.Object src, Gst.Structure structure) {
|
public static Message NewElement (Gst.Object src, Gst.Structure structure) {
|
||||||
Message msg = (Message) GLib.Opaque.GetOpaque (gst_message_new_element (src.Handle, (structure != null) ? structure.Handle : IntPtr.Zero), typeof (Message), true);
|
Message msg = (Message) Gst.MiniObject.GetObject (gst_message_new_element (src.Handle, (structure != null) ? structure.Handle : IntPtr.Zero), true);
|
||||||
msg.cached_structure = structure;
|
msg.cached_structure = structure;
|
||||||
structure.FreeNative = false;
|
structure.FreeNative = false;
|
||||||
|
|
||||||
|
@ -736,7 +734,7 @@ public static Message NewElement (Gst.Object src, Gst.Structure structure) {
|
||||||
static extern IntPtr gst_message_new_custom (Gst.MessageType type, IntPtr src, IntPtr structure);
|
static extern IntPtr gst_message_new_custom (Gst.MessageType type, IntPtr src, IntPtr structure);
|
||||||
|
|
||||||
public static Message NewCustom (Gst.MessageType type, Gst.Object src, Gst.Structure structure) {
|
public static Message NewCustom (Gst.MessageType type, Gst.Object src, Gst.Structure structure) {
|
||||||
Message msg = (Message) GLib.Opaque.GetOpaque (gst_message_new_custom (type, src.Handle, (structure != null) ? structure.Handle : IntPtr.Zero), typeof (Message), true);
|
Message msg = (Message) Gst.MiniObject.GetObject (gst_message_new_custom (type, src.Handle, (structure != null) ? structure.Handle : IntPtr.Zero), true);
|
||||||
msg.cached_structure = structure;
|
msg.cached_structure = structure;
|
||||||
structure.FreeNative = false;
|
structure.FreeNative = false;
|
||||||
|
|
||||||
|
@ -747,7 +745,7 @@ public static Message NewCustom (Gst.MessageType type, Gst.Object src, Gst.Struc
|
||||||
static extern IntPtr gst_message_new_segment_start (IntPtr src, Gst.Format format, long position);
|
static extern IntPtr gst_message_new_segment_start (IntPtr src, Gst.Format format, long position);
|
||||||
|
|
||||||
public static Message NewSegmentStart (Gst.Object src, Gst.Format format, long position) {
|
public static Message NewSegmentStart (Gst.Object src, Gst.Format format, long position) {
|
||||||
Message msg = (Message) GLib.Opaque.GetOpaque (gst_message_new_segment_start (src.Handle, format, position), typeof (Message), true);
|
Message msg = (Message) Gst.MiniObject.GetObject (gst_message_new_segment_start (src.Handle, format, position), true);
|
||||||
|
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
@ -766,7 +764,7 @@ public void ParseSegmentStart (out Gst.Format format, out long position) {
|
||||||
static extern IntPtr gst_message_new_segment_done (IntPtr src, Gst.Format format, long position);
|
static extern IntPtr gst_message_new_segment_done (IntPtr src, Gst.Format format, long position);
|
||||||
|
|
||||||
public static Message NewSegmentDone (Gst.Object src, Gst.Format format, long position) {
|
public static Message NewSegmentDone (Gst.Object src, Gst.Format format, long position) {
|
||||||
Message msg = (Message) GLib.Opaque.GetOpaque (gst_message_new_segment_done (src.Handle, format, position), typeof (Message), true);
|
Message msg = (Message) Gst.MiniObject.GetObject (gst_message_new_segment_done (src.Handle, format, position), true);
|
||||||
|
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
@ -785,7 +783,7 @@ public void ParseSegmentDone (out Gst.Format format, out long position) {
|
||||||
static extern IntPtr gst_message_new_duration (IntPtr src, Gst.Format format, long duration);
|
static extern IntPtr gst_message_new_duration (IntPtr src, Gst.Format format, long duration);
|
||||||
|
|
||||||
public static Message NewDuration (Gst.Object src, Gst.Format format, long duration) {
|
public static Message NewDuration (Gst.Object src, Gst.Format format, long duration) {
|
||||||
Message msg = (Message) GLib.Opaque.GetOpaque (gst_message_new_duration (src.Handle, format, duration), typeof (Message), true);
|
Message msg = (Message) Gst.MiniObject.GetObject (gst_message_new_duration (src.Handle, format, duration), true);
|
||||||
|
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
@ -804,7 +802,7 @@ public void ParseDuration (out Gst.Format format, out long duration) {
|
||||||
static extern IntPtr gst_message_new_latency (IntPtr src);
|
static extern IntPtr gst_message_new_latency (IntPtr src);
|
||||||
|
|
||||||
public static Message NewLatency (Gst.Object src) {
|
public static Message NewLatency (Gst.Object src) {
|
||||||
Message msg = (Message) GLib.Opaque.GetOpaque (gst_message_new_latency (src.Handle), typeof (Message), true);
|
Message msg = (Message) Gst.MiniObject.GetObject (gst_message_new_latency (src.Handle), true);
|
||||||
|
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
@ -813,7 +811,7 @@ public static Message NewLatency (Gst.Object src) {
|
||||||
static extern IntPtr gst_message_new_async_start (IntPtr src, bool new_base_time);
|
static extern IntPtr gst_message_new_async_start (IntPtr src, bool new_base_time);
|
||||||
|
|
||||||
public static Message NewAsyncStart (Gst.Object src, bool new_base_time) {
|
public static Message NewAsyncStart (Gst.Object src, bool new_base_time) {
|
||||||
Message msg = (Message) GLib.Opaque.GetOpaque (gst_message_new_async_start (src.Handle, new_base_time), typeof (Message), true);
|
Message msg = (Message) Gst.MiniObject.GetObject (gst_message_new_async_start (src.Handle, new_base_time), true);
|
||||||
|
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
@ -832,7 +830,7 @@ public void ParseAsyncStart (out bool new_base_time) {
|
||||||
static extern IntPtr gst_message_new_async_done (IntPtr src);
|
static extern IntPtr gst_message_new_async_done (IntPtr src);
|
||||||
|
|
||||||
public static Message NewAsyncDone (Gst.Object src) {
|
public static Message NewAsyncDone (Gst.Object src) {
|
||||||
Message msg = (Message) GLib.Opaque.GetOpaque (gst_message_new_async_done (src.Handle), typeof (Message), true);
|
Message msg = (Message) Gst.MiniObject.GetObject (gst_message_new_async_done (src.Handle), true);
|
||||||
|
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
@ -841,7 +839,7 @@ public static Message NewAsyncDone (Gst.Object src) {
|
||||||
static extern IntPtr gst_message_new_structure_change (IntPtr src, StructureChangeType type, IntPtr owner, bool busy);
|
static extern IntPtr gst_message_new_structure_change (IntPtr src, StructureChangeType type, IntPtr owner, bool busy);
|
||||||
|
|
||||||
public static Message NewStructureChange (Gst.Object src, StructureChangeType type, Gst.Element owner, bool busy) {
|
public static Message NewStructureChange (Gst.Object src, StructureChangeType type, Gst.Element owner, bool busy) {
|
||||||
Message msg = (Message) GLib.Opaque.GetOpaque (gst_message_new_structure_change (src.Handle, type, owner.Handle, busy), typeof (Message), true);
|
Message msg = (Message) Gst.MiniObject.GetObject (gst_message_new_structure_change (src.Handle, type, owner.Handle, busy), true);
|
||||||
|
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
|
522
gstreamer-sharp/MiniObject.cs
Normal file
522
gstreamer-sharp/MiniObject.cs
Normal file
|
@ -0,0 +1,522 @@
|
||||||
|
// MiniObject.cs - GstMiniObject class wrapper implementation
|
||||||
|
//
|
||||||
|
// Authors: Mike Kestner <mkestner@speakeasy.net>
|
||||||
|
// Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
||||||
|
//
|
||||||
|
// Copyright (c) 2001-2003 Mike Kestner
|
||||||
|
// Copyright (c) 2004-2005 Novell, Inc.
|
||||||
|
// Copyright (c) 2009 Sebastian Dröge <sebastian.droege@collabora.co.uk>.
|
||||||
|
//
|
||||||
|
// This program is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of version 2 of the Lesser GNU General
|
||||||
|
// Public License as published by the Free Software Foundation.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this program; if not, write to the
|
||||||
|
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
// Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
// Based on Object.cs from Gtk# 2.8.3
|
||||||
|
|
||||||
|
// TODO: For managed types, install finalizer in ThresholdType
|
||||||
|
// and only destroy the managed instance if the native instance
|
||||||
|
// gets finalized => move managed instance to managed_tb_destroyed
|
||||||
|
// and unref, if finalizer is called remove it completely.
|
||||||
|
// For non-managed types handle as is.
|
||||||
|
|
||||||
|
namespace Gst {
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Text;
|
||||||
|
using GLib;
|
||||||
|
|
||||||
|
public class MiniObject : IWrapper, IDisposable {
|
||||||
|
[StructLayout (LayoutKind.Sequential) ]
|
||||||
|
struct GTypeClass {
|
||||||
|
public IntPtr gtype;
|
||||||
|
}
|
||||||
|
|
||||||
|
[StructLayout (LayoutKind.Sequential) ]
|
||||||
|
struct GstMiniObjectClass {
|
||||||
|
GTypeClass parent;
|
||||||
|
IntPtr copy;
|
||||||
|
IntPtr finalize;
|
||||||
|
IntPtr reserved;
|
||||||
|
}
|
||||||
|
|
||||||
|
[StructLayout (LayoutKind.Sequential) ]
|
||||||
|
struct GTypeInstance {
|
||||||
|
public IntPtr g_class;
|
||||||
|
}
|
||||||
|
|
||||||
|
[StructLayout (LayoutKind.Sequential) ]
|
||||||
|
struct GstMiniObject {
|
||||||
|
GTypeInstance parent;
|
||||||
|
public int refcount;
|
||||||
|
public Gst.MiniObjectFlags flags;
|
||||||
|
IntPtr reserved;
|
||||||
|
}
|
||||||
|
|
||||||
|
IntPtr handle;
|
||||||
|
bool disposed = false;
|
||||||
|
static Hashtable Objects = new Hashtable();
|
||||||
|
static ArrayList PendingDestroys = new ArrayList ();
|
||||||
|
static bool idle_queued;
|
||||||
|
|
||||||
|
~MiniObject () {
|
||||||
|
Dispose ();
|
||||||
|
}
|
||||||
|
|
||||||
|
[DllImport ("gstreamer-0.10.dll") ]
|
||||||
|
static extern void gst_mini_object_unref (IntPtr raw);
|
||||||
|
|
||||||
|
static bool PerformQueuedUnrefs () {
|
||||||
|
MiniObject [] objects;
|
||||||
|
|
||||||
|
lock (PendingDestroys) {
|
||||||
|
objects = new MiniObject [PendingDestroys.Count];
|
||||||
|
PendingDestroys.CopyTo (objects, 0);
|
||||||
|
PendingDestroys.Clear ();
|
||||||
|
}
|
||||||
|
lock (typeof (MiniObject))
|
||||||
|
idle_queued = false;
|
||||||
|
|
||||||
|
foreach (MiniObject o in objects) {
|
||||||
|
if (o.handle == IntPtr.Zero)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
try {
|
||||||
|
gst_mini_object_unref (o.handle);
|
||||||
|
} catch (Exception e) {
|
||||||
|
Console.WriteLine ("Exception while disposing a " + o + " in Gtk#");
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
Objects.Remove (o.handle);
|
||||||
|
o.handle = IntPtr.Zero;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual void Dispose () {
|
||||||
|
if (disposed)
|
||||||
|
return;
|
||||||
|
|
||||||
|
disposed = true;
|
||||||
|
lock (PendingDestroys) {
|
||||||
|
PendingDestroys.Add (this);
|
||||||
|
lock (typeof (MiniObject)) {
|
||||||
|
if (!idle_queued) {
|
||||||
|
Timeout.Add (50, new TimeoutHandler (PerformQueuedUnrefs));
|
||||||
|
idle_queued = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
GC.SuppressFinalize (this);
|
||||||
|
}
|
||||||
|
|
||||||
|
[DllImport ("gstreamer-0.10.dll") ]
|
||||||
|
static extern IntPtr gst_mini_object_ref (IntPtr raw);
|
||||||
|
|
||||||
|
public static MiniObject GetObject (IntPtr o, bool owned_ref) {
|
||||||
|
if (o == IntPtr.Zero)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
MiniObject obj = null;
|
||||||
|
WeakReference weak_ref = Objects[o] as WeakReference;
|
||||||
|
|
||||||
|
if (weak_ref != null && weak_ref.IsAlive)
|
||||||
|
obj = weak_ref.Target as MiniObject;
|
||||||
|
|
||||||
|
if (obj == null)
|
||||||
|
obj = Objects[o] as MiniObject;
|
||||||
|
|
||||||
|
if (obj != null && obj.handle == o) {
|
||||||
|
lock (PendingDestroys)
|
||||||
|
PendingDestroys.Remove (obj);
|
||||||
|
if (owned_ref)
|
||||||
|
gst_mini_object_unref (obj.handle);
|
||||||
|
obj.disposed = false;
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
|
||||||
|
obj = CreateObject (o);
|
||||||
|
if (obj == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
if (!owned_ref)
|
||||||
|
gst_mini_object_ref (obj.Handle);
|
||||||
|
Objects [o] = new WeakReference (obj);
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
|
||||||
|
static BindingFlags flags = BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance | BindingFlags.CreateInstance;
|
||||||
|
private static MiniObject CreateObject (IntPtr raw) {
|
||||||
|
if (raw == IntPtr.Zero)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
Type type = GetTypeOrParent (raw);
|
||||||
|
|
||||||
|
if (type == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
MiniObject obj;
|
||||||
|
try {
|
||||||
|
obj = Activator.CreateInstance (type, flags, null, new object[] {raw}, null) as Gst.MiniObject;
|
||||||
|
} catch (MissingMethodException) {
|
||||||
|
throw new GLib.MissingIntPtrCtorException ("Gst.MiniObject subclass " + type + " must provide a protected or public IntPtr ctor to support wrapping of native object handles.");
|
||||||
|
}
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
|
||||||
|
[DllImport ("gstreamersharpglue-0.10.dll") ]
|
||||||
|
static extern IntPtr gstsharp_g_type_from_instance (IntPtr inst);
|
||||||
|
|
||||||
|
static Type GetTypeOrParent (IntPtr obj) {
|
||||||
|
IntPtr typeid = gstsharp_g_type_from_instance (obj);
|
||||||
|
if (typeid == GType.Invalid.Val)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
Type result = GType.LookupType (typeid);
|
||||||
|
while (result == null) {
|
||||||
|
typeid = g_type_parent (typeid);
|
||||||
|
if (typeid == IntPtr.Zero)
|
||||||
|
return null;
|
||||||
|
result = GType.LookupType (typeid);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
[DllImport ("libgobject-2.0-0.dll") ]
|
||||||
|
static extern IntPtr g_type_parent (IntPtr typ);
|
||||||
|
|
||||||
|
public static MiniObject GetObject (IntPtr o) {
|
||||||
|
return GetObject (o, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void ConnectDefaultHandlers (GType gtype, System.Type t) {
|
||||||
|
foreach (MethodInfo minfo in t.GetMethods (BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.DeclaredOnly)) {
|
||||||
|
MethodInfo baseinfo = minfo.GetBaseDefinition ();
|
||||||
|
if (baseinfo == minfo)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
foreach (object attr in baseinfo.GetCustomAttributes (typeof (DefaultSignalHandlerAttribute), false)) {
|
||||||
|
DefaultSignalHandlerAttribute sigattr = attr as DefaultSignalHandlerAttribute;
|
||||||
|
MethodInfo connector = sigattr.Type.GetMethod (sigattr.ConnectionMethod, BindingFlags.Static | BindingFlags.NonPublic);
|
||||||
|
object[] parms = new object [1];
|
||||||
|
parms [0] = gtype;
|
||||||
|
connector.Invoke (null, parms);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void InvokeClassInitializers (GType gtype, System.Type t) {
|
||||||
|
object[] parms = {gtype, t};
|
||||||
|
|
||||||
|
BindingFlags flags = BindingFlags.Static | BindingFlags.NonPublic;
|
||||||
|
|
||||||
|
foreach (TypeInitializerAttribute tia in t.GetCustomAttributes (typeof (TypeInitializerAttribute), true)) {
|
||||||
|
MethodInfo m = tia.Type.GetMethod (tia.MethodName, flags);
|
||||||
|
if (m != null)
|
||||||
|
m.Invoke (null, parms);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static Hashtable class_structs;
|
||||||
|
|
||||||
|
static GstMiniObjectClass GetClassStruct (GLib.GType gtype, bool use_cache) {
|
||||||
|
if (class_structs == null)
|
||||||
|
class_structs = new Hashtable ();
|
||||||
|
|
||||||
|
if (use_cache && class_structs.Contains (gtype))
|
||||||
|
return (GstMiniObjectClass) class_structs [gtype];
|
||||||
|
else {
|
||||||
|
IntPtr class_ptr = gtype.ClassPtr;
|
||||||
|
GstMiniObjectClass class_struct = (GstMiniObjectClass) Marshal.PtrToStructure (class_ptr, typeof (GstMiniObjectClass));
|
||||||
|
if (use_cache)
|
||||||
|
class_structs.Add (gtype, class_struct);
|
||||||
|
return class_struct;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void OverrideClassStruct (GLib.GType gtype, GstMiniObjectClass class_struct) {
|
||||||
|
IntPtr class_ptr = gtype.ClassPtr;
|
||||||
|
Marshal.StructureToPtr (class_struct, class_ptr, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int type_uid;
|
||||||
|
static string BuildEscapedName (System.Type t) {
|
||||||
|
string qn = t.FullName;
|
||||||
|
// Just a random guess
|
||||||
|
StringBuilder sb = new StringBuilder (20 + qn.Length);
|
||||||
|
sb.Append ("__gtksharp_");
|
||||||
|
sb.Append (type_uid++);
|
||||||
|
sb.Append ("_");
|
||||||
|
foreach (char c in qn) {
|
||||||
|
if ( (c >= '0' && c <= '9') || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))
|
||||||
|
sb.Append (c);
|
||||||
|
else if (c == '.')
|
||||||
|
sb.Append ('_');
|
||||||
|
else if ( (uint) c <= byte.MaxValue) {
|
||||||
|
sb.Append ('+');
|
||||||
|
sb.Append ( ( (byte) c).ToString ("x2"));
|
||||||
|
} else {
|
||||||
|
sb.Append ('-');
|
||||||
|
sb.Append ( ( (uint) c).ToString ("x4"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return sb.ToString ();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[StructLayout (LayoutKind.Sequential) ]
|
||||||
|
struct GTypeInfo {
|
||||||
|
public ushort class_size;
|
||||||
|
IntPtr base_init;
|
||||||
|
IntPtr base_finalize;
|
||||||
|
IntPtr class_init;
|
||||||
|
IntPtr class_finalize;
|
||||||
|
IntPtr class_data;
|
||||||
|
public ushort instance_size;
|
||||||
|
ushort n_preallocs;
|
||||||
|
IntPtr instance_init;
|
||||||
|
IntPtr value_table;
|
||||||
|
}
|
||||||
|
|
||||||
|
[StructLayout (LayoutKind.Sequential) ]
|
||||||
|
struct GTypeQuery {
|
||||||
|
public IntPtr type;
|
||||||
|
public IntPtr type_name;
|
||||||
|
public uint class_size;
|
||||||
|
public uint instance_size;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[DllImport ("libgobject-2.0-0.dll") ]
|
||||||
|
static extern void g_type_query (IntPtr type, out GTypeQuery query);
|
||||||
|
|
||||||
|
[DllImport ("libgobject-2.0-0.dll") ]
|
||||||
|
static extern IntPtr g_type_register_static (IntPtr parent, IntPtr name, ref GTypeInfo info, int flags);
|
||||||
|
|
||||||
|
private static GType RegisterGType (System.Type t) {
|
||||||
|
GType parent_gtype = LookupGType (t.BaseType);
|
||||||
|
string name = BuildEscapedName (t);
|
||||||
|
IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
|
||||||
|
GTypeQuery query;
|
||||||
|
g_type_query (parent_gtype.Val, out query);
|
||||||
|
GTypeInfo info = new GTypeInfo ();
|
||||||
|
info.class_size = (ushort) query.class_size;
|
||||||
|
info.instance_size = (ushort) query.instance_size;
|
||||||
|
GType gtype = new GType (g_type_register_static (parent_gtype.Val, native_name, ref info, 0));
|
||||||
|
GLib.Marshaller.Free (native_name);
|
||||||
|
|
||||||
|
GLib.GType.Register (gtype, t);
|
||||||
|
|
||||||
|
ConnectDefaultHandlers (gtype, t);
|
||||||
|
InvokeClassInitializers (gtype, t);
|
||||||
|
return gtype;
|
||||||
|
}
|
||||||
|
|
||||||
|
[DllImport ("glibsharpglue-2") ]
|
||||||
|
static extern IntPtr gtksharp_register_type (IntPtr name, IntPtr parent_type);
|
||||||
|
|
||||||
|
static Hashtable g_types = new Hashtable ();
|
||||||
|
|
||||||
|
protected GType LookupGType () {
|
||||||
|
if (Handle != IntPtr.Zero) {
|
||||||
|
GTypeInstance obj = (GTypeInstance) Marshal.PtrToStructure (Handle, typeof (GTypeInstance));
|
||||||
|
GTypeClass klass = (GTypeClass) Marshal.PtrToStructure (obj.g_class, typeof (GTypeClass));
|
||||||
|
return new GLib.GType (klass.gtype);
|
||||||
|
} else {
|
||||||
|
return LookupGType (GetType ());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected internal static GType LookupGType (System.Type t) {
|
||||||
|
if (g_types.Contains (t))
|
||||||
|
return (GType) g_types [t];
|
||||||
|
|
||||||
|
System.Reflection.PropertyInfo pi = t.GetProperty ("GType", BindingFlags.DeclaredOnly | BindingFlags.Static | BindingFlags.Public);
|
||||||
|
if (pi != null)
|
||||||
|
return (GType) pi.GetValue (null, null);
|
||||||
|
|
||||||
|
return RegisterGType (t);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected MiniObject (IntPtr raw) {
|
||||||
|
Raw = raw;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected MiniObject () {
|
||||||
|
CreateNativeObject ();
|
||||||
|
}
|
||||||
|
|
||||||
|
[DllImport ("gstreamer-0.10.dll") ]
|
||||||
|
static extern IntPtr gst_mini_object_new (IntPtr gtype);
|
||||||
|
|
||||||
|
protected virtual void CreateNativeObject () {
|
||||||
|
Raw = gst_mini_object_new (LookupGType ().Val);
|
||||||
|
Objects [handle] = this;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected virtual IntPtr Raw {
|
||||||
|
get {
|
||||||
|
return handle;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
if (handle != IntPtr.Zero)
|
||||||
|
Objects.Remove (handle);
|
||||||
|
handle = value;
|
||||||
|
if (value == IntPtr.Zero)
|
||||||
|
return;
|
||||||
|
Objects [value] = new WeakReference (this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[DllImport ("gstreamer-0.10.dll") ]
|
||||||
|
static extern IntPtr gst_mini_object_get_type();
|
||||||
|
|
||||||
|
public static GLib.GType GType {
|
||||||
|
get {
|
||||||
|
IntPtr raw_ret = gst_mini_object_get_type();
|
||||||
|
GLib.GType ret = new GLib.GType (raw_ret);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected string TypeName {
|
||||||
|
get {
|
||||||
|
return NativeType.ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal GLib.GType NativeType {
|
||||||
|
get {
|
||||||
|
return LookupGType ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public IntPtr Handle {
|
||||||
|
get {
|
||||||
|
return handle;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public IntPtr OwnedHandle {
|
||||||
|
get {
|
||||||
|
return gst_mini_object_ref (handle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int GetHashCode () {
|
||||||
|
return Handle.GetHashCode ();
|
||||||
|
}
|
||||||
|
|
||||||
|
Hashtable data;
|
||||||
|
public Hashtable Data {
|
||||||
|
get {
|
||||||
|
if (data == null)
|
||||||
|
data = new Hashtable ();
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Hashtable persistent_data;
|
||||||
|
protected Hashtable PersistentData {
|
||||||
|
get {
|
||||||
|
if (persistent_data == null)
|
||||||
|
persistent_data = new Hashtable ();
|
||||||
|
|
||||||
|
return persistent_data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[DllImport ("libgobject-2.0-0.dll") ]
|
||||||
|
static extern bool g_type_check_instance_is_a (IntPtr obj, IntPtr gtype);
|
||||||
|
|
||||||
|
internal static bool IsMiniObject (IntPtr obj) {
|
||||||
|
return g_type_check_instance_is_a (obj, MiniObject.GType.Val);
|
||||||
|
}
|
||||||
|
|
||||||
|
internal int Refcount {
|
||||||
|
get {
|
||||||
|
GstMiniObject inst_struct = (GstMiniObject) Marshal.PtrToStructure (Handle, typeof (GstMiniObject));
|
||||||
|
return inst_struct.refcount;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Gst.MiniObjectFlags Flags {
|
||||||
|
get {
|
||||||
|
GstMiniObject inst_struct = (GstMiniObject) Marshal.PtrToStructure (Handle, typeof (GstMiniObject));
|
||||||
|
return inst_struct.flags;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
GstMiniObject inst_struct = (GstMiniObject) Marshal.PtrToStructure (Handle, typeof (GstMiniObject));
|
||||||
|
inst_struct.flags = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[DllImport ("gstreamer-0.10.dll") ]
|
||||||
|
static extern bool gst_mini_object_is_writable (IntPtr raw);
|
||||||
|
|
||||||
|
public bool IsWritable {
|
||||||
|
get {
|
||||||
|
bool raw_ret = gst_mini_object_is_writable (Handle);
|
||||||
|
bool ret = raw_ret;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[DllImport ("gstreamer-0.10.dll") ]
|
||||||
|
private static extern IntPtr gst_value_dup_mini_object (ref GLib.Value v);
|
||||||
|
|
||||||
|
public MiniObject (GLib.Value val) : base () {
|
||||||
|
Raw = gst_value_dup_mini_object (ref val);
|
||||||
|
}
|
||||||
|
|
||||||
|
[DllImport ("gstreamer-0.10.dll") ]
|
||||||
|
private static extern void gst_value_set_mini_object (ref GLib.Value v, IntPtr o);
|
||||||
|
|
||||||
|
public static explicit operator GLib.Value (MiniObject o) {
|
||||||
|
GLib.Value val = new GLib.Value (o.LookupGType ());
|
||||||
|
|
||||||
|
gst_value_set_mini_object (ref val, o.Handle);
|
||||||
|
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetGValue (ref GLib.Value val) {
|
||||||
|
gst_value_set_mini_object (ref val, Handle);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* FIXME: This is not optimal */
|
||||||
|
public void MakeWritable() {
|
||||||
|
if (IsWritable)
|
||||||
|
return;
|
||||||
|
|
||||||
|
IntPtr old = Handle;
|
||||||
|
IntPtr copy = gst_mini_object_copy (Handle);
|
||||||
|
Raw = copy;
|
||||||
|
gst_mini_object_unref (old);
|
||||||
|
}
|
||||||
|
|
||||||
|
[DllImport ("gstreamer-0.10.dll") ]
|
||||||
|
static extern IntPtr gst_mini_object_copy (IntPtr raw);
|
||||||
|
|
||||||
|
public Gst.MiniObject Copy() {
|
||||||
|
IntPtr raw_ret = gst_mini_object_copy (Handle);
|
||||||
|
return GetObject (raw_ret, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,51 +0,0 @@
|
||||||
protected MiniObject () : base ()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public MiniObject (GLib.Value val) : base () {
|
|
||||||
Raw = gst_value_dup_mini_object (ref val);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static explicit operator GLib.Value (MiniObject o) {
|
|
||||||
GLib.Value val = new GLib.Value (new GLib.GType (gstsharp_g_type_from_instance (o.Handle)));
|
|
||||||
|
|
||||||
gst_value_set_mini_object (ref val, o.Handle);
|
|
||||||
|
|
||||||
return val;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetGValue (ref GLib.Value val) {
|
|
||||||
gst_value_set_mini_object (ref val, Handle);
|
|
||||||
}
|
|
||||||
|
|
||||||
[DllImport ("gstreamersharpglue-0.10.dll") ]
|
|
||||||
private static extern IntPtr gstsharp_g_type_from_instance (IntPtr o);
|
|
||||||
[DllImport ("gstreamer-0.10.dll") ]
|
|
||||||
private static extern IntPtr gst_value_dup_mini_object (ref GLib.Value v);
|
|
||||||
[DllImport ("gstreamer-0.10.dll") ]
|
|
||||||
private static extern void gst_value_set_mini_object (ref GLib.Value v, IntPtr o);
|
|
||||||
|
|
||||||
/* FIXME: This is not optimal! */
|
|
||||||
public void MakeWritable() {
|
|
||||||
if (IsWritable)
|
|
||||||
return;
|
|
||||||
|
|
||||||
IntPtr copy = gst_mini_object_copy (Raw);
|
|
||||||
Raw = copy;
|
|
||||||
/* ^--- Takes a second ref, not good */
|
|
||||||
Unref (Raw);
|
|
||||||
/* ^--- Sets Owned = false, wrong! */
|
|
||||||
Owned = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
[DllImport ("gstreamer-0.10.dll") ]
|
|
||||||
static extern IntPtr gst_mini_object_copy (IntPtr raw);
|
|
||||||
|
|
||||||
public Gst.MiniObject Copy() {
|
|
||||||
IntPtr raw_ret = gst_mini_object_copy (Handle);
|
|
||||||
GLib.GType type = new GLib.GType (gstsharp_g_type_from_instance (raw_ret));
|
|
||||||
|
|
||||||
Gst.MiniObject ret = raw_ret == IntPtr.Zero ? null : (Gst.MiniObject) GLib.Opaque.GetOpaque (raw_ret, (Type) type, true);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ namespace Gst.Interfaces {
|
||||||
static extern IntPtr gst_navigation_message_new_mouse_over (IntPtr src, bool active);
|
static extern IntPtr gst_navigation_message_new_mouse_over (IntPtr src, bool active);
|
||||||
|
|
||||||
public static Gst.Message NewMouseOver (Gst.Object src, bool active) {
|
public static Gst.Message NewMouseOver (Gst.Object src, bool active) {
|
||||||
Message msg = (Message) GLib.Opaque.GetOpaque (gst_navigation_message_new_mouse_over (src.Handle, active), typeof (Message), true);
|
Message msg = (Message) Gst.MiniObject.GetObject (gst_navigation_message_new_mouse_over (src.Handle, active), true);
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ namespace Gst.Interfaces {
|
||||||
static extern IntPtr gst_navigation_message_new_angles_changed (IntPtr src, uint cur_angle, uint n_angles);
|
static extern IntPtr gst_navigation_message_new_angles_changed (IntPtr src, uint cur_angle, uint n_angles);
|
||||||
|
|
||||||
public static Gst.Message NewAnglesChanged (Gst.Object src, uint cur_angle, uint n_angles) {
|
public static Gst.Message NewAnglesChanged (Gst.Object src, uint cur_angle, uint n_angles) {
|
||||||
Message msg = (Message) GLib.Opaque.GetOpaque (gst_navigation_message_new_angles_changed (src.Handle, cur_angle, n_angles), typeof (Message), true);
|
Message msg = (Message) Gst.MiniObject.GetObject (gst_navigation_message_new_angles_changed (src.Handle, cur_angle, n_angles), true);
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ namespace Gst.Interfaces {
|
||||||
static extern IntPtr gst_navigation_message_new_commands_changed (IntPtr src);
|
static extern IntPtr gst_navigation_message_new_commands_changed (IntPtr src);
|
||||||
|
|
||||||
public static Gst.Message NewCommandsChanged (Gst.Object src) {
|
public static Gst.Message NewCommandsChanged (Gst.Object src) {
|
||||||
Message msg = (Message) GLib.Opaque.GetOpaque (gst_navigation_message_new_commands_changed (src.Handle), typeof (Message), true);
|
Message msg = (Message) Gst.MiniObject.GetObject (gst_navigation_message_new_commands_changed (src.Handle), true);
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ namespace Gst.Interfaces {
|
||||||
static extern IntPtr gst_navigation_query_new_commands ();
|
static extern IntPtr gst_navigation_query_new_commands ();
|
||||||
|
|
||||||
public static Gst.Query NewCommands () {
|
public static Gst.Query NewCommands () {
|
||||||
Gst.Query query = (Gst.Query) GLib.Opaque.GetOpaque (gst_navigation_query_new_commands (), typeof (Gst.Query), true);
|
Gst.Query query = (Gst.Query) Gst.MiniObject.GetObject (gst_navigation_query_new_commands (), true);
|
||||||
return query;
|
return query;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ namespace Gst.Interfaces {
|
||||||
static extern IntPtr gst_navigation_query_new_angles ();
|
static extern IntPtr gst_navigation_query_new_angles ();
|
||||||
|
|
||||||
public static Gst.Query NewAngles () {
|
public static Gst.Query NewAngles () {
|
||||||
Gst.Query query = (Gst.Query) GLib.Opaque.GetOpaque (gst_navigation_query_new_angles (), typeof (Gst.Query), true);
|
Gst.Query query = (Gst.Query) Gst.MiniObject.GetObject (gst_navigation_query_new_angles (), true);
|
||||||
return query;
|
return query;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ public Gst.FlowReturn AllocBuffer (ulong offset, int size, Gst.Caps caps, out Gs
|
||||||
IntPtr native_buf;
|
IntPtr native_buf;
|
||||||
int raw_ret = gst_pad_alloc_buffer (Handle, offset, size, caps == null ? IntPtr.Zero : caps.Handle, out native_buf);
|
int raw_ret = gst_pad_alloc_buffer (Handle, offset, size, caps == null ? IntPtr.Zero : caps.Handle, out native_buf);
|
||||||
Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret;
|
Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret;
|
||||||
buf = native_buf == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (native_buf, typeof (Gst.Buffer), true);
|
buf = native_buf == IntPtr.Zero ? null : (Gst.Buffer) Gst.MiniObject.GetObject (native_buf, true);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ public Gst.FlowReturn AllocBufferAndSetCaps (ulong offset, int size, Gst.Caps ca
|
||||||
IntPtr native_buf;
|
IntPtr native_buf;
|
||||||
int raw_ret = gst_pad_alloc_buffer_and_set_caps (Handle, offset, size, caps == null ? IntPtr.Zero : caps.Handle, out native_buf);
|
int raw_ret = gst_pad_alloc_buffer_and_set_caps (Handle, offset, size, caps == null ? IntPtr.Zero : caps.Handle, out native_buf);
|
||||||
Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret;
|
Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret;
|
||||||
buf = native_buf == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (native_buf, typeof (Gst.Buffer), true);
|
buf = native_buf == IntPtr.Zero ? null : (Gst.Buffer) Gst.MiniObject.GetObject (native_buf, true);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -277,7 +277,7 @@ public Gst.FlowReturn PullRange (ulong offset, uint size, out Gst.Buffer buffer)
|
||||||
IntPtr native_buffer;
|
IntPtr native_buffer;
|
||||||
int raw_ret = gst_pad_pull_range (Handle, offset, size, out native_buffer);
|
int raw_ret = gst_pad_pull_range (Handle, offset, size, out native_buffer);
|
||||||
Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret;
|
Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret;
|
||||||
buffer = native_buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (native_buffer, typeof (Gst.Buffer), true);
|
buffer = native_buffer == IntPtr.Zero ? null : (Gst.Buffer) Gst.MiniObject.GetObject (native_buffer, true);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ public string TypeName {
|
||||||
static extern IntPtr gst_query_new_application (QueryType type, IntPtr structure);
|
static extern IntPtr gst_query_new_application (QueryType type, IntPtr structure);
|
||||||
|
|
||||||
public static Query NewApplication (Gst.QueryType type, Structure structure) {
|
public static Query NewApplication (Gst.QueryType type, Structure structure) {
|
||||||
Query query = (Query) GLib.Opaque.GetOpaque (gst_query_new_application (type, (structure != null) ? structure.Handle : IntPtr.Zero), typeof (Query), true);
|
Query query = (Query) Gst.MiniObject.GetObject (gst_query_new_application (type, (structure != null) ? structure.Handle : IntPtr.Zero), true);
|
||||||
query.cached_structure = structure;
|
query.cached_structure = structure;
|
||||||
structure.FreeNative = false;
|
structure.FreeNative = false;
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ public static Query NewApplication (Gst.QueryType type, Structure structure) {
|
||||||
static extern IntPtr gst_query_new_convert (Gst.Format src_format, long value, Gst.Format dest_format);
|
static extern IntPtr gst_query_new_convert (Gst.Format src_format, long value, Gst.Format dest_format);
|
||||||
|
|
||||||
public static Query NewConvert (Gst.Format src_format, long value, Gst.Format dest_format) {
|
public static Query NewConvert (Gst.Format src_format, long value, Gst.Format dest_format) {
|
||||||
Query query = (Query) GLib.Opaque.GetOpaque (gst_query_new_convert (src_format, value, dest_format), typeof (Query), true);
|
Query query = (Query) Gst.MiniObject.GetObject (gst_query_new_convert (src_format, value, dest_format), true);
|
||||||
|
|
||||||
return query;
|
return query;
|
||||||
}
|
}
|
||||||
|
@ -76,7 +76,7 @@ public void ParseConvert (out Gst.Format src_format, out long src_value, out Gst
|
||||||
static extern IntPtr gst_query_new_position (Gst.Format format);
|
static extern IntPtr gst_query_new_position (Gst.Format format);
|
||||||
|
|
||||||
public static Query NewPosition (Gst.Format format) {
|
public static Query NewPosition (Gst.Format format) {
|
||||||
Query query = (Query) GLib.Opaque.GetOpaque (gst_query_new_position (format), typeof (Query), true);
|
Query query = (Query) Gst.MiniObject.GetObject (gst_query_new_position (format), true);
|
||||||
|
|
||||||
return query;
|
return query;
|
||||||
}
|
}
|
||||||
|
@ -107,7 +107,7 @@ public void ParsePosition (out Gst.Format format, out long cur) {
|
||||||
static extern IntPtr gst_query_new_duration (Gst.Format format);
|
static extern IntPtr gst_query_new_duration (Gst.Format format);
|
||||||
|
|
||||||
public static Query NewDuration (Gst.Format format) {
|
public static Query NewDuration (Gst.Format format) {
|
||||||
Query query = (Query) GLib.Opaque.GetOpaque (gst_query_new_duration (format), typeof (Query), true);
|
Query query = (Query) Gst.MiniObject.GetObject (gst_query_new_duration (format), true);
|
||||||
|
|
||||||
return query;
|
return query;
|
||||||
}
|
}
|
||||||
|
@ -138,7 +138,7 @@ public void ParseDuration (out Gst.Format format, out long duration) {
|
||||||
static extern IntPtr gst_query_new_latency ();
|
static extern IntPtr gst_query_new_latency ();
|
||||||
|
|
||||||
public static Query NewLatency() {
|
public static Query NewLatency() {
|
||||||
Query query = (Query) GLib.Opaque.GetOpaque (gst_query_new_latency (), typeof (Query), true);
|
Query query = (Query) Gst.MiniObject.GetObject (gst_query_new_latency (), true);
|
||||||
|
|
||||||
return query;
|
return query;
|
||||||
}
|
}
|
||||||
|
@ -169,7 +169,7 @@ public void ParseLatency (out bool live, out ulong min, out ulong max) {
|
||||||
static extern IntPtr gst_query_new_seeking (Gst.Format format);
|
static extern IntPtr gst_query_new_seeking (Gst.Format format);
|
||||||
|
|
||||||
public static Query NewSeeking (Gst.Format format) {
|
public static Query NewSeeking (Gst.Format format) {
|
||||||
Query query = (Query) GLib.Opaque.GetOpaque (gst_query_new_seeking (format), typeof (Query), true);
|
Query query = (Query) Gst.MiniObject.GetObject (gst_query_new_seeking (format), true);
|
||||||
|
|
||||||
return query;
|
return query;
|
||||||
}
|
}
|
||||||
|
@ -200,7 +200,7 @@ public void ParseSeeking (out Gst.Format format, out bool seekable, out long seg
|
||||||
static extern IntPtr gst_query_new_formats ();
|
static extern IntPtr gst_query_new_formats ();
|
||||||
|
|
||||||
public static Query NewFormats() {
|
public static Query NewFormats() {
|
||||||
Query query = (Query) GLib.Opaque.GetOpaque (gst_query_new_formats (), typeof (Query), true);
|
Query query = (Query) Gst.MiniObject.GetObject (gst_query_new_formats (), true);
|
||||||
|
|
||||||
return query;
|
return query;
|
||||||
}
|
}
|
||||||
|
@ -238,7 +238,7 @@ public void ParseFormats (out Gst.Format[] formats) {
|
||||||
static extern IntPtr gst_query_new_segment (Gst.Format format);
|
static extern IntPtr gst_query_new_segment (Gst.Format format);
|
||||||
|
|
||||||
public static Query NewSegment (Gst.Format format) {
|
public static Query NewSegment (Gst.Format format) {
|
||||||
Query query = (Query) GLib.Opaque.GetOpaque (gst_query_new_segment (format), typeof (Query), true);
|
Query query = (Query) Gst.MiniObject.GetObject (gst_query_new_segment (format), true);
|
||||||
|
|
||||||
return query;
|
return query;
|
||||||
}
|
}
|
||||||
|
@ -269,7 +269,7 @@ public void ParseSegment (out double rate, out Gst.Format format, out long segme
|
||||||
static extern IntPtr gst_query_new_buffering (Gst.Format format);
|
static extern IntPtr gst_query_new_buffering (Gst.Format format);
|
||||||
|
|
||||||
public static Query NewBuffering (Gst.Format format) {
|
public static Query NewBuffering (Gst.Format format) {
|
||||||
Query query = (Query) GLib.Opaque.GetOpaque (gst_query_new_buffering (format), typeof (Query), true);
|
Query query = (Query) Gst.MiniObject.GetObject (gst_query_new_buffering (format), true);
|
||||||
|
|
||||||
return query;
|
return query;
|
||||||
}
|
}
|
||||||
|
@ -344,7 +344,7 @@ public void ParseBufferingRange (out Gst.Format format, out long start, out long
|
||||||
static extern IntPtr gst_query_new_uri ();
|
static extern IntPtr gst_query_new_uri ();
|
||||||
|
|
||||||
public static Query NewUri() {
|
public static Query NewUri() {
|
||||||
Query query = (Query) GLib.Opaque.GetOpaque (gst_query_new_uri (), typeof (Query), true);
|
Query query = (Query) Gst.MiniObject.GetObject (gst_query_new_uri (), true);
|
||||||
|
|
||||||
return query;
|
return query;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue