gstreamer/gstreamer-sharp/IndexEntry.custom
Sebastian Dröge aa7bb8fa1c Use internal glib-sharp copy everywhere and make it work side-by-side with real glib-sharp
glib-sharp will only get a new release with the new API that we need for
3.0 in a year or something. Instead of waiting a year before we can release
something we now have our own internal copy of glib-sharp trunk that will
be dropped once glib-sharp 3.0 is released.

Everything is now compilable and working without any additional patches.
2009-08-05 16:57:20 +02:00

157 lines
4.6 KiB
Text

protected override Gst.GLib.Opaque Copy (IntPtr raw)
{
return Gst.GLib.Opaque.GetOpaque (raw, typeof (Gst.IndexEntry), true);
}
[DllImport ("gstreamersharpglue-0.10.dll") ]
extern static uint gstsharp_gst_index_entry_get_id_description_offset ();
static uint id_description_offset = gstsharp_gst_index_entry_get_id_description_offset ();
public string IdDescription {
get {
if (Type != Gst.IndexEntryType.Id)
throw new Exception ();
unsafe {
IntPtr* raw_ptr = (IntPtr*) ( ( (byte*) Handle) + id_description_offset);
return Gst.GLib.Marshaller.Utf8PtrToString (*raw_ptr);
}
}
}
[DllImport ("gstreamersharpglue-0.10.dll") ]
extern static uint gstsharp_gst_index_entry_get_assoc_nassocs_offset ();
static uint assoc_nassocs_offset = gstsharp_gst_index_entry_get_assoc_nassocs_offset ();
public int AssocNAssocs {
get {
if (Type != Gst.IndexEntryType.Association)
throw new Exception ();
unsafe {
int* raw_ptr = (int*) ( ( (byte*) Handle) + assoc_nassocs_offset);
return (*raw_ptr);
}
}
}
[DllImport ("gstreamersharpglue-0.10.dll") ]
extern static uint gstsharp_gst_index_entry_get_assoc_assocs_offset ();
static uint assoc_assocs_offset = gstsharp_gst_index_entry_get_assoc_assocs_offset ();
public Gst.IndexAssociation[] AssocAssocs {
get {
if (Type != Gst.IndexEntryType.Association)
throw new Exception ();
unsafe {
IntPtr* raw_ptr = (IntPtr*) ( ( (byte*) Handle) + assoc_assocs_offset);
Gst.IndexAssociation[] ret = new Gst.IndexAssociation[AssocNAssocs];
if (AssocNAssocs == 0)
return ret;
int unmanaged_struct_size = Marshal.SizeOf (typeof (Gst.IndexAssociation));
for (int i = 0; i < AssocNAssocs; i++)
ret[i] = Gst.IndexAssociation.New (new IntPtr ( (*raw_ptr).ToInt64() + i * unmanaged_struct_size));
return ret;
}
}
}
[DllImport ("gstreamersharpglue-0.10.dll") ]
extern static uint gstsharp_gst_index_entry_get_assoc_flags_offset ();
static uint assoc_flags_offset = gstsharp_gst_index_entry_get_assoc_flags_offset ();
public Gst.AssocFlags AssocFlags {
get {
if (Type != Gst.IndexEntryType.Association)
throw new Exception ();
unsafe {
int* raw_ptr = (int*) ( ( (byte*) Handle) + assoc_flags_offset);
return (Gst.AssocFlags) (*raw_ptr);
}
}
}
[DllImport ("gstreamersharpglue-0.10.dll") ]
extern static uint gstsharp_gst_index_entry_get_object_key_offset ();
static uint object_key_offset = gstsharp_gst_index_entry_get_object_key_offset ();
public string ObjectKey {
get {
if (Type != Gst.IndexEntryType.Object)
throw new Exception ();
unsafe {
IntPtr* raw_ptr = (IntPtr*) ( ( (byte*) Handle) + object_key_offset);
return Gst.GLib.Marshaller.Utf8PtrToString (*raw_ptr);
}
}
}
[DllImport ("gstreamersharpglue-0.10.dll") ]
extern static uint gstsharp_gst_index_entry_get_object_type_offset ();
static uint object_type_offset = gstsharp_gst_index_entry_get_object_type_offset ();
public Gst.GLib.GType ObjectGType {
get {
if (Type != Gst.IndexEntryType.Object)
throw new Exception ();
unsafe {
IntPtr* raw_ptr = (IntPtr*) ( ( (byte*) Handle) + object_type_offset);
return new Gst.GLib.GType (*raw_ptr);
}
}
}
[DllImport ("gstreamersharpglue-0.10.dll") ]
extern static uint gstsharp_gst_index_entry_get_object_object_offset ();
static uint object_object_offset = gstsharp_gst_index_entry_get_object_object_offset ();
public object ObjectObject {
get {
if (Type != Gst.IndexEntryType.Object)
throw new Exception ();
unsafe {
IntPtr* raw_ptr = (IntPtr*) ( ( (byte*) Handle) + object_object_offset);
return Gst.GLib.Object.GetObject (*raw_ptr, false);
}
}
}
[DllImport ("gstreamersharpglue-0.10.dll") ]
extern static uint gstsharp_gst_index_entry_get_format_format_offset ();
static uint format_format_offset = gstsharp_gst_index_entry_get_format_format_offset ();
public Gst.Format FormatFormat {
get {
if (Type != Gst.IndexEntryType.Format)
throw new Exception ();
unsafe {
int* raw_ptr = (int*) ( ( (byte*) Handle) + format_format_offset);
return (Gst.Format) (*raw_ptr);
}
}
}
[DllImport ("gstreamersharpglue-0.10.dll") ]
extern static uint gstsharp_gst_index_entry_get_format_key_offset ();
static uint format_key_offset = gstsharp_gst_index_entry_get_format_key_offset ();
public string FormatKey {
get {
if (Type != Gst.IndexEntryType.Format)
throw new Exception ();
unsafe {
IntPtr* raw_ptr = (IntPtr*) ( ( (byte*) Handle) + format_key_offset);
return Gst.GLib.Marshaller.Utf8PtrToString (*raw_ptr);
}
}
}