This commit is contained in:
Akkariin Meiko
2022-03-12 03:16:09 +08:00
Unverified
parent 12b76e0c7a
commit 27c4ec74a1
10075 changed files with 5122287 additions and 1 deletions
@@ -0,0 +1,701 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.App {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class AppSink : Gst.Base.BaseSink, Gst.IURIHandler {
public AppSink (IntPtr raw) : base(raw) {}
protected AppSink() : base(IntPtr.Zero)
{
CreateNativeObject (new string [0], new GLib.Value [0]);
}
[GLib.Property ("buffer-list")]
public bool BufferList {
get {
GLib.Value val = GetProperty ("buffer-list");
bool ret = (bool) val;
val.Dispose ();
return ret;
}
set {
GLib.Value val = new GLib.Value(value);
SetProperty("buffer-list", val);
val.Dispose ();
}
}
[DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_app_sink_get_caps(IntPtr raw);
[DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_app_sink_set_caps(IntPtr raw, IntPtr caps);
[GLib.Property ("caps")]
public Gst.Caps Caps {
get {
IntPtr raw_ret = gst_app_sink_get_caps(Handle);
Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true);
return ret;
}
set {
gst_app_sink_set_caps(Handle, value == null ? IntPtr.Zero : value.Handle);
}
}
[DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_app_sink_get_drop(IntPtr raw);
[DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_app_sink_set_drop(IntPtr raw, bool drop);
[GLib.Property ("drop")]
public bool Drop {
get {
bool raw_ret = gst_app_sink_get_drop(Handle);
bool ret = raw_ret;
return ret;
}
set {
gst_app_sink_set_drop(Handle, value);
}
}
[DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_app_sink_get_emit_signals(IntPtr raw);
[DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_app_sink_set_emit_signals(IntPtr raw, bool emit);
[GLib.Property ("emit-signals")]
public bool EmitSignals {
get {
bool raw_ret = gst_app_sink_get_emit_signals(Handle);
bool ret = raw_ret;
return ret;
}
set {
gst_app_sink_set_emit_signals(Handle, value);
}
}
[GLib.Property ("eos")]
public bool EosProp
{
get {
GLib.Value val = GetProperty ("eos");
bool ret = (bool) val;
val.Dispose ();
return ret;
}
}
[DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern uint gst_app_sink_get_max_buffers(IntPtr raw);
[DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_app_sink_set_max_buffers(IntPtr raw, uint max);
[GLib.Property ("max-buffers")]
public uint MaxBuffers {
get {
uint raw_ret = gst_app_sink_get_max_buffers(Handle);
uint ret = raw_ret;
return ret;
}
set {
gst_app_sink_set_max_buffers(Handle, value);
}
}
[DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_app_sink_get_wait_on_eos(IntPtr raw);
[DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_app_sink_set_wait_on_eos(IntPtr raw, bool wait);
[GLib.Property ("wait-on-eos")]
public bool WaitOnEos {
get {
bool raw_ret = gst_app_sink_get_wait_on_eos(Handle);
bool ret = raw_ret;
return ret;
}
set {
gst_app_sink_set_wait_on_eos(Handle, value);
}
}
[GLib.Signal("try-pull-sample")]
public event Gst.App.TryPullSampleEventHandler TryPullSampleEvent {
add {
this.AddSignalHandler ("try-pull-sample", value, typeof (Gst.App.TryPullSampleEventArgs));
}
remove {
this.RemoveSignalHandler ("try-pull-sample", value);
}
}
[GLib.Signal("eos")]
public event System.EventHandler Eos {
add {
this.AddSignalHandler ("eos", value);
}
remove {
this.RemoveSignalHandler ("eos", value);
}
}
[GLib.Signal("try-pull-preroll")]
public event Gst.App.TryPullPrerollEventHandler TryPullPrerollEvent {
add {
this.AddSignalHandler ("try-pull-preroll", value, typeof (Gst.App.TryPullPrerollEventArgs));
}
remove {
this.RemoveSignalHandler ("try-pull-preroll", value);
}
}
[GLib.Signal("new-preroll")]
public event Gst.App.NewPrerollHandler NewPreroll {
add {
this.AddSignalHandler ("new-preroll", value, typeof (Gst.App.NewPrerollArgs));
}
remove {
this.RemoveSignalHandler ("new-preroll", value);
}
}
[GLib.Signal("new-sample")]
public event Gst.App.NewSampleHandler NewSample {
add {
this.AddSignalHandler ("new-sample", value, typeof (Gst.App.NewSampleArgs));
}
remove {
this.RemoveSignalHandler ("new-sample", value);
}
}
static EosNativeDelegate Eos_cb_delegate;
static EosNativeDelegate EosVMCallback {
get {
if (Eos_cb_delegate == null)
Eos_cb_delegate = new EosNativeDelegate (Eos_cb);
return Eos_cb_delegate;
}
}
static void OverrideEos (GLib.GType gtype)
{
OverrideEos (gtype, EosVMCallback);
}
static void OverrideEos (GLib.GType gtype, EosNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("eos"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void EosNativeDelegate (IntPtr inst);
static void Eos_cb (IntPtr inst)
{
try {
AppSink __obj = GLib.Object.GetObject (inst, false) as AppSink;
__obj.OnEos ();
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gst.App.AppSink), ConnectionMethod="OverrideEos")]
protected virtual void OnEos ()
{
InternalEos ();
}
private void InternalEos ()
{
EosNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("eos"));
unmanaged = (EosNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(EosNativeDelegate));
}
if (unmanaged == null) return;
unmanaged (this.Handle);
}
static NewPrerollNativeDelegate NewPreroll_cb_delegate;
static NewPrerollNativeDelegate NewPrerollVMCallback {
get {
if (NewPreroll_cb_delegate == null)
NewPreroll_cb_delegate = new NewPrerollNativeDelegate (NewPreroll_cb);
return NewPreroll_cb_delegate;
}
}
static void OverrideNewPreroll (GLib.GType gtype)
{
OverrideNewPreroll (gtype, NewPrerollVMCallback);
}
static void OverrideNewPreroll (GLib.GType gtype, NewPrerollNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("new_preroll"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate int NewPrerollNativeDelegate (IntPtr inst);
static int NewPreroll_cb (IntPtr inst)
{
try {
AppSink __obj = GLib.Object.GetObject (inst, false) as AppSink;
Gst.FlowReturn __result;
__result = __obj.OnNewPreroll ();
return (int) __result;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw e;
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gst.App.AppSink), ConnectionMethod="OverrideNewPreroll")]
protected virtual Gst.FlowReturn OnNewPreroll ()
{
return InternalNewPreroll ();
}
private Gst.FlowReturn InternalNewPreroll ()
{
NewPrerollNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("new_preroll"));
unmanaged = (NewPrerollNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(NewPrerollNativeDelegate));
}
if (unmanaged == null) return (Gst.FlowReturn) 0;
int __result = unmanaged (this.Handle);
return (Gst.FlowReturn) __result;
}
static NewSampleNativeDelegate NewSample_cb_delegate;
static NewSampleNativeDelegate NewSampleVMCallback {
get {
if (NewSample_cb_delegate == null)
NewSample_cb_delegate = new NewSampleNativeDelegate (NewSample_cb);
return NewSample_cb_delegate;
}
}
static void OverrideNewSample (GLib.GType gtype)
{
OverrideNewSample (gtype, NewSampleVMCallback);
}
static void OverrideNewSample (GLib.GType gtype, NewSampleNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("new_sample"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate int NewSampleNativeDelegate (IntPtr inst);
static int NewSample_cb (IntPtr inst)
{
try {
AppSink __obj = GLib.Object.GetObject (inst, false) as AppSink;
Gst.FlowReturn __result;
__result = __obj.OnNewSample ();
return (int) __result;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw e;
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gst.App.AppSink), ConnectionMethod="OverrideNewSample")]
protected virtual Gst.FlowReturn OnNewSample ()
{
return InternalNewSample ();
}
private Gst.FlowReturn InternalNewSample ()
{
NewSampleNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("new_sample"));
unmanaged = (NewSampleNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(NewSampleNativeDelegate));
}
if (unmanaged == null) return (Gst.FlowReturn) 0;
int __result = unmanaged (this.Handle);
return (Gst.FlowReturn) __result;
}
static TryPullPrerollEventNativeDelegate TryPullPrerollEvent_cb_delegate;
static TryPullPrerollEventNativeDelegate TryPullPrerollEventVMCallback {
get {
if (TryPullPrerollEvent_cb_delegate == null)
TryPullPrerollEvent_cb_delegate = new TryPullPrerollEventNativeDelegate (TryPullPrerollEvent_cb);
return TryPullPrerollEvent_cb_delegate;
}
}
static void OverrideTryPullPrerollEvent (GLib.GType gtype)
{
OverrideTryPullPrerollEvent (gtype, TryPullPrerollEventVMCallback);
}
static void OverrideTryPullPrerollEvent (GLib.GType gtype, TryPullPrerollEventNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("try_pull_preroll"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr TryPullPrerollEventNativeDelegate (IntPtr inst, ulong timeout);
static IntPtr TryPullPrerollEvent_cb (IntPtr inst, ulong timeout)
{
try {
AppSink __obj = GLib.Object.GetObject (inst, false) as AppSink;
Gst.Sample __result;
__result = __obj.OnTryPullPrerollEvent (timeout);
return __result == null ? IntPtr.Zero : __result.OwnedCopy;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw e;
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gst.App.AppSink), ConnectionMethod="OverrideTryPullPrerollEvent")]
protected virtual Gst.Sample OnTryPullPrerollEvent (ulong timeout)
{
return InternalTryPullPrerollEvent (timeout);
}
private Gst.Sample InternalTryPullPrerollEvent (ulong timeout)
{
TryPullPrerollEventNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("try_pull_preroll"));
unmanaged = (TryPullPrerollEventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(TryPullPrerollEventNativeDelegate));
}
if (unmanaged == null) return null;
IntPtr __result = unmanaged (this.Handle, timeout);
return __result == IntPtr.Zero ? null : (Gst.Sample) GLib.Opaque.GetOpaque (__result, typeof (Gst.Sample), true);
}
static TryPullSampleEventNativeDelegate TryPullSampleEvent_cb_delegate;
static TryPullSampleEventNativeDelegate TryPullSampleEventVMCallback {
get {
if (TryPullSampleEvent_cb_delegate == null)
TryPullSampleEvent_cb_delegate = new TryPullSampleEventNativeDelegate (TryPullSampleEvent_cb);
return TryPullSampleEvent_cb_delegate;
}
}
static void OverrideTryPullSampleEvent (GLib.GType gtype)
{
OverrideTryPullSampleEvent (gtype, TryPullSampleEventVMCallback);
}
static void OverrideTryPullSampleEvent (GLib.GType gtype, TryPullSampleEventNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("try_pull_sample"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr TryPullSampleEventNativeDelegate (IntPtr inst, ulong timeout);
static IntPtr TryPullSampleEvent_cb (IntPtr inst, ulong timeout)
{
try {
AppSink __obj = GLib.Object.GetObject (inst, false) as AppSink;
Gst.Sample __result;
__result = __obj.OnTryPullSampleEvent (timeout);
return __result == null ? IntPtr.Zero : __result.OwnedCopy;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw e;
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gst.App.AppSink), ConnectionMethod="OverrideTryPullSampleEvent")]
protected virtual Gst.Sample OnTryPullSampleEvent (ulong timeout)
{
return InternalTryPullSampleEvent (timeout);
}
private Gst.Sample InternalTryPullSampleEvent (ulong timeout)
{
TryPullSampleEventNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("try_pull_sample"));
unmanaged = (TryPullSampleEventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(TryPullSampleEventNativeDelegate));
}
if (unmanaged == null) return null;
IntPtr __result = unmanaged (this.Handle, timeout);
return __result == IntPtr.Zero ? null : (Gst.Sample) GLib.Opaque.GetOpaque (__result, typeof (Gst.Sample), true);
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _class_abi = null;
static public new GLib.AbiStruct class_abi {
get {
if (_class_abi == null)
_class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("eos"
, Gst.Base.BaseSink.class_abi.Fields
, (uint) Marshal.SizeOf(typeof(IntPtr)) // eos
, null
, "new_preroll"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("new_preroll"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // new_preroll
, "eos"
, "new_sample"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("new_sample"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // new_sample
, "new_preroll"
, "pull_preroll"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("pull_preroll"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // pull_preroll
, "new_sample"
, "pull_sample"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("pull_sample"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // pull_sample
, "pull_preroll"
, "try_pull_preroll"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("try_pull_preroll"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // try_pull_preroll
, "pull_sample"
, "try_pull_sample"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("try_pull_sample"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // try_pull_sample
, "try_pull_preroll"
, "_gst_reserved"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("_gst_reserved"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) * 2 // _gst_reserved
, "try_pull_sample"
, null
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
});
return _class_abi;
}
}
// End of the ABI representation.
[DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_app_sink_get_type();
public static new GLib.GType GType {
get {
IntPtr raw_ret = gst_app_sink_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
}
[DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_app_sink_get_buffer_list_support(IntPtr raw);
[DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_app_sink_set_buffer_list_support(IntPtr raw, bool enable_lists);
public bool BufferListSupport {
get {
bool raw_ret = gst_app_sink_get_buffer_list_support(Handle);
bool ret = raw_ret;
return ret;
}
set {
gst_app_sink_set_buffer_list_support(Handle, value);
}
}
[DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_app_sink_is_eos(IntPtr raw);
public bool IsEos {
get {
bool raw_ret = gst_app_sink_is_eos(Handle);
bool ret = raw_ret;
return ret;
}
}
[DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_app_sink_pull_preroll(IntPtr raw);
public Gst.Sample PullPreroll() {
IntPtr raw_ret = gst_app_sink_pull_preroll(Handle);
Gst.Sample ret = raw_ret == IntPtr.Zero ? null : (Gst.Sample) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Sample), true);
return ret;
}
[DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_app_sink_pull_sample(IntPtr raw);
public Gst.Sample PullSample() {
IntPtr raw_ret = gst_app_sink_pull_sample(Handle);
Gst.Sample ret = raw_ret == IntPtr.Zero ? null : (Gst.Sample) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Sample), true);
return ret;
}
[DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_app_sink_try_pull_preroll(IntPtr raw, ulong timeout);
public Gst.Sample TryPullPreroll(ulong timeout) {
IntPtr raw_ret = gst_app_sink_try_pull_preroll(Handle, timeout);
Gst.Sample ret = raw_ret == IntPtr.Zero ? null : (Gst.Sample) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Sample), true);
return ret;
}
[DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_app_sink_try_pull_sample(IntPtr raw, ulong timeout);
public Gst.Sample TryPullSample(ulong timeout) {
IntPtr raw_ret = gst_app_sink_try_pull_sample(Handle, timeout);
Gst.Sample ret = raw_ret == IntPtr.Zero ? null : (Gst.Sample) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Sample), true);
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_uri_handler_get_uri(IntPtr raw);
public string Uri {
get {
IntPtr raw_ret = gst_uri_handler_get_uri(Handle);
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
return ret;
}
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gst_uri_handler_get_uri_type(IntPtr raw);
public Gst.URIType UriType {
get {
int raw_ret = gst_uri_handler_get_uri_type(Handle);
Gst.URIType ret = (Gst.URIType) raw_ret;
return ret;
}
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_uri_handler_set_uri(IntPtr raw, IntPtr uri, out IntPtr error);
public bool SetUri(string uri) {
IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri);
IntPtr error = IntPtr.Zero;
bool raw_ret = gst_uri_handler_set_uri(Handle, native_uri, out error);
bool ret = raw_ret;
GLib.Marshaller.Free (native_uri);
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
static AppSink ()
{
GtkSharp.GstreamerSharp.ObjectManager.Initialize ();
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public new GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("priv"
, Gst.Base.BaseSink.abi_info.Fields
, (uint) Marshal.SizeOf(typeof(IntPtr)) // priv
, null
, "_gst_reserved"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("_gst_reserved"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
, "priv"
, null
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}
@@ -0,0 +1,49 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.App {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
[StructLayout(LayoutKind.Sequential)]
public partial struct AppSinkCallbacks : IEquatable<AppSinkCallbacks> {
private IntPtr _eos;
private IntPtr _new_preroll;
private IntPtr _new_sample;
[MarshalAs (UnmanagedType.ByValArray, SizeConst=4)]
private IntPtr[] _gstGstReserved;
public static Gst.App.AppSinkCallbacks Zero = new Gst.App.AppSinkCallbacks ();
public static Gst.App.AppSinkCallbacks New(IntPtr raw) {
if (raw == IntPtr.Zero)
return Gst.App.AppSinkCallbacks.Zero;
return (Gst.App.AppSinkCallbacks) Marshal.PtrToStructure (raw, typeof (Gst.App.AppSinkCallbacks));
}
public bool Equals (AppSinkCallbacks other)
{
return true && _eos.Equals (other._eos) && _new_preroll.Equals (other._new_preroll) && _new_sample.Equals (other._new_sample);
}
public override bool Equals (object other)
{
return other is AppSinkCallbacks && Equals ((AppSinkCallbacks) other);
}
public override int GetHashCode ()
{
return this.GetType ().FullName.GetHashCode () ^ _eos.GetHashCode () ^ _new_preroll.GetHashCode () ^ _new_sample.GetHashCode ();
}
private static GLib.GType GType {
get { return GLib.GType.Pointer; }
}
#endregion
}
}
@@ -0,0 +1,929 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.App {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class AppSrc : Gst.Base.BaseSrc, Gst.IURIHandler {
public AppSrc (IntPtr raw) : base(raw) {}
protected AppSrc() : base(IntPtr.Zero)
{
CreateNativeObject (new string [0], new GLib.Value [0]);
}
[GLib.Property ("block")]
public bool Block {
get {
GLib.Value val = GetProperty ("block");
bool ret = (bool) val;
val.Dispose ();
return ret;
}
set {
GLib.Value val = new GLib.Value(value);
SetProperty("block", val);
val.Dispose ();
}
}
[DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_app_src_get_caps(IntPtr raw);
[DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_app_src_set_caps(IntPtr raw, IntPtr caps);
[GLib.Property ("caps")]
public Gst.Caps Caps {
get {
IntPtr raw_ret = gst_app_src_get_caps(Handle);
Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true);
return ret;
}
set {
gst_app_src_set_caps(Handle, value == null ? IntPtr.Zero : value.Handle);
}
}
[DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern ulong gst_app_src_get_current_level_bytes(IntPtr raw);
[GLib.Property ("current-level-bytes")]
public ulong CurrentLevelBytes {
get {
ulong raw_ret = gst_app_src_get_current_level_bytes(Handle);
ulong ret = raw_ret;
return ret;
}
}
[DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern ulong gst_app_src_get_duration(IntPtr raw);
[DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_app_src_set_duration(IntPtr raw, ulong duration);
[GLib.Property ("duration")]
public ulong Duration {
get {
ulong raw_ret = gst_app_src_get_duration(Handle);
ulong ret = raw_ret;
return ret;
}
set {
gst_app_src_set_duration(Handle, value);
}
}
[DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_app_src_get_emit_signals(IntPtr raw);
[DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_app_src_set_emit_signals(IntPtr raw, bool emit);
[GLib.Property ("emit-signals")]
public bool EmitSignals {
get {
bool raw_ret = gst_app_src_get_emit_signals(Handle);
bool ret = raw_ret;
return ret;
}
set {
gst_app_src_set_emit_signals(Handle, value);
}
}
[GLib.Property ("format")]
public Gst.Format Format {
get {
GLib.Value val = GetProperty ("format");
Gst.Format ret = (Gst.Format) (Enum) val;
val.Dispose ();
return ret;
}
set {
GLib.Value val = new GLib.Value((Enum) value);
SetProperty("format", val);
val.Dispose ();
}
}
[GLib.Property ("handle-segment-change")]
public bool HandleSegmentChange {
get {
GLib.Value val = GetProperty ("handle-segment-change");
bool ret = (bool) val;
val.Dispose ();
return ret;
}
set {
GLib.Value val = new GLib.Value(value);
SetProperty("handle-segment-change", val);
val.Dispose ();
}
}
[GLib.Property ("is-live")]
public bool IsLive {
get {
GLib.Value val = GetProperty ("is-live");
bool ret = (bool) val;
val.Dispose ();
return ret;
}
set {
GLib.Value val = new GLib.Value(value);
SetProperty("is-live", val);
val.Dispose ();
}
}
[DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern ulong gst_app_src_get_max_bytes(IntPtr raw);
[DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_app_src_set_max_bytes(IntPtr raw, ulong max);
[GLib.Property ("max-bytes")]
public ulong MaxBytes {
get {
ulong raw_ret = gst_app_src_get_max_bytes(Handle);
ulong ret = raw_ret;
return ret;
}
set {
gst_app_src_set_max_bytes(Handle, value);
}
}
[GLib.Property ("max-latency")]
public long MaxLatency {
get {
GLib.Value val = GetProperty ("max-latency");
long ret = (long) val;
val.Dispose ();
return ret;
}
set {
GLib.Value val = new GLib.Value(value);
SetProperty("max-latency", val);
val.Dispose ();
}
}
[GLib.Property ("min-latency")]
public long MinLatency {
get {
GLib.Value val = GetProperty ("min-latency");
long ret = (long) val;
val.Dispose ();
return ret;
}
set {
GLib.Value val = new GLib.Value(value);
SetProperty("min-latency", val);
val.Dispose ();
}
}
[GLib.Property ("min-percent")]
public uint MinPercent {
get {
GLib.Value val = GetProperty ("min-percent");
uint ret = (uint) val;
val.Dispose ();
return ret;
}
set {
GLib.Value val = new GLib.Value(value);
SetProperty("min-percent", val);
val.Dispose ();
}
}
[DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern long gst_app_src_get_size(IntPtr raw);
[DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_app_src_set_size(IntPtr raw, long size);
[GLib.Property ("size")]
public long Size {
get {
long raw_ret = gst_app_src_get_size(Handle);
long ret = raw_ret;
return ret;
}
set {
gst_app_src_set_size(Handle, value);
}
}
[DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gst_app_src_get_stream_type(IntPtr raw);
[DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_app_src_set_stream_type(IntPtr raw, int type);
[GLib.Property ("stream-type")]
public Gst.App.AppStreamType StreamType {
get {
int raw_ret = gst_app_src_get_stream_type(Handle);
Gst.App.AppStreamType ret = (Gst.App.AppStreamType) raw_ret;
return ret;
}
set {
gst_app_src_set_stream_type(Handle, (int) value);
}
}
[GLib.Signal("seek-data")]
public event Gst.App.SeekDataHandler SeekData {
add {
this.AddSignalHandler ("seek-data", value, typeof (Gst.App.SeekDataArgs));
}
remove {
this.RemoveSignalHandler ("seek-data", value);
}
}
[GLib.Signal("push-sample")]
public event Gst.App.PushSampleEventHandler PushSampleEvent {
add {
this.AddSignalHandler ("push-sample", value, typeof (Gst.App.PushSampleEventArgs));
}
remove {
this.RemoveSignalHandler ("push-sample", value);
}
}
[GLib.Signal("enough-data")]
public event System.EventHandler EnoughData {
add {
this.AddSignalHandler ("enough-data", value);
}
remove {
this.RemoveSignalHandler ("enough-data", value);
}
}
[GLib.Signal("need-data")]
public event Gst.App.NeedDataHandler NeedData {
add {
this.AddSignalHandler ("need-data", value, typeof (Gst.App.NeedDataArgs));
}
remove {
this.RemoveSignalHandler ("need-data", value);
}
}
[GLib.Signal("end-of-stream")]
public event Gst.App.EndOfStreamEventHandler EndOfStreamEvent {
add {
this.AddSignalHandler ("end-of-stream", value, typeof (Gst.App.EndOfStreamEventArgs));
}
remove {
this.RemoveSignalHandler ("end-of-stream", value);
}
}
[GLib.Signal("push-buffer")]
public event Gst.App.PushBufferEventHandler PushBufferEvent {
add {
this.AddSignalHandler ("push-buffer", value, typeof (Gst.App.PushBufferEventArgs));
}
remove {
this.RemoveSignalHandler ("push-buffer", value);
}
}
[GLib.Signal("push-buffer-list")]
public event Gst.App.PushBufferListEventHandler PushBufferListEvent {
add {
this.AddSignalHandler ("push-buffer-list", value, typeof (Gst.App.PushBufferListEventArgs));
}
remove {
this.RemoveSignalHandler ("push-buffer-list", value);
}
}
static NeedDataNativeDelegate NeedData_cb_delegate;
static NeedDataNativeDelegate NeedDataVMCallback {
get {
if (NeedData_cb_delegate == null)
NeedData_cb_delegate = new NeedDataNativeDelegate (NeedData_cb);
return NeedData_cb_delegate;
}
}
static void OverrideNeedData (GLib.GType gtype)
{
OverrideNeedData (gtype, NeedDataVMCallback);
}
static void OverrideNeedData (GLib.GType gtype, NeedDataNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("need_data"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void NeedDataNativeDelegate (IntPtr inst, uint _object);
static void NeedData_cb (IntPtr inst, uint _object)
{
try {
AppSrc __obj = GLib.Object.GetObject (inst, false) as AppSrc;
__obj.OnNeedData (_object);
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gst.App.AppSrc), ConnectionMethod="OverrideNeedData")]
protected virtual void OnNeedData (uint _object)
{
InternalNeedData (_object);
}
private void InternalNeedData (uint _object)
{
NeedDataNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("need_data"));
unmanaged = (NeedDataNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(NeedDataNativeDelegate));
}
if (unmanaged == null) return;
unmanaged (this.Handle, _object);
}
static EnoughDataNativeDelegate EnoughData_cb_delegate;
static EnoughDataNativeDelegate EnoughDataVMCallback {
get {
if (EnoughData_cb_delegate == null)
EnoughData_cb_delegate = new EnoughDataNativeDelegate (EnoughData_cb);
return EnoughData_cb_delegate;
}
}
static void OverrideEnoughData (GLib.GType gtype)
{
OverrideEnoughData (gtype, EnoughDataVMCallback);
}
static void OverrideEnoughData (GLib.GType gtype, EnoughDataNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("enough_data"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void EnoughDataNativeDelegate (IntPtr inst);
static void EnoughData_cb (IntPtr inst)
{
try {
AppSrc __obj = GLib.Object.GetObject (inst, false) as AppSrc;
__obj.OnEnoughData ();
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gst.App.AppSrc), ConnectionMethod="OverrideEnoughData")]
protected virtual void OnEnoughData ()
{
InternalEnoughData ();
}
private void InternalEnoughData ()
{
EnoughDataNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("enough_data"));
unmanaged = (EnoughDataNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(EnoughDataNativeDelegate));
}
if (unmanaged == null) return;
unmanaged (this.Handle);
}
static SeekDataNativeDelegate SeekData_cb_delegate;
static SeekDataNativeDelegate SeekDataVMCallback {
get {
if (SeekData_cb_delegate == null)
SeekData_cb_delegate = new SeekDataNativeDelegate (SeekData_cb);
return SeekData_cb_delegate;
}
}
static void OverrideSeekData (GLib.GType gtype)
{
OverrideSeekData (gtype, SeekDataVMCallback);
}
static void OverrideSeekData (GLib.GType gtype, SeekDataNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("seek_data"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool SeekDataNativeDelegate (IntPtr inst, ulong _object);
static bool SeekData_cb (IntPtr inst, ulong _object)
{
try {
AppSrc __obj = GLib.Object.GetObject (inst, false) as AppSrc;
bool __result;
__result = __obj.OnSeekData (_object);
return __result;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw e;
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gst.App.AppSrc), ConnectionMethod="OverrideSeekData")]
protected virtual bool OnSeekData (ulong _object)
{
return InternalSeekData (_object);
}
private bool InternalSeekData (ulong _object)
{
SeekDataNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("seek_data"));
unmanaged = (SeekDataNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SeekDataNativeDelegate));
}
if (unmanaged == null) return false;
bool __result = unmanaged (this.Handle, _object);
return __result;
}
static PushBufferEventNativeDelegate PushBufferEvent_cb_delegate;
static PushBufferEventNativeDelegate PushBufferEventVMCallback {
get {
if (PushBufferEvent_cb_delegate == null)
PushBufferEvent_cb_delegate = new PushBufferEventNativeDelegate (PushBufferEvent_cb);
return PushBufferEvent_cb_delegate;
}
}
static void OverridePushBufferEvent (GLib.GType gtype)
{
OverridePushBufferEvent (gtype, PushBufferEventVMCallback);
}
static void OverridePushBufferEvent (GLib.GType gtype, PushBufferEventNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("push_buffer"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate int PushBufferEventNativeDelegate (IntPtr inst, IntPtr _object);
static int PushBufferEvent_cb (IntPtr inst, IntPtr _object)
{
try {
AppSrc __obj = GLib.Object.GetObject (inst, false) as AppSrc;
Gst.FlowReturn __result;
__result = __obj.OnPushBufferEvent (_object == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (_object, typeof (Gst.Buffer), false));
return (int) __result;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw e;
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gst.App.AppSrc), ConnectionMethod="OverridePushBufferEvent")]
protected virtual Gst.FlowReturn OnPushBufferEvent (Gst.Buffer _object)
{
return InternalPushBufferEvent (_object);
}
private Gst.FlowReturn InternalPushBufferEvent (Gst.Buffer _object)
{
PushBufferEventNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("push_buffer"));
unmanaged = (PushBufferEventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PushBufferEventNativeDelegate));
}
if (unmanaged == null) return (Gst.FlowReturn) 0;
int __result = unmanaged (this.Handle, _object == null ? IntPtr.Zero : _object.Handle);
return (Gst.FlowReturn) __result;
}
static EndOfStreamEventNativeDelegate EndOfStreamEvent_cb_delegate;
static EndOfStreamEventNativeDelegate EndOfStreamEventVMCallback {
get {
if (EndOfStreamEvent_cb_delegate == null)
EndOfStreamEvent_cb_delegate = new EndOfStreamEventNativeDelegate (EndOfStreamEvent_cb);
return EndOfStreamEvent_cb_delegate;
}
}
static void OverrideEndOfStreamEvent (GLib.GType gtype)
{
OverrideEndOfStreamEvent (gtype, EndOfStreamEventVMCallback);
}
static void OverrideEndOfStreamEvent (GLib.GType gtype, EndOfStreamEventNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("end_of_stream"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate int EndOfStreamEventNativeDelegate (IntPtr inst);
static int EndOfStreamEvent_cb (IntPtr inst)
{
try {
AppSrc __obj = GLib.Object.GetObject (inst, false) as AppSrc;
Gst.FlowReturn __result;
__result = __obj.OnEndOfStreamEvent ();
return (int) __result;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw e;
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gst.App.AppSrc), ConnectionMethod="OverrideEndOfStreamEvent")]
protected virtual Gst.FlowReturn OnEndOfStreamEvent ()
{
return InternalEndOfStreamEvent ();
}
private Gst.FlowReturn InternalEndOfStreamEvent ()
{
EndOfStreamEventNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("end_of_stream"));
unmanaged = (EndOfStreamEventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(EndOfStreamEventNativeDelegate));
}
if (unmanaged == null) return (Gst.FlowReturn) 0;
int __result = unmanaged (this.Handle);
return (Gst.FlowReturn) __result;
}
static PushSampleEventNativeDelegate PushSampleEvent_cb_delegate;
static PushSampleEventNativeDelegate PushSampleEventVMCallback {
get {
if (PushSampleEvent_cb_delegate == null)
PushSampleEvent_cb_delegate = new PushSampleEventNativeDelegate (PushSampleEvent_cb);
return PushSampleEvent_cb_delegate;
}
}
static void OverridePushSampleEvent (GLib.GType gtype)
{
OverridePushSampleEvent (gtype, PushSampleEventVMCallback);
}
static void OverridePushSampleEvent (GLib.GType gtype, PushSampleEventNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("push_sample"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate int PushSampleEventNativeDelegate (IntPtr inst, IntPtr _object);
static int PushSampleEvent_cb (IntPtr inst, IntPtr _object)
{
try {
AppSrc __obj = GLib.Object.GetObject (inst, false) as AppSrc;
Gst.FlowReturn __result;
__result = __obj.OnPushSampleEvent (_object == IntPtr.Zero ? null : (Gst.Sample) GLib.Opaque.GetOpaque (_object, typeof (Gst.Sample), false));
return (int) __result;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw e;
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gst.App.AppSrc), ConnectionMethod="OverridePushSampleEvent")]
protected virtual Gst.FlowReturn OnPushSampleEvent (Gst.Sample _object)
{
return InternalPushSampleEvent (_object);
}
private Gst.FlowReturn InternalPushSampleEvent (Gst.Sample _object)
{
PushSampleEventNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("push_sample"));
unmanaged = (PushSampleEventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PushSampleEventNativeDelegate));
}
if (unmanaged == null) return (Gst.FlowReturn) 0;
int __result = unmanaged (this.Handle, _object == null ? IntPtr.Zero : _object.Handle);
return (Gst.FlowReturn) __result;
}
static PushBufferListEventNativeDelegate PushBufferListEvent_cb_delegate;
static PushBufferListEventNativeDelegate PushBufferListEventVMCallback {
get {
if (PushBufferListEvent_cb_delegate == null)
PushBufferListEvent_cb_delegate = new PushBufferListEventNativeDelegate (PushBufferListEvent_cb);
return PushBufferListEvent_cb_delegate;
}
}
static void OverridePushBufferListEvent (GLib.GType gtype)
{
OverridePushBufferListEvent (gtype, PushBufferListEventVMCallback);
}
static void OverridePushBufferListEvent (GLib.GType gtype, PushBufferListEventNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("push_buffer_list"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate int PushBufferListEventNativeDelegate (IntPtr inst, IntPtr _object);
static int PushBufferListEvent_cb (IntPtr inst, IntPtr _object)
{
try {
AppSrc __obj = GLib.Object.GetObject (inst, false) as AppSrc;
Gst.FlowReturn __result;
__result = __obj.OnPushBufferListEvent (_object == IntPtr.Zero ? null : (Gst.BufferList) GLib.Opaque.GetOpaque (_object, typeof (Gst.BufferList), false));
return (int) __result;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw e;
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gst.App.AppSrc), ConnectionMethod="OverridePushBufferListEvent")]
protected virtual Gst.FlowReturn OnPushBufferListEvent (Gst.BufferList _object)
{
return InternalPushBufferListEvent (_object);
}
private Gst.FlowReturn InternalPushBufferListEvent (Gst.BufferList _object)
{
PushBufferListEventNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("push_buffer_list"));
unmanaged = (PushBufferListEventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PushBufferListEventNativeDelegate));
}
if (unmanaged == null) return (Gst.FlowReturn) 0;
int __result = unmanaged (this.Handle, _object == null ? IntPtr.Zero : _object.Handle);
return (Gst.FlowReturn) __result;
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _class_abi = null;
static public new GLib.AbiStruct class_abi {
get {
if (_class_abi == null)
_class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("need_data"
, Gst.Base.BaseSrc.class_abi.Fields
, (uint) Marshal.SizeOf(typeof(IntPtr)) // need_data
, null
, "enough_data"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("enough_data"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // enough_data
, "need_data"
, "seek_data"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("seek_data"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // seek_data
, "enough_data"
, "push_buffer"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("push_buffer"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // push_buffer
, "seek_data"
, "end_of_stream"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("end_of_stream"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // end_of_stream
, "push_buffer"
, "push_sample"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("push_sample"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // push_sample
, "end_of_stream"
, "push_buffer_list"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("push_buffer_list"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // push_buffer_list
, "push_sample"
, "_gst_reserved"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("_gst_reserved"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) * 2 // _gst_reserved
, "push_buffer_list"
, null
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
});
return _class_abi;
}
}
// End of the ABI representation.
[DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_app_src_get_type();
public static new GLib.GType GType {
get {
IntPtr raw_ret = gst_app_src_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
}
[DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gst_app_src_end_of_stream(IntPtr raw);
public Gst.FlowReturn EndOfStream() {
int raw_ret = gst_app_src_end_of_stream(Handle);
Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret;
return ret;
}
[DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_app_src_get_latency(IntPtr raw, out ulong min, out ulong max);
public void GetLatency(out ulong min, out ulong max) {
gst_app_src_get_latency(Handle, out min, out max);
}
[DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gst_app_src_push_buffer(IntPtr raw, IntPtr buffer);
public Gst.FlowReturn PushBuffer(Gst.Buffer buffer) {
buffer.Owned = false;
int raw_ret = gst_app_src_push_buffer(Handle, buffer == null ? IntPtr.Zero : buffer.Handle);
Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret;
return ret;
}
[DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gst_app_src_push_buffer_list(IntPtr raw, IntPtr buffer_list);
public Gst.FlowReturn PushBufferList(Gst.BufferList buffer_list) {
buffer_list.Owned = false;
int raw_ret = gst_app_src_push_buffer_list(Handle, buffer_list == null ? IntPtr.Zero : buffer_list.Handle);
Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret;
return ret;
}
[DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gst_app_src_push_sample(IntPtr raw, IntPtr sample);
public Gst.FlowReturn PushSample(Gst.Sample sample) {
int raw_ret = gst_app_src_push_sample(Handle, sample == null ? IntPtr.Zero : sample.Handle);
Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret;
return ret;
}
[DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_app_src_set_latency(IntPtr raw, ulong min, ulong max);
public void SetLatency(ulong min, ulong max) {
gst_app_src_set_latency(Handle, min, max);
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_uri_handler_get_uri(IntPtr raw);
public string Uri {
get {
IntPtr raw_ret = gst_uri_handler_get_uri(Handle);
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
return ret;
}
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gst_uri_handler_get_uri_type(IntPtr raw);
public Gst.URIType UriType {
get {
int raw_ret = gst_uri_handler_get_uri_type(Handle);
Gst.URIType ret = (Gst.URIType) raw_ret;
return ret;
}
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_uri_handler_set_uri(IntPtr raw, IntPtr uri, out IntPtr error);
public bool SetUri(string uri) {
IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri);
IntPtr error = IntPtr.Zero;
bool raw_ret = gst_uri_handler_set_uri(Handle, native_uri, out error);
bool ret = raw_ret;
GLib.Marshaller.Free (native_uri);
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
static AppSrc ()
{
GtkSharp.GstreamerSharp.ObjectManager.Initialize ();
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public new GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("priv"
, Gst.Base.BaseSrc.abi_info.Fields
, (uint) Marshal.SizeOf(typeof(IntPtr)) // priv
, null
, "_gst_reserved"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("_gst_reserved"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
, "priv"
, null
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}
@@ -0,0 +1,49 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.App {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
[StructLayout(LayoutKind.Sequential)]
public partial struct AppSrcCallbacks : IEquatable<AppSrcCallbacks> {
private IntPtr _need_data;
private IntPtr _enough_data;
private IntPtr _seek_data;
[MarshalAs (UnmanagedType.ByValArray, SizeConst=4)]
private IntPtr[] _gstGstReserved;
public static Gst.App.AppSrcCallbacks Zero = new Gst.App.AppSrcCallbacks ();
public static Gst.App.AppSrcCallbacks New(IntPtr raw) {
if (raw == IntPtr.Zero)
return Gst.App.AppSrcCallbacks.Zero;
return (Gst.App.AppSrcCallbacks) Marshal.PtrToStructure (raw, typeof (Gst.App.AppSrcCallbacks));
}
public bool Equals (AppSrcCallbacks other)
{
return true && _need_data.Equals (other._need_data) && _enough_data.Equals (other._enough_data) && _seek_data.Equals (other._seek_data);
}
public override bool Equals (object other)
{
return other is AppSrcCallbacks && Equals ((AppSrcCallbacks) other);
}
public override int GetHashCode ()
{
return this.GetType ().FullName.GetHashCode () ^ _need_data.GetHashCode () ^ _enough_data.GetHashCode () ^ _seek_data.GetHashCode ();
}
private static GLib.GType GType {
get { return GLib.GType.Pointer; }
}
#endregion
}
}
@@ -0,0 +1,29 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.App {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[GLib.GType (typeof (Gst.App.AppStreamTypeGType))]
public enum AppStreamType {
Stream = 0,
Seekable = 1,
RandomAccess = 2,
}
internal class AppStreamTypeGType {
[DllImport ("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_app_stream_type_get_type ();
public static GLib.GType GType {
get {
return new GLib.GType (gst_app_stream_type_get_type ());
}
}
}
#endregion
}
@@ -0,0 +1,16 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.App {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class Constants {
#endregion
}
}
@@ -0,0 +1,12 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.App {
using System;
public delegate void EndOfStreamEventHandler(object o, EndOfStreamEventArgs args);
public class EndOfStreamEventArgs : GLib.SignalArgs {
}
}
@@ -0,0 +1,16 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.App {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class Global {
#endregion
}
}
@@ -0,0 +1,18 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.App {
using System;
public delegate void NeedDataHandler(object o, NeedDataArgs args);
public class NeedDataArgs : GLib.SignalArgs {
public uint Object{
get {
return (uint) Args [0];
}
}
}
}
@@ -0,0 +1,12 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.App {
using System;
public delegate void NewPrerollHandler(object o, NewPrerollArgs args);
public class NewPrerollArgs : GLib.SignalArgs {
}
}
@@ -0,0 +1,12 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.App {
using System;
public delegate void NewSampleHandler(object o, NewSampleArgs args);
public class NewSampleArgs : GLib.SignalArgs {
}
}
@@ -0,0 +1,18 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.App {
using System;
public delegate void PushBufferEventHandler(object o, PushBufferEventArgs args);
public class PushBufferEventArgs : GLib.SignalArgs {
public Gst.Buffer Object{
get {
return (Gst.Buffer) Args [0];
}
}
}
}
@@ -0,0 +1,18 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.App {
using System;
public delegate void PushBufferListEventHandler(object o, PushBufferListEventArgs args);
public class PushBufferListEventArgs : GLib.SignalArgs {
public Gst.BufferList Object{
get {
return (Gst.BufferList) Args [0];
}
}
}
}
@@ -0,0 +1,18 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.App {
using System;
public delegate void PushSampleEventHandler(object o, PushSampleEventArgs args);
public class PushSampleEventArgs : GLib.SignalArgs {
public Gst.Sample Object{
get {
return (Gst.Sample) Args [0];
}
}
}
}
@@ -0,0 +1,18 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.App {
using System;
public delegate void SeekDataHandler(object o, SeekDataArgs args);
public class SeekDataArgs : GLib.SignalArgs {
public ulong Object{
get {
return (ulong) Args [0];
}
}
}
}
@@ -0,0 +1,18 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.App {
using System;
public delegate void TryPullPrerollEventHandler(object o, TryPullPrerollEventArgs args);
public class TryPullPrerollEventArgs : GLib.SignalArgs {
public ulong Timeout{
get {
return (ulong) Args [0];
}
}
}
}
@@ -0,0 +1,18 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.App {
using System;
public delegate void TryPullSampleEventHandler(object o, TryPullSampleEventArgs args);
public class TryPullSampleEventArgs : GLib.SignalArgs {
public ulong Timeout{
get {
return (ulong) Args [0];
}
}
}
}
@@ -0,0 +1,527 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class AudioBaseSink : Gst.Base.BaseSink {
public AudioBaseSink (IntPtr raw) : base(raw) {}
protected AudioBaseSink() : base(IntPtr.Zero)
{
CreateNativeObject (new string [0], new GLib.Value [0]);
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern ulong gst_audio_base_sink_get_alignment_threshold(IntPtr raw);
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_audio_base_sink_set_alignment_threshold(IntPtr raw, ulong alignment_threshold);
[GLib.Property ("alignment-threshold")]
public ulong AlignmentThreshold {
get {
ulong raw_ret = gst_audio_base_sink_get_alignment_threshold(Handle);
ulong ret = raw_ret;
return ret;
}
set {
gst_audio_base_sink_set_alignment_threshold(Handle, value);
}
}
[GLib.Property ("buffer-time")]
public long BufferTime {
get {
GLib.Value val = GetProperty ("buffer-time");
long ret = (long) val;
val.Dispose ();
return ret;
}
set {
GLib.Value val = new GLib.Value(value);
SetProperty("buffer-time", val);
val.Dispose ();
}
}
[GLib.Property ("can-activate-pull")]
public bool CanActivatePull {
get {
GLib.Value val = GetProperty ("can-activate-pull");
bool ret = (bool) val;
val.Dispose ();
return ret;
}
set {
GLib.Value val = new GLib.Value(value);
SetProperty("can-activate-pull", val);
val.Dispose ();
}
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern ulong gst_audio_base_sink_get_discont_wait(IntPtr raw);
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_audio_base_sink_set_discont_wait(IntPtr raw, ulong discont_wait);
[GLib.Property ("discont-wait")]
public ulong DiscontWait {
get {
ulong raw_ret = gst_audio_base_sink_get_discont_wait(Handle);
ulong ret = raw_ret;
return ret;
}
set {
gst_audio_base_sink_set_discont_wait(Handle, value);
}
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern long gst_audio_base_sink_get_drift_tolerance(IntPtr raw);
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_audio_base_sink_set_drift_tolerance(IntPtr raw, long drift_tolerance);
[GLib.Property ("drift-tolerance")]
public long DriftTolerance {
get {
long raw_ret = gst_audio_base_sink_get_drift_tolerance(Handle);
long ret = raw_ret;
return ret;
}
set {
gst_audio_base_sink_set_drift_tolerance(Handle, value);
}
}
[GLib.Property ("latency-time")]
public long LatencyTime {
get {
GLib.Value val = GetProperty ("latency-time");
long ret = (long) val;
val.Dispose ();
return ret;
}
set {
GLib.Value val = new GLib.Value(value);
SetProperty("latency-time", val);
val.Dispose ();
}
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_audio_base_sink_get_provide_clock(IntPtr raw);
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_audio_base_sink_set_provide_clock(IntPtr raw, bool provide);
[GLib.Property ("provide-clock")]
public bool ProvideClock {
get {
bool raw_ret = gst_audio_base_sink_get_provide_clock(Handle);
bool ret = raw_ret;
return ret;
}
set {
gst_audio_base_sink_set_provide_clock(Handle, value);
}
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gst_audio_base_sink_get_slave_method(IntPtr raw);
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_audio_base_sink_set_slave_method(IntPtr raw, int method);
[GLib.Property ("slave-method")]
public Gst.Audio.AudioBaseSinkSlaveMethod SlaveMethod {
get {
int raw_ret = gst_audio_base_sink_get_slave_method(Handle);
Gst.Audio.AudioBaseSinkSlaveMethod ret = (Gst.Audio.AudioBaseSinkSlaveMethod) raw_ret;
return ret;
}
set {
gst_audio_base_sink_set_slave_method(Handle, (int) value);
}
}
public Gst.Audio.AudioRingBuffer Ringbuffer {
get {
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("ringbuffer"));
return GLib.Object.GetObject((*raw_ptr)) as Gst.Audio.AudioRingBuffer;
}
}
}
public ulong BufferTimeField {
get {
unsafe {
ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("buffer_time"));
return (*raw_ptr);
}
}
}
public ulong LatencyTimeField {
get {
unsafe {
ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("latency_time"));
return (*raw_ptr);
}
}
}
public ulong NextSample {
get {
unsafe {
ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("next_sample"));
return (*raw_ptr);
}
}
}
public Gst.Clock ProvidedClock {
get {
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("provided_clock"));
return GLib.Object.GetObject((*raw_ptr)) as Gst.Clock;
}
}
}
public bool EosRendering {
get {
unsafe {
bool* raw_ptr = (bool*)(((byte*)Handle) + abi_info.GetFieldOffset("eos_rendering"));
return (*raw_ptr);
}
}
}
static CreateRingbufferNativeDelegate CreateRingbuffer_cb_delegate;
static CreateRingbufferNativeDelegate CreateRingbufferVMCallback {
get {
if (CreateRingbuffer_cb_delegate == null)
CreateRingbuffer_cb_delegate = new CreateRingbufferNativeDelegate (CreateRingbuffer_cb);
return CreateRingbuffer_cb_delegate;
}
}
static void OverrideCreateRingbuffer (GLib.GType gtype)
{
OverrideCreateRingbuffer (gtype, CreateRingbufferVMCallback);
}
static void OverrideCreateRingbuffer (GLib.GType gtype, CreateRingbufferNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("create_ringbuffer"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr CreateRingbufferNativeDelegate (IntPtr inst);
static IntPtr CreateRingbuffer_cb (IntPtr inst)
{
try {
AudioBaseSink __obj = GLib.Object.GetObject (inst, false) as AudioBaseSink;
Gst.Audio.AudioRingBuffer __result;
__result = __obj.OnCreateRingbuffer ();
return __result == null ? IntPtr.Zero : __result.Handle;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw e;
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioBaseSink), ConnectionMethod="OverrideCreateRingbuffer")]
protected virtual Gst.Audio.AudioRingBuffer OnCreateRingbuffer ()
{
return InternalCreateRingbuffer ();
}
private Gst.Audio.AudioRingBuffer InternalCreateRingbuffer ()
{
CreateRingbufferNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("create_ringbuffer"));
unmanaged = (CreateRingbufferNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CreateRingbufferNativeDelegate));
}
if (unmanaged == null) return null;
IntPtr __result = unmanaged (this.Handle);
return GLib.Object.GetObject(__result) as Gst.Audio.AudioRingBuffer;
}
static PayloadNativeDelegate Payload_cb_delegate;
static PayloadNativeDelegate PayloadVMCallback {
get {
if (Payload_cb_delegate == null)
Payload_cb_delegate = new PayloadNativeDelegate (Payload_cb);
return Payload_cb_delegate;
}
}
static void OverridePayload (GLib.GType gtype)
{
OverridePayload (gtype, PayloadVMCallback);
}
static void OverridePayload (GLib.GType gtype, PayloadNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("payload"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr PayloadNativeDelegate (IntPtr inst, IntPtr buffer);
static IntPtr Payload_cb (IntPtr inst, IntPtr buffer)
{
try {
AudioBaseSink __obj = GLib.Object.GetObject (inst, false) as AudioBaseSink;
Gst.Buffer __result;
__result = __obj.OnPayload (buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buffer, typeof (Gst.Buffer), false));
return __result == null ? IntPtr.Zero : __result.OwnedCopy;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw e;
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioBaseSink), ConnectionMethod="OverridePayload")]
protected virtual Gst.Buffer OnPayload (Gst.Buffer buffer)
{
return InternalPayload (buffer);
}
private Gst.Buffer InternalPayload (Gst.Buffer buffer)
{
PayloadNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("payload"));
unmanaged = (PayloadNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PayloadNativeDelegate));
}
if (unmanaged == null) return null;
IntPtr __result = unmanaged (this.Handle, buffer == null ? IntPtr.Zero : buffer.Handle);
return __result == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (__result, typeof (Gst.Buffer), true);
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _class_abi = null;
static public new GLib.AbiStruct class_abi {
get {
if (_class_abi == null)
_class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("create_ringbuffer"
, Gst.Base.BaseSink.class_abi.Fields
, (uint) Marshal.SizeOf(typeof(IntPtr)) // create_ringbuffer
, null
, "payload"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("payload"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // payload
, "create_ringbuffer"
, "_gst_reserved"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("_gst_reserved"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
, "payload"
, null
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
});
return _class_abi;
}
}
// End of the ABI representation.
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_base_sink_get_type();
public static new GLib.GType GType {
get {
IntPtr raw_ret = gst_audio_base_sink_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_base_sink_create_ringbuffer(IntPtr raw);
public Gst.Audio.AudioRingBuffer CreateRingbuffer() {
IntPtr raw_ret = gst_audio_base_sink_create_ringbuffer(Handle);
Gst.Audio.AudioRingBuffer ret = GLib.Object.GetObject(raw_ret) as Gst.Audio.AudioRingBuffer;
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_audio_base_sink_report_device_failure(IntPtr raw);
public void ReportDeviceFailure() {
gst_audio_base_sink_report_device_failure(Handle);
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_audio_base_sink_set_custom_slaving_callback(IntPtr raw, Gst.AudioSharp.AudioBaseSinkCustomSlavingCallbackNative cb, IntPtr user_data, GLib.DestroyNotify notify);
public Gst.Audio.AudioBaseSinkCustomSlavingCallback CustomSlavingCallback {
set {
Gst.AudioSharp.AudioBaseSinkCustomSlavingCallbackWrapper value_wrapper = new Gst.AudioSharp.AudioBaseSinkCustomSlavingCallbackWrapper (value);
IntPtr user_data;
GLib.DestroyNotify notify;
if (value == null) {
user_data = IntPtr.Zero;
notify = null;
} else {
user_data = (IntPtr) GCHandle.Alloc (value_wrapper);
notify = GLib.DestroyHelper.NotifyHandler;
}
gst_audio_base_sink_set_custom_slaving_callback(Handle, value_wrapper.NativeDelegate, user_data, notify);
}
}
static AudioBaseSink ()
{
GtkSharp.GstreamerSharp.ObjectManager.Initialize ();
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public new GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("ringbuffer"
, Gst.Base.BaseSink.abi_info.Fields
, (uint) Marshal.SizeOf(typeof(IntPtr)) // ringbuffer
, null
, "buffer_time"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("buffer_time"
, -1
, (uint) Marshal.SizeOf(typeof(ulong)) // buffer_time
, "ringbuffer"
, "latency_time"
, (long) Marshal.OffsetOf(typeof(GstAudioBaseSink_buffer_timeAlign), "buffer_time")
, 0
),
new GLib.AbiField("latency_time"
, -1
, (uint) Marshal.SizeOf(typeof(ulong)) // latency_time
, "buffer_time"
, "next_sample"
, (long) Marshal.OffsetOf(typeof(GstAudioBaseSink_latency_timeAlign), "latency_time")
, 0
),
new GLib.AbiField("next_sample"
, -1
, (uint) Marshal.SizeOf(typeof(ulong)) // next_sample
, "latency_time"
, "provided_clock"
, (long) Marshal.OffsetOf(typeof(GstAudioBaseSink_next_sampleAlign), "next_sample")
, 0
),
new GLib.AbiField("provided_clock"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // provided_clock
, "next_sample"
, "eos_rendering"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("eos_rendering"
, -1
, (uint) Marshal.SizeOf(typeof(bool)) // eos_rendering
, "provided_clock"
, "priv"
, (long) Marshal.OffsetOf(typeof(GstAudioBaseSink_eos_renderingAlign), "eos_rendering")
, 0
),
new GLib.AbiField("priv"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // priv
, "eos_rendering"
, "_gst_reserved"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("_gst_reserved"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
, "priv"
, null
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
});
return _abi_info;
}
}
[StructLayout(LayoutKind.Sequential)]
public struct GstAudioBaseSink_buffer_timeAlign
{
sbyte f1;
private ulong buffer_time;
}
[StructLayout(LayoutKind.Sequential)]
public struct GstAudioBaseSink_latency_timeAlign
{
sbyte f1;
private ulong latency_time;
}
[StructLayout(LayoutKind.Sequential)]
public struct GstAudioBaseSink_next_sampleAlign
{
sbyte f1;
private ulong next_sample;
}
[StructLayout(LayoutKind.Sequential)]
public struct GstAudioBaseSink_eos_renderingAlign
{
sbyte f1;
private bool eos_rendering;
}
// End of the ABI representation.
#endregion
}
}
@@ -0,0 +1,10 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
public delegate void AudioBaseSinkCustomSlavingCallback(Gst.Audio.AudioBaseSink sink, ulong etime, ulong itime, long requested_skew, Gst.Audio.AudioBaseSinkDiscontReason discont_reason);
}
@@ -0,0 +1,32 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[GLib.GType (typeof (Gst.Audio.AudioBaseSinkDiscontReasonGType))]
public enum AudioBaseSinkDiscontReason {
NoDiscont = 0,
NewCaps = 1,
Flush = 2,
SyncLatency = 3,
Alignment = 4,
DeviceFailure = 5,
}
internal class AudioBaseSinkDiscontReasonGType {
[DllImport ("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_base_sink_discont_reason_get_type ();
public static GLib.GType GType {
get {
return new GLib.GType (gst_audio_base_sink_discont_reason_get_type ());
}
}
}
#endregion
}
@@ -0,0 +1,30 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[GLib.GType (typeof (Gst.Audio.AudioBaseSinkSlaveMethodGType))]
public enum AudioBaseSinkSlaveMethod {
Resample = 0,
Skew = 1,
None = 2,
Custom = 3,
}
internal class AudioBaseSinkSlaveMethodGType {
[DllImport ("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_base_sink_slave_method_get_type ();
public static GLib.GType GType {
get {
return new GLib.GType (gst_audio_base_sink_slave_method_get_type ());
}
}
}
#endregion
}
@@ -0,0 +1,362 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class AudioBaseSrc : Gst.Base.PushSrc {
public AudioBaseSrc (IntPtr raw) : base(raw) {}
protected AudioBaseSrc() : base(IntPtr.Zero)
{
CreateNativeObject (new string [0], new GLib.Value [0]);
}
[GLib.Property ("actual-buffer-time")]
public long ActualBufferTime {
get {
GLib.Value val = GetProperty ("actual-buffer-time");
long ret = (long) val;
val.Dispose ();
return ret;
}
}
[GLib.Property ("actual-latency-time")]
public long ActualLatencyTime {
get {
GLib.Value val = GetProperty ("actual-latency-time");
long ret = (long) val;
val.Dispose ();
return ret;
}
}
[GLib.Property ("buffer-time")]
public long BufferTime {
get {
GLib.Value val = GetProperty ("buffer-time");
long ret = (long) val;
val.Dispose ();
return ret;
}
set {
GLib.Value val = new GLib.Value(value);
SetProperty("buffer-time", val);
val.Dispose ();
}
}
[GLib.Property ("latency-time")]
public long LatencyTime {
get {
GLib.Value val = GetProperty ("latency-time");
long ret = (long) val;
val.Dispose ();
return ret;
}
set {
GLib.Value val = new GLib.Value(value);
SetProperty("latency-time", val);
val.Dispose ();
}
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_audio_base_src_get_provide_clock(IntPtr raw);
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_audio_base_src_set_provide_clock(IntPtr raw, bool provide);
[GLib.Property ("provide-clock")]
public bool ProvideClock {
get {
bool raw_ret = gst_audio_base_src_get_provide_clock(Handle);
bool ret = raw_ret;
return ret;
}
set {
gst_audio_base_src_set_provide_clock(Handle, value);
}
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gst_audio_base_src_get_slave_method(IntPtr raw);
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_audio_base_src_set_slave_method(IntPtr raw, int method);
[GLib.Property ("slave-method")]
public Gst.Audio.AudioBaseSrcSlaveMethod SlaveMethod {
get {
int raw_ret = gst_audio_base_src_get_slave_method(Handle);
Gst.Audio.AudioBaseSrcSlaveMethod ret = (Gst.Audio.AudioBaseSrcSlaveMethod) raw_ret;
return ret;
}
set {
gst_audio_base_src_set_slave_method(Handle, (int) value);
}
}
public Gst.Audio.AudioRingBuffer Ringbuffer {
get {
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("ringbuffer"));
return GLib.Object.GetObject((*raw_ptr)) as Gst.Audio.AudioRingBuffer;
}
}
}
public ulong BufferTimeField {
get {
unsafe {
ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("buffer_time"));
return (*raw_ptr);
}
}
}
public ulong LatencyTimeField {
get {
unsafe {
ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("latency_time"));
return (*raw_ptr);
}
}
}
public ulong NextSample {
get {
unsafe {
ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("next_sample"));
return (*raw_ptr);
}
}
}
public Gst.Clock Clock {
get {
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("clock"));
return GLib.Object.GetObject((*raw_ptr)) as Gst.Clock;
}
}
}
static CreateRingbufferNativeDelegate CreateRingbuffer_cb_delegate;
static CreateRingbufferNativeDelegate CreateRingbufferVMCallback {
get {
if (CreateRingbuffer_cb_delegate == null)
CreateRingbuffer_cb_delegate = new CreateRingbufferNativeDelegate (CreateRingbuffer_cb);
return CreateRingbuffer_cb_delegate;
}
}
static void OverrideCreateRingbuffer (GLib.GType gtype)
{
OverrideCreateRingbuffer (gtype, CreateRingbufferVMCallback);
}
static void OverrideCreateRingbuffer (GLib.GType gtype, CreateRingbufferNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("create_ringbuffer"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr CreateRingbufferNativeDelegate (IntPtr inst);
static IntPtr CreateRingbuffer_cb (IntPtr inst)
{
try {
AudioBaseSrc __obj = GLib.Object.GetObject (inst, false) as AudioBaseSrc;
Gst.Audio.AudioRingBuffer __result;
__result = __obj.OnCreateRingbuffer ();
return __result == null ? IntPtr.Zero : __result.Handle;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw e;
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioBaseSrc), ConnectionMethod="OverrideCreateRingbuffer")]
protected virtual Gst.Audio.AudioRingBuffer OnCreateRingbuffer ()
{
return InternalCreateRingbuffer ();
}
private Gst.Audio.AudioRingBuffer InternalCreateRingbuffer ()
{
CreateRingbufferNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("create_ringbuffer"));
unmanaged = (CreateRingbufferNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CreateRingbufferNativeDelegate));
}
if (unmanaged == null) return null;
IntPtr __result = unmanaged (this.Handle);
return GLib.Object.GetObject(__result) as Gst.Audio.AudioRingBuffer;
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _class_abi = null;
static public new GLib.AbiStruct class_abi {
get {
if (_class_abi == null)
_class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("create_ringbuffer"
, Gst.Base.PushSrc.class_abi.Fields
, (uint) Marshal.SizeOf(typeof(IntPtr)) // create_ringbuffer
, null
, "_gst_reserved"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("_gst_reserved"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
, "create_ringbuffer"
, null
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
});
return _class_abi;
}
}
// End of the ABI representation.
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_base_src_get_type();
public static new GLib.GType GType {
get {
IntPtr raw_ret = gst_audio_base_src_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_base_src_create_ringbuffer(IntPtr raw);
public Gst.Audio.AudioRingBuffer CreateRingbuffer() {
IntPtr raw_ret = gst_audio_base_src_create_ringbuffer(Handle);
Gst.Audio.AudioRingBuffer ret = GLib.Object.GetObject(raw_ret) as Gst.Audio.AudioRingBuffer;
return ret;
}
static AudioBaseSrc ()
{
GtkSharp.GstreamerSharp.ObjectManager.Initialize ();
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public new GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("ringbuffer"
, Gst.Base.PushSrc.abi_info.Fields
, (uint) Marshal.SizeOf(typeof(IntPtr)) // ringbuffer
, null
, "buffer_time"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("buffer_time"
, -1
, (uint) Marshal.SizeOf(typeof(ulong)) // buffer_time
, "ringbuffer"
, "latency_time"
, (long) Marshal.OffsetOf(typeof(GstAudioBaseSrc_buffer_timeAlign), "buffer_time")
, 0
),
new GLib.AbiField("latency_time"
, -1
, (uint) Marshal.SizeOf(typeof(ulong)) // latency_time
, "buffer_time"
, "next_sample"
, (long) Marshal.OffsetOf(typeof(GstAudioBaseSrc_latency_timeAlign), "latency_time")
, 0
),
new GLib.AbiField("next_sample"
, -1
, (uint) Marshal.SizeOf(typeof(ulong)) // next_sample
, "latency_time"
, "clock"
, (long) Marshal.OffsetOf(typeof(GstAudioBaseSrc_next_sampleAlign), "next_sample")
, 0
),
new GLib.AbiField("clock"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // clock
, "next_sample"
, "priv"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("priv"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // priv
, "clock"
, "_gst_reserved"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("_gst_reserved"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
, "priv"
, null
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
});
return _abi_info;
}
}
[StructLayout(LayoutKind.Sequential)]
public struct GstAudioBaseSrc_buffer_timeAlign
{
sbyte f1;
private ulong buffer_time;
}
[StructLayout(LayoutKind.Sequential)]
public struct GstAudioBaseSrc_latency_timeAlign
{
sbyte f1;
private ulong latency_time;
}
[StructLayout(LayoutKind.Sequential)]
public struct GstAudioBaseSrc_next_sampleAlign
{
sbyte f1;
private ulong next_sample;
}
// End of the ABI representation.
#endregion
}
}
@@ -0,0 +1,30 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[GLib.GType (typeof (Gst.Audio.AudioBaseSrcSlaveMethodGType))]
public enum AudioBaseSrcSlaveMethod {
Resample = 0,
ReTimestamp = 1,
Skew = 2,
None = 3,
}
internal class AudioBaseSrcSlaveMethodGType {
[DllImport ("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_base_src_slave_method_get_type ();
public static GLib.GType GType {
get {
return new GLib.GType (gst_audio_base_src_slave_method_get_type ());
}
}
}
#endregion
}
@@ -0,0 +1,145 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
[StructLayout(LayoutKind.Sequential)]
public partial struct AudioBuffer : IEquatable<AudioBuffer> {
private IntPtr _info;
public Gst.Audio.AudioInfo Info {
get {
return _info == IntPtr.Zero ? null : (Gst.Audio.AudioInfo) GLib.Opaque.GetOpaque (_info, typeof (Gst.Audio.AudioInfo), false);
}
set {
_info = value == null ? IntPtr.Zero : value.Handle;
}
}
private UIntPtr n_samples;
public ulong NSamples {
get {
return (ulong) n_samples;
}
set {
n_samples = new UIntPtr (value);
}
}
public int NPlanes;
private IntPtr _planes;
private IntPtr _buffer;
public Gst.Buffer Buffer {
get {
return _buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (_buffer, typeof (Gst.Buffer), false);
}
set {
_buffer = value == null ? IntPtr.Zero : value.Handle;
}
}
private IntPtr _map_infos;
[MarshalAs (UnmanagedType.ByValArray, SizeConst=4)]
private IntPtr[] _gstGstReserved;
public static Gst.Audio.AudioBuffer Zero = new Gst.Audio.AudioBuffer ();
public static Gst.Audio.AudioBuffer New(IntPtr raw) {
if (raw == IntPtr.Zero)
return Gst.Audio.AudioBuffer.Zero;
return (Gst.Audio.AudioBuffer) Marshal.PtrToStructure (raw, typeof (Gst.Audio.AudioBuffer));
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_audio_buffer_map(IntPtr raw, IntPtr info, IntPtr gstbuffer, int flags);
public bool Map(Gst.Audio.AudioInfo info, Gst.Buffer gstbuffer, Gst.MapFlags flags) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_audio_buffer_map(this_as_native, info == null ? IntPtr.Zero : info.Handle, gstbuffer == null ? IntPtr.Zero : gstbuffer.Handle, (int) flags);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_audio_buffer_unmap(IntPtr raw);
public void Unmap() {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
gst_audio_buffer_unmap(this_as_native);
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_buffer_clip(IntPtr buffer, IntPtr segment, int rate, int bpf);
public static Gst.Buffer Clip(Gst.Buffer buffer, Gst.Segment segment, int rate, int bpf) {
buffer.Owned = false;
IntPtr native_segment = GLib.Marshaller.StructureToPtrAlloc (segment);
IntPtr raw_ret = gst_audio_buffer_clip(buffer == null ? IntPtr.Zero : buffer.Handle, native_segment, rate, bpf);
Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true);
Marshal.FreeHGlobal (native_segment);
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_audio_buffer_reorder_channels(IntPtr buffer, int format, int channels, int[] from, int[] to);
public static bool ReorderChannels(Gst.Buffer buffer, Gst.Audio.AudioFormat format, int channels, Gst.Audio.AudioChannelPosition[] from, Gst.Audio.AudioChannelPosition[] to) {
int cnt_from = from == null ? 0 : from.Length;
int[] native_from = new int [cnt_from];
for (int i = 0; i < cnt_from; i++)
native_from [i] = (int) from[i];
int cnt_to = to == null ? 0 : to.Length;
int[] native_to = new int [cnt_to];
for (int i = 0; i < cnt_to; i++)
native_to [i] = (int) to[i];
bool raw_ret = gst_audio_buffer_reorder_channels(buffer == null ? IntPtr.Zero : buffer.Handle, (int) format, channels, native_from, native_to);
bool ret = raw_ret;
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_buffer_truncate(IntPtr buffer, int bpf, UIntPtr trim, UIntPtr samples);
public static Gst.Buffer Truncate(Gst.Buffer buffer, int bpf, ulong trim, ulong samples) {
buffer.Owned = false;
IntPtr raw_ret = gst_audio_buffer_truncate(buffer == null ? IntPtr.Zero : buffer.Handle, bpf, new UIntPtr (trim), new UIntPtr (samples));
Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true);
return ret;
}
static void ReadNative (IntPtr native, ref Gst.Audio.AudioBuffer target)
{
target = New (native);
}
public bool Equals (AudioBuffer other)
{
return true && Info.Equals (other.Info) && NSamples.Equals (other.NSamples) && NPlanes.Equals (other.NPlanes) && _planes.Equals (other._planes) && Buffer.Equals (other.Buffer) && _map_infos.Equals (other._map_infos);
}
public override bool Equals (object other)
{
return other is AudioBuffer && Equals ((AudioBuffer) other);
}
public override int GetHashCode ()
{
return this.GetType ().FullName.GetHashCode () ^ Info.GetHashCode () ^ NSamples.GetHashCode () ^ NPlanes.GetHashCode () ^ _planes.GetHashCode () ^ Buffer.GetHashCode () ^ _map_infos.GetHashCode ();
}
private static GLib.GType GType {
get { return GLib.GType.Pointer; }
}
#endregion
}
}
@@ -0,0 +1,414 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class AudioCdSrc : Gst.Base.PushSrc, Gst.IURIHandler {
public AudioCdSrc (IntPtr raw) : base(raw) {}
protected AudioCdSrc() : base(IntPtr.Zero)
{
CreateNativeObject (new string [0], new GLib.Value [0]);
}
[GLib.Property ("device")]
public string Device {
get {
GLib.Value val = GetProperty ("device");
string ret = (string) val;
val.Dispose ();
return ret;
}
set {
GLib.Value val = new GLib.Value(value);
SetProperty("device", val);
val.Dispose ();
}
}
[GLib.Property ("mode")]
public Gst.Audio.AudioCdSrcMode Mode {
get {
GLib.Value val = GetProperty ("mode");
Gst.Audio.AudioCdSrcMode ret = (Gst.Audio.AudioCdSrcMode) (Enum) val;
val.Dispose ();
return ret;
}
set {
GLib.Value val = new GLib.Value((Enum) value);
SetProperty("mode", val);
val.Dispose ();
}
}
[GLib.Property ("track")]
public uint Track {
get {
GLib.Value val = GetProperty ("track");
uint ret = (uint) val;
val.Dispose ();
return ret;
}
set {
GLib.Value val = new GLib.Value(value);
SetProperty("track", val);
val.Dispose ();
}
}
public Gst.TagList Tags {
get {
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("tags"));
return (*raw_ptr) == IntPtr.Zero ? null : (Gst.TagList) GLib.Opaque.GetOpaque ((*raw_ptr), typeof (Gst.TagList), false);
}
}
}
static OpenNativeDelegate Open_cb_delegate;
static OpenNativeDelegate OpenVMCallback {
get {
if (Open_cb_delegate == null)
Open_cb_delegate = new OpenNativeDelegate (Open_cb);
return Open_cb_delegate;
}
}
static void OverrideOpen (GLib.GType gtype)
{
OverrideOpen (gtype, OpenVMCallback);
}
static void OverrideOpen (GLib.GType gtype, OpenNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("open"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool OpenNativeDelegate (IntPtr inst, IntPtr device);
static bool Open_cb (IntPtr inst, IntPtr device)
{
try {
AudioCdSrc __obj = GLib.Object.GetObject (inst, false) as AudioCdSrc;
bool __result;
__result = __obj.OnOpen (GLib.Marshaller.Utf8PtrToString (device));
return __result;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw e;
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioCdSrc), ConnectionMethod="OverrideOpen")]
protected virtual bool OnOpen (string device)
{
return InternalOpen (device);
}
private bool InternalOpen (string device)
{
OpenNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("open"));
unmanaged = (OpenNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(OpenNativeDelegate));
}
if (unmanaged == null) return false;
IntPtr native_device = GLib.Marshaller.StringToPtrGStrdup (device);
bool __result = unmanaged (this.Handle, native_device);
GLib.Marshaller.Free (native_device);
return __result;
}
static CloseNativeDelegate Close_cb_delegate;
static CloseNativeDelegate CloseVMCallback {
get {
if (Close_cb_delegate == null)
Close_cb_delegate = new CloseNativeDelegate (Close_cb);
return Close_cb_delegate;
}
}
static void OverrideClose (GLib.GType gtype)
{
OverrideClose (gtype, CloseVMCallback);
}
static void OverrideClose (GLib.GType gtype, CloseNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("close"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void CloseNativeDelegate (IntPtr inst);
static void Close_cb (IntPtr inst)
{
try {
AudioCdSrc __obj = GLib.Object.GetObject (inst, false) as AudioCdSrc;
__obj.OnClose ();
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioCdSrc), ConnectionMethod="OverrideClose")]
protected virtual void OnClose ()
{
InternalClose ();
}
private void InternalClose ()
{
CloseNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("close"));
unmanaged = (CloseNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CloseNativeDelegate));
}
if (unmanaged == null) return;
unmanaged (this.Handle);
}
static ReadSectorNativeDelegate ReadSector_cb_delegate;
static ReadSectorNativeDelegate ReadSectorVMCallback {
get {
if (ReadSector_cb_delegate == null)
ReadSector_cb_delegate = new ReadSectorNativeDelegate (ReadSector_cb);
return ReadSector_cb_delegate;
}
}
static void OverrideReadSector (GLib.GType gtype)
{
OverrideReadSector (gtype, ReadSectorVMCallback);
}
static void OverrideReadSector (GLib.GType gtype, ReadSectorNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("read_sector"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr ReadSectorNativeDelegate (IntPtr inst, int sector);
static IntPtr ReadSector_cb (IntPtr inst, int sector)
{
try {
AudioCdSrc __obj = GLib.Object.GetObject (inst, false) as AudioCdSrc;
Gst.Buffer __result;
__result = __obj.OnReadSector (sector);
return __result == null ? IntPtr.Zero : __result.OwnedCopy;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw e;
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioCdSrc), ConnectionMethod="OverrideReadSector")]
protected virtual Gst.Buffer OnReadSector (int sector)
{
return InternalReadSector (sector);
}
private Gst.Buffer InternalReadSector (int sector)
{
ReadSectorNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("read_sector"));
unmanaged = (ReadSectorNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ReadSectorNativeDelegate));
}
if (unmanaged == null) return null;
IntPtr __result = unmanaged (this.Handle, sector);
return __result == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (__result, typeof (Gst.Buffer), true);
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _class_abi = null;
static public new GLib.AbiStruct class_abi {
get {
if (_class_abi == null)
_class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("open"
, Gst.Base.PushSrc.class_abi.Fields
, (uint) Marshal.SizeOf(typeof(IntPtr)) // open
, null
, "close"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("close"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // close
, "open"
, "read_sector"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("read_sector"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // read_sector
, "close"
, "_gst_reserved"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("_gst_reserved"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) * 20 // _gst_reserved
, "read_sector"
, null
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
});
return _class_abi;
}
}
// End of the ABI representation.
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_cd_src_get_type();
public static new GLib.GType GType {
get {
IntPtr raw_ret = gst_audio_cd_src_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_audio_cd_src_add_track(IntPtr raw, IntPtr track);
public bool AddTrack(Gst.Audio.AudioCdSrcTrack track) {
IntPtr native_track = GLib.Marshaller.StructureToPtrAlloc (track);
bool raw_ret = gst_audio_cd_src_add_track(Handle, native_track);
bool ret = raw_ret;
Marshal.FreeHGlobal (native_track);
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_uri_handler_get_uri(IntPtr raw);
public string Uri {
get {
IntPtr raw_ret = gst_uri_handler_get_uri(Handle);
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
return ret;
}
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gst_uri_handler_get_uri_type(IntPtr raw);
public Gst.URIType UriType {
get {
int raw_ret = gst_uri_handler_get_uri_type(Handle);
Gst.URIType ret = (Gst.URIType) raw_ret;
return ret;
}
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_uri_handler_set_uri(IntPtr raw, IntPtr uri, out IntPtr error);
public bool SetUri(string uri) {
IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri);
IntPtr error = IntPtr.Zero;
bool raw_ret = gst_uri_handler_set_uri(Handle, native_uri, out error);
bool ret = raw_ret;
GLib.Marshaller.Free (native_uri);
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
static AudioCdSrc ()
{
GtkSharp.GstreamerSharp.ObjectManager.Initialize ();
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public new GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("tags"
, Gst.Base.PushSrc.abi_info.Fields
, (uint) Marshal.SizeOf(typeof(IntPtr)) // tags
, null
, "priv"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("priv"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // priv
, "tags"
, "_gst_reserved1"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("_gst_reserved1"
, -1
, (uint) Marshal.SizeOf(typeof(uint)) * 2 // _gst_reserved1
, "priv"
, "_gst_reserved2"
, (long) Marshal.OffsetOf(typeof(GstAudioCdSrc__gst_reserved1Align), "_gst_reserved1")
, 0
),
new GLib.AbiField("_gst_reserved2"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) * 2 // _gst_reserved2
, "_gst_reserved1"
, null
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
});
return _abi_info;
}
}
[StructLayout(LayoutKind.Sequential)]
public struct GstAudioCdSrc__gst_reserved1Align
{
sbyte f1;
[MarshalAs (UnmanagedType.ByValArray, SizeConst=2)]
private uint[] _gst_reserved1;
}
// End of the ABI representation.
#endregion
}
}
@@ -0,0 +1,28 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[GLib.GType (typeof (Gst.Audio.AudioCdSrcModeGType))]
public enum AudioCdSrcMode {
Normal = 0,
Continuous = 1,
}
internal class AudioCdSrcModeGType {
[DllImport ("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_cd_src_mode_get_type ();
public static GLib.GType GType {
get {
return new GLib.GType (gst_audio_cd_src_mode_get_type ());
}
}
}
#endregion
}
@@ -0,0 +1,61 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
[StructLayout(LayoutKind.Sequential)]
public partial struct AudioCdSrcTrack : IEquatable<AudioCdSrcTrack> {
public bool IsAudio;
public uint Num;
public uint Start;
public uint End;
private IntPtr _tags;
public Gst.TagList Tags {
get {
return _tags == IntPtr.Zero ? null : (Gst.TagList) GLib.Opaque.GetOpaque (_tags, typeof (Gst.TagList), false);
}
set {
_tags = value == null ? IntPtr.Zero : value.Handle;
}
}
[MarshalAs (UnmanagedType.ByValArray, SizeConst=2)]
private uint[] _gstGstReserved1;
[MarshalAs (UnmanagedType.ByValArray, SizeConst=2)]
private IntPtr[] _gstGstReserved2;
public static Gst.Audio.AudioCdSrcTrack Zero = new Gst.Audio.AudioCdSrcTrack ();
public static Gst.Audio.AudioCdSrcTrack New(IntPtr raw) {
if (raw == IntPtr.Zero)
return Gst.Audio.AudioCdSrcTrack.Zero;
return (Gst.Audio.AudioCdSrcTrack) Marshal.PtrToStructure (raw, typeof (Gst.Audio.AudioCdSrcTrack));
}
public bool Equals (AudioCdSrcTrack other)
{
return true && IsAudio.Equals (other.IsAudio) && Num.Equals (other.Num) && Start.Equals (other.Start) && End.Equals (other.End) && Tags.Equals (other.Tags);
}
public override bool Equals (object other)
{
return other is AudioCdSrcTrack && Equals ((AudioCdSrcTrack) other);
}
public override int GetHashCode ()
{
return this.GetType ().FullName.GetHashCode () ^ IsAudio.GetHashCode () ^ Num.GetHashCode () ^ Start.GetHashCode () ^ End.GetHashCode () ^ Tags.GetHashCode ();
}
private static GLib.GType GType {
get { return GLib.GType.Pointer; }
}
#endregion
}
}
@@ -0,0 +1,70 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class AudioChannelMixer : GLib.Opaque {
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_audio_channel_mixer_is_passthrough(IntPtr raw);
public bool IsPassthrough {
get {
bool raw_ret = gst_audio_channel_mixer_is_passthrough(Handle);
bool ret = raw_ret;
return ret;
}
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_audio_channel_mixer_samples(IntPtr raw, IntPtr in_param, IntPtr out_param, int samples);
public void Samples(IntPtr in_param, IntPtr out_param, int samples) {
gst_audio_channel_mixer_samples(Handle, in_param, out_param, samples);
}
public void Samples(int samples) {
Samples (IntPtr.Zero, IntPtr.Zero, samples);
}
public AudioChannelMixer(IntPtr raw) : base(raw) {}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_audio_channel_mixer_free(IntPtr raw);
protected override void Free (IntPtr raw)
{
gst_audio_channel_mixer_free (raw);
}
protected override Action<IntPtr> DisposeUnmanagedFunc {
get {
return gst_audio_channel_mixer_free;
}
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}
@@ -0,0 +1,32 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[Flags]
[GLib.GType (typeof (Gst.Audio.AudioChannelMixerFlagsGType))]
public enum AudioChannelMixerFlags : uint {
None = 0,
NonInterleavedIn = 1,
NonInterleavedOut = 2,
UnpositionedIn = 4,
UnpositionedOut = 8,
}
internal class AudioChannelMixerFlagsGType {
[DllImport ("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_channel_mixer_flags_get_type ();
public static GLib.GType GType {
get {
return new GLib.GType (gst_audio_channel_mixer_flags_get_type ());
}
}
}
#endregion
}
@@ -0,0 +1,57 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[GLib.GType (typeof (Gst.Audio.AudioChannelPositionGType))]
public enum AudioChannelPosition {
None = -3,
Mono = -2,
Invalid = -1,
FrontLeft = 0,
FrontRight = 1,
FrontCenter = 2,
Lfe1 = 3,
RearLeft = 4,
RearRight = 5,
FrontLeftOfCenter = 6,
FrontRightOfCenter = 7,
RearCenter = 8,
Lfe2 = 9,
SideLeft = 10,
SideRight = 11,
TopFrontLeft = 12,
TopFrontRight = 13,
TopFrontCenter = 14,
TopCenter = 15,
TopRearLeft = 16,
TopRearRight = 17,
TopSideLeft = 18,
TopSideRight = 19,
TopRearCenter = 20,
BottomFrontCenter = 21,
BottomFrontLeft = 22,
BottomFrontRight = 23,
WideLeft = 24,
WideRight = 25,
SurroundLeft = 26,
SurroundRight = 27,
}
internal class AudioChannelPositionGType {
[DllImport ("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_channel_position_get_type ();
public static GLib.GType GType {
get {
return new GLib.GType (gst_audio_channel_position_get_type ());
}
}
}
#endregion
}
@@ -0,0 +1,59 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
[StructLayout(LayoutKind.Sequential)]
public partial struct AudioClippingMeta : IEquatable<AudioClippingMeta> {
public Gst.Meta Meta;
public Gst.Format Format;
public ulong Start;
public ulong End;
public static Gst.Audio.AudioClippingMeta Zero = new Gst.Audio.AudioClippingMeta ();
public static Gst.Audio.AudioClippingMeta New(IntPtr raw) {
if (raw == IntPtr.Zero)
return Gst.Audio.AudioClippingMeta.Zero;
return (Gst.Audio.AudioClippingMeta) Marshal.PtrToStructure (raw, typeof (Gst.Audio.AudioClippingMeta));
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_clipping_meta_get_info();
public static Gst.MetaInfo Info {
get {
IntPtr raw_ret = gst_audio_clipping_meta_get_info();
Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret);
return ret;
}
}
public bool Equals (AudioClippingMeta other)
{
return true && Meta.Equals (other.Meta) && Format.Equals (other.Format) && Start.Equals (other.Start) && End.Equals (other.End);
}
public override bool Equals (object other)
{
return other is AudioClippingMeta && Equals ((AudioClippingMeta) other);
}
public override int GetHashCode ()
{
return this.GetType ().FullName.GetHashCode () ^ Meta.GetHashCode () ^ Format.GetHashCode () ^ Start.GetHashCode () ^ End.GetHashCode ();
}
private static GLib.GType GType {
get { return GLib.GType.Pointer; }
}
#endregion
}
}
@@ -0,0 +1,215 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class AudioClock : Gst.SystemClock {
public AudioClock (IntPtr raw) : base(raw) {}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_clock_new(IntPtr name, Gst.AudioSharp.AudioClockGetTimeFuncNative func, IntPtr user_data, GLib.DestroyNotify destroy_notify);
public AudioClock (string name, Gst.Audio.AudioClockGetTimeFunc func, IntPtr user_data, GLib.DestroyNotify destroy_notify) : base (IntPtr.Zero)
{
if (GetType () != typeof (AudioClock)) {
var vals = new List<GLib.Value> ();
var names = new List<string> ();
names.Add ("name");
vals.Add (new GLib.Value (name));
CreateNativeObject (names.ToArray (), vals.ToArray ());
return;
}
IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
Gst.AudioSharp.AudioClockGetTimeFuncWrapper func_wrapper = new Gst.AudioSharp.AudioClockGetTimeFuncWrapper (func);
Raw = gst_audio_clock_new(native_name, func_wrapper.NativeDelegate, user_data, destroy_notify);
GLib.Marshaller.Free (native_name);
}
public Gst.Audio.AudioClockGetTimeFunc Func {
get {
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("func"));
Gst.AudioSharp.AudioClockGetTimeFuncNative del = (Gst.AudioSharp.AudioClockGetTimeFuncNative)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(Gst.AudioSharp.AudioClockGetTimeFuncNative));
return Gst.AudioSharp.AudioClockGetTimeFuncWrapper.GetManagedDelegate ((del));
}
}
}
public IntPtr UserData {
get {
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("user_data"));
return (*raw_ptr);
}
}
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _class_abi = null;
static public new GLib.AbiStruct class_abi {
get {
if (_class_abi == null)
_class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("_gst_reserved"
, Gst.SystemClock.class_abi.Fields
, (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
, null
, null
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
});
return _class_abi;
}
}
// End of the ABI representation.
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_clock_get_type();
public static new GLib.GType GType {
get {
IntPtr raw_ret = gst_audio_clock_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern ulong gst_audio_clock_adjust(IntPtr raw, ulong time);
public ulong Adjust(ulong time) {
ulong raw_ret = gst_audio_clock_adjust(Handle, time);
ulong ret = raw_ret;
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern ulong gst_audio_clock_get_time(IntPtr raw);
public new ulong Time {
get {
ulong raw_ret = gst_audio_clock_get_time(Handle);
ulong ret = raw_ret;
return ret;
}
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_audio_clock_invalidate(IntPtr raw);
public void Invalidate() {
gst_audio_clock_invalidate(Handle);
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_audio_clock_reset(IntPtr raw, ulong time);
public void Reset(ulong time) {
gst_audio_clock_reset(Handle, time);
}
static AudioClock ()
{
GtkSharp.GstreamerSharp.ObjectManager.Initialize ();
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public new GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("func"
, Gst.SystemClock.abi_info.Fields
, (uint) Marshal.SizeOf(typeof(IntPtr)) // func
, null
, "user_data"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("user_data"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // user_data
, "func"
, "destroy_notify"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("destroy_notify"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // destroy_notify
, "user_data"
, "last_time"
, (long) Marshal.OffsetOf(typeof(GstAudioClock_destroy_notifyAlign), "destroy_notify")
, 0
),
new GLib.AbiField("last_time"
, -1
, (uint) Marshal.SizeOf(typeof(ulong)) // last_time
, "destroy_notify"
, "time_offset"
, (long) Marshal.OffsetOf(typeof(GstAudioClock_last_timeAlign), "last_time")
, 0
),
new GLib.AbiField("time_offset"
, -1
, (uint) Marshal.SizeOf(typeof(long)) // time_offset
, "last_time"
, "_gst_reserved"
, (long) Marshal.OffsetOf(typeof(GstAudioClock_time_offsetAlign), "time_offset")
, 0
),
new GLib.AbiField("_gst_reserved"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
, "time_offset"
, null
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
});
return _abi_info;
}
}
[StructLayout(LayoutKind.Sequential)]
public struct GstAudioClock_destroy_notifyAlign
{
sbyte f1;
private GLib.DestroyNotify destroy_notify;
}
[StructLayout(LayoutKind.Sequential)]
public struct GstAudioClock_last_timeAlign
{
sbyte f1;
private ulong last_time;
}
[StructLayout(LayoutKind.Sequential)]
public struct GstAudioClock_time_offsetAlign
{
sbyte f1;
private long time_offset;
}
// End of the ABI representation.
#endregion
}
}
@@ -0,0 +1,10 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
public delegate ulong AudioClockGetTimeFunc(Gst.Clock clock);
}
@@ -0,0 +1,207 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
[StructLayout(LayoutKind.Sequential)]
public partial struct AudioConverter : IEquatable<AudioConverter> {
public static Gst.Audio.AudioConverter Zero = new Gst.Audio.AudioConverter ();
public static Gst.Audio.AudioConverter New(IntPtr raw) {
if (raw == IntPtr.Zero)
return Gst.Audio.AudioConverter.Zero;
return (Gst.Audio.AudioConverter) Marshal.PtrToStructure (raw, typeof (Gst.Audio.AudioConverter));
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_converter_new(int flags, IntPtr in_info, IntPtr out_info, IntPtr config);
public static AudioConverter New(Gst.Audio.AudioConverterFlags flags, Gst.Audio.AudioInfo in_info, Gst.Audio.AudioInfo out_info, Gst.Structure config)
{
config.Owned = false;
AudioConverter result = AudioConverter.New (gst_audio_converter_new((int) flags, in_info == null ? IntPtr.Zero : in_info.Handle, out_info == null ? IntPtr.Zero : out_info.Handle, config == null ? IntPtr.Zero : config.Handle));
return result;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_converter_get_type();
public static GLib.GType GType {
get {
IntPtr raw_ret = gst_audio_converter_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_converter_get_config(IntPtr raw, out int in_rate, out int out_rate);
public Gst.Structure GetConfig(out int in_rate, out int out_rate) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
IntPtr raw_ret = gst_audio_converter_get_config(this_as_native, out in_rate, out out_rate);
Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), false);
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern UIntPtr gst_audio_converter_get_in_frames(IntPtr raw, UIntPtr out_frames);
public ulong GetInFrames(ulong out_frames) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
UIntPtr raw_ret = gst_audio_converter_get_in_frames(this_as_native, new UIntPtr (out_frames));
ulong ret = (ulong) raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern UIntPtr gst_audio_converter_get_max_latency(IntPtr raw);
public ulong MaxLatency {
get {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
UIntPtr raw_ret = gst_audio_converter_get_max_latency(this_as_native);
ulong ret = (ulong) raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern UIntPtr gst_audio_converter_get_out_frames(IntPtr raw, UIntPtr in_frames);
public ulong GetOutFrames(ulong in_frames) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
UIntPtr raw_ret = gst_audio_converter_get_out_frames(this_as_native, new UIntPtr (in_frames));
ulong ret = (ulong) raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_audio_converter_is_passthrough(IntPtr raw);
public bool IsPassthrough {
get {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_audio_converter_is_passthrough(this_as_native);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_audio_converter_reset(IntPtr raw);
public void Reset() {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
gst_audio_converter_reset(this_as_native);
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_audio_converter_samples(IntPtr raw, int flags, IntPtr in_param, UIntPtr in_frames, IntPtr out_param, UIntPtr out_frames);
public bool Samples(Gst.Audio.AudioConverterFlags flags, IntPtr in_param, ulong in_frames, IntPtr out_param, ulong out_frames) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_audio_converter_samples(this_as_native, (int) flags, in_param, new UIntPtr (in_frames), out_param, new UIntPtr (out_frames));
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
public bool Samples(Gst.Audio.AudioConverterFlags flags, ulong in_frames, ulong out_frames) {
return Samples (flags, IntPtr.Zero, in_frames, IntPtr.Zero, out_frames);
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_audio_converter_supports_inplace(IntPtr raw);
public bool SupportsInplace() {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_audio_converter_supports_inplace(this_as_native);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_audio_converter_update_config(IntPtr raw, int in_rate, int out_rate, IntPtr config);
public bool UpdateConfig(int in_rate, int out_rate, Gst.Structure config) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
config.Owned = false;
bool raw_ret = gst_audio_converter_update_config(this_as_native, in_rate, out_rate, config == null ? IntPtr.Zero : config.Handle);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
public bool UpdateConfig(int in_rate, int out_rate) {
return UpdateConfig (in_rate, out_rate, null);
}
static void ReadNative (IntPtr native, ref Gst.Audio.AudioConverter target)
{
target = New (native);
}
public bool Equals (AudioConverter other)
{
return true;
}
public override bool Equals (object other)
{
return other is AudioConverter && Equals ((AudioConverter) other);
}
public override int GetHashCode ()
{
return this.GetType ().FullName.GetHashCode ();
}
public static explicit operator GLib.Value (Gst.Audio.AudioConverter boxed)
{
GLib.Value val = GLib.Value.Empty;
val.Init (Gst.Audio.AudioConverter.GType);
val.Val = boxed;
return val;
}
public static explicit operator Gst.Audio.AudioConverter (GLib.Value val)
{
return (Gst.Audio.AudioConverter) val.Val;
}
#endregion
}
}
@@ -0,0 +1,30 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[Flags]
[GLib.GType (typeof (Gst.Audio.AudioConverterFlagsGType))]
public enum AudioConverterFlags : uint {
None = 0,
InWritable = 1,
VariableRate = 2,
}
internal class AudioConverterFlagsGType {
[DllImport ("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_converter_flags_get_type ();
public static GLib.GType GType {
get {
return new GLib.GType (gst_audio_converter_flags_get_type ());
}
}
}
#endregion
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,30 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[GLib.GType (typeof (Gst.Audio.AudioDitherMethodGType))]
public enum AudioDitherMethod {
None = 0,
Rpdf = 1,
Tpdf = 2,
TpdfHf = 3,
}
internal class AudioDitherMethodGType {
[DllImport ("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_dither_method_get_type ();
public static GLib.GType GType {
get {
return new GLib.GType (gst_audio_dither_method_get_type ());
}
}
}
#endregion
}
@@ -0,0 +1,61 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
[StructLayout(LayoutKind.Sequential)]
public partial struct AudioDownmixMeta : IEquatable<AudioDownmixMeta> {
public Gst.Meta Meta;
private IntPtr _from_position;
private IntPtr _to_position;
public int FromChannels;
public int ToChannels;
public float Matrix;
public static Gst.Audio.AudioDownmixMeta Zero = new Gst.Audio.AudioDownmixMeta ();
public static Gst.Audio.AudioDownmixMeta New(IntPtr raw) {
if (raw == IntPtr.Zero)
return Gst.Audio.AudioDownmixMeta.Zero;
return (Gst.Audio.AudioDownmixMeta) Marshal.PtrToStructure (raw, typeof (Gst.Audio.AudioDownmixMeta));
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_downmix_meta_get_info();
public static Gst.MetaInfo Info {
get {
IntPtr raw_ret = gst_audio_downmix_meta_get_info();
Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret);
return ret;
}
}
public bool Equals (AudioDownmixMeta other)
{
return true && Meta.Equals (other.Meta) && _from_position.Equals (other._from_position) && _to_position.Equals (other._to_position) && FromChannels.Equals (other.FromChannels) && ToChannels.Equals (other.ToChannels) && Matrix.Equals (other.Matrix);
}
public override bool Equals (object other)
{
return other is AudioDownmixMeta && Equals ((AudioDownmixMeta) other);
}
public override int GetHashCode ()
{
return this.GetType ().FullName.GetHashCode () ^ Meta.GetHashCode () ^ _from_position.GetHashCode () ^ _to_position.GetHashCode () ^ FromChannels.GetHashCode () ^ ToChannels.GetHashCode () ^ Matrix.GetHashCode ();
}
private static GLib.GType GType {
get { return GLib.GType.Pointer; }
}
#endregion
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,177 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class AudioFilter : Gst.Base.BaseTransform {
protected AudioFilter (IntPtr raw) : base(raw) {}
protected AudioFilter() : base(IntPtr.Zero)
{
CreateNativeObject (new string [0], new GLib.Value [0]);
}
public Gst.Audio.AudioInfo Info {
get {
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("info"));
return (*raw_ptr) == IntPtr.Zero ? null : (Gst.Audio.AudioInfo) GLib.Opaque.GetOpaque ((*raw_ptr), typeof (Gst.Audio.AudioInfo), false);
}
}
}
static SetupNativeDelegate Setup_cb_delegate;
static SetupNativeDelegate SetupVMCallback {
get {
if (Setup_cb_delegate == null)
Setup_cb_delegate = new SetupNativeDelegate (Setup_cb);
return Setup_cb_delegate;
}
}
static void OverrideSetup (GLib.GType gtype)
{
OverrideSetup (gtype, SetupVMCallback);
}
static void OverrideSetup (GLib.GType gtype, SetupNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("setup"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool SetupNativeDelegate (IntPtr inst, IntPtr info);
static bool Setup_cb (IntPtr inst, IntPtr info)
{
try {
AudioFilter __obj = GLib.Object.GetObject (inst, false) as AudioFilter;
bool __result;
__result = __obj.OnSetup (info == IntPtr.Zero ? null : (Gst.Audio.AudioInfo) GLib.Opaque.GetOpaque (info, typeof (Gst.Audio.AudioInfo), false));
return __result;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw e;
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioFilter), ConnectionMethod="OverrideSetup")]
protected virtual bool OnSetup (Gst.Audio.AudioInfo info)
{
return InternalSetup (info);
}
private bool InternalSetup (Gst.Audio.AudioInfo info)
{
SetupNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("setup"));
unmanaged = (SetupNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SetupNativeDelegate));
}
if (unmanaged == null) return false;
bool __result = unmanaged (this.Handle, info == null ? IntPtr.Zero : info.Handle);
return __result;
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _class_abi = null;
static public new GLib.AbiStruct class_abi {
get {
if (_class_abi == null)
_class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("setup"
, Gst.Base.BaseTransform.class_abi.Fields
, (uint) Marshal.SizeOf(typeof(IntPtr)) // setup
, null
, "_gst_reserved"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("_gst_reserved"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
, "setup"
, null
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
});
return _class_abi;
}
}
// End of the ABI representation.
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_audio_filter_class_add_pad_templates(IntPtr allowed_caps);
public static void AddAudioPadTemplate(Gst.Caps allowed_caps) {
gst_audio_filter_class_add_pad_templates(allowed_caps == null ? IntPtr.Zero : allowed_caps.Handle);
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_filter_get_type();
public static new GLib.GType GType {
get {
IntPtr raw_ret = gst_audio_filter_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
}
static AudioFilter ()
{
GtkSharp.GstreamerSharp.ObjectManager.Initialize ();
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public new GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("info"
, Gst.Base.BaseTransform.abi_info.Fields
, Gst.Audio.AudioInfo.abi_info.Size // info
, null
, "_gst_reserved"
, Gst.Audio.AudioInfo.abi_info.Align
, 0
),
new GLib.AbiField("_gst_reserved"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
, "info"
, null
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}
@@ -0,0 +1,29 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[Flags]
[GLib.GType (typeof (Gst.Audio.AudioFlagsGType))]
public enum AudioFlags : uint {
None = 0,
Unpositioned = 1,
}
internal class AudioFlagsGType {
[DllImport ("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_flags_get_type ();
public static GLib.GType GType {
get {
return new GLib.GType (gst_audio_flags_get_type ());
}
}
}
#endregion
}
@@ -0,0 +1,72 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[GLib.GType (typeof (Gst.Audio.AudioFormatGType))]
public enum AudioFormat {
Unknown = 0,
Encoded = 1,
S8 = 2,
U8 = 3,
S16le = 4,
S16 = 4,
S16be = 5,
U16le = 6,
U16 = 6,
U16be = 7,
S2432le = 8,
S2432 = 8,
S2432be = 9,
U2432le = 10,
U2432 = 10,
U2432be = 11,
S32le = 12,
S32 = 12,
S32be = 13,
U32le = 14,
U32 = 14,
U32be = 15,
S24le = 16,
S24 = 16,
S24be = 17,
U24le = 18,
U24 = 18,
U24be = 19,
S20le = 20,
S20 = 20,
S20be = 21,
U20le = 22,
U20 = 22,
U20be = 23,
S18le = 24,
S18 = 24,
S18be = 25,
U18le = 26,
U18 = 26,
U18be = 27,
F32le = 28,
F32 = 28,
F32be = 29,
F64le = 30,
F64 = 30,
F64be = 31,
}
internal class AudioFormatGType {
[DllImport ("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_format_get_type ();
public static GLib.GType GType {
get {
return new GLib.GType (gst_audio_format_get_type ());
}
}
}
#endregion
}
@@ -0,0 +1,32 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[Flags]
[GLib.GType (typeof (Gst.Audio.AudioFormatFlagsGType))]
public enum AudioFormatFlags : uint {
Integer = 1,
Float = 2,
Signed = 4,
Complex = 16,
Unpack = 32,
}
internal class AudioFormatFlagsGType {
[DllImport ("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_format_flags_get_type ();
public static GLib.GType GType {
get {
return new GLib.GType (gst_audio_format_flags_get_type ());
}
}
}
#endregion
}
@@ -0,0 +1,68 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
[StructLayout(LayoutKind.Sequential)]
public partial struct AudioFormatInfo : IEquatable<AudioFormatInfo> {
public Gst.Audio.AudioFormat Format;
public string Name;
public string Description;
public Gst.Audio.AudioFormatFlags Flags;
public int Endianness;
public int Width;
public int Depth;
[MarshalAs (UnmanagedType.ByValArray, SizeConst=8)]
public byte[] Silence;
public Gst.Audio.AudioFormat UnpackFormat;
private Gst.AudioSharp.AudioFormatUnpackNative _unpack_func;
public Gst.Audio.AudioFormatUnpack UnpackFunc {
get {
return Gst.AudioSharp.AudioFormatUnpackWrapper.GetManagedDelegate (_unpack_func);
}
}
private Gst.AudioSharp.AudioFormatPackNative _pack_func;
public Gst.Audio.AudioFormatPack PackFunc {
get {
return Gst.AudioSharp.AudioFormatPackWrapper.GetManagedDelegate (_pack_func);
}
}
[MarshalAs (UnmanagedType.ByValArray, SizeConst=4)]
private IntPtr[] _gstGstReserved;
public static Gst.Audio.AudioFormatInfo Zero = new Gst.Audio.AudioFormatInfo ();
public static Gst.Audio.AudioFormatInfo New(IntPtr raw) {
if (raw == IntPtr.Zero)
return Gst.Audio.AudioFormatInfo.Zero;
return (Gst.Audio.AudioFormatInfo) Marshal.PtrToStructure (raw, typeof (Gst.Audio.AudioFormatInfo));
}
public bool Equals (AudioFormatInfo other)
{
return true && Format.Equals (other.Format) && Name.Equals (other.Name) && Description.Equals (other.Description) && Flags.Equals (other.Flags) && Endianness.Equals (other.Endianness) && Width.Equals (other.Width) && Depth.Equals (other.Depth) && Silence.Equals (other.Silence) && UnpackFormat.Equals (other.UnpackFormat) && UnpackFunc.Equals (other.UnpackFunc) && PackFunc.Equals (other.PackFunc);
}
public override bool Equals (object other)
{
return other is AudioFormatInfo && Equals ((AudioFormatInfo) other);
}
public override int GetHashCode ()
{
return this.GetType ().FullName.GetHashCode () ^ Format.GetHashCode () ^ Name.GetHashCode () ^ Description.GetHashCode () ^ Flags.GetHashCode () ^ Endianness.GetHashCode () ^ Width.GetHashCode () ^ Depth.GetHashCode () ^ Silence.GetHashCode () ^ UnpackFormat.GetHashCode () ^ UnpackFunc.GetHashCode () ^ PackFunc.GetHashCode ();
}
private static GLib.GType GType {
get { return GLib.GType.Pointer; }
}
#endregion
}
}
@@ -0,0 +1,10 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
public delegate void AudioFormatPack(Gst.Audio.AudioFormatInfo info, Gst.Audio.AudioPackFlags flags, byte[] src, byte[] data);
}
@@ -0,0 +1,10 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
public delegate void AudioFormatUnpack(Gst.Audio.AudioFormatInfo info, Gst.Audio.AudioPackFlags flags, byte[] dest, byte[] data);
}
@@ -0,0 +1,331 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class AudioInfo : GLib.Opaque {
public Gst.Audio.AudioFormatInfo Finfo {
get {
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("finfo"));
return Gst.Audio.AudioFormatInfo.New ((*raw_ptr));
}
}
set {
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("finfo"));
*raw_ptr = GLib.Marshaller.StructureToPtrAlloc (value);
}
}
}
public Gst.Audio.AudioFlags Flags {
get {
unsafe {
int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("flags"));
return (Gst.Audio.AudioFlags) (*raw_ptr);
}
}
set {
unsafe {
int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("flags"));
*raw_ptr = (int) value;
}
}
}
public Gst.Audio.AudioLayout Layout {
get {
unsafe {
int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("layout"));
return (Gst.Audio.AudioLayout) (*raw_ptr);
}
}
set {
unsafe {
int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("layout"));
*raw_ptr = (int) value;
}
}
}
public int Rate {
get {
unsafe {
int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("rate"));
return (*raw_ptr);
}
}
set {
unsafe {
int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("rate"));
*raw_ptr = value;
}
}
}
public int Channels {
get {
unsafe {
int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("channels"));
return (*raw_ptr);
}
}
set {
unsafe {
int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("channels"));
*raw_ptr = value;
}
}
}
public int Bpf {
get {
unsafe {
int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("bpf"));
return (*raw_ptr);
}
}
set {
unsafe {
int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("bpf"));
*raw_ptr = value;
}
}
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_info_get_type();
public static GLib.GType GType {
get {
IntPtr raw_ret = gst_audio_info_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_audio_info_convert(IntPtr raw, int src_fmt, long src_val, int dest_fmt, out long dest_val);
public bool Convert(Gst.Format src_fmt, long src_val, Gst.Format dest_fmt, out long dest_val) {
bool raw_ret = gst_audio_info_convert(Handle, (int) src_fmt, src_val, (int) dest_fmt, out dest_val);
bool ret = raw_ret;
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_info_copy(IntPtr raw);
public Gst.Audio.AudioInfo Copy() {
IntPtr raw_ret = gst_audio_info_copy(Handle);
Gst.Audio.AudioInfo ret = raw_ret == IntPtr.Zero ? null : (Gst.Audio.AudioInfo) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Audio.AudioInfo), true);
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_audio_info_from_caps(IntPtr raw, IntPtr caps);
public bool FromCaps(Gst.Caps caps) {
bool raw_ret = gst_audio_info_from_caps(Handle, caps == null ? IntPtr.Zero : caps.Handle);
bool ret = raw_ret;
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_audio_info_init(IntPtr raw);
public void Init() {
gst_audio_info_init(Handle);
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_audio_info_is_equal(IntPtr raw, IntPtr other);
public bool IsEqual(Gst.Audio.AudioInfo other) {
bool raw_ret = gst_audio_info_is_equal(Handle, other == null ? IntPtr.Zero : other.Handle);
bool ret = raw_ret;
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_audio_info_set_format(IntPtr raw, int format, int rate, int channels, int[] position);
public void SetFormat(Gst.Audio.AudioFormat format, int rate, int channels, Gst.Audio.AudioChannelPosition[] position) {
int cnt_position = position == null ? 0 : position.Length;
int[] native_position = new int [cnt_position];
for (int i = 0; i < cnt_position; i++)
native_position [i] = (int) position[i];
gst_audio_info_set_format(Handle, (int) format, rate, channels, native_position);
}
public void SetFormat(Gst.Audio.AudioFormat format, int rate, int channels) {
SetFormat (format, rate, channels, null);
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_info_to_caps(IntPtr raw);
public Gst.Caps ToCaps() {
IntPtr raw_ret = gst_audio_info_to_caps(Handle);
Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true);
return ret;
}
public AudioInfo(IntPtr raw) : base(raw) {}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_info_new();
public AudioInfo ()
{
Raw = gst_audio_info_new();
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_audio_info_free(IntPtr raw);
protected override void Free (IntPtr raw)
{
gst_audio_info_free (raw);
}
protected override Action<IntPtr> DisposeUnmanagedFunc {
get {
return gst_audio_info_free;
}
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("finfo"
, 0
, (uint) Marshal.SizeOf(typeof(IntPtr)) // finfo
, null
, "flags"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("flags"
, -1
, (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.Audio.AudioFlags))) // flags
, "finfo"
, "layout"
, (long) Marshal.OffsetOf(typeof(GstAudioInfo_flagsAlign), "flags")
, 0
),
new GLib.AbiField("layout"
, -1
, (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.Audio.AudioLayout))) // layout
, "flags"
, "rate"
, (long) Marshal.OffsetOf(typeof(GstAudioInfo_layoutAlign), "layout")
, 0
),
new GLib.AbiField("rate"
, -1
, (uint) Marshal.SizeOf(typeof(int)) // rate
, "layout"
, "channels"
, (long) Marshal.OffsetOf(typeof(GstAudioInfo_rateAlign), "rate")
, 0
),
new GLib.AbiField("channels"
, -1
, (uint) Marshal.SizeOf(typeof(int)) // channels
, "rate"
, "bpf"
, (long) Marshal.OffsetOf(typeof(GstAudioInfo_channelsAlign), "channels")
, 0
),
new GLib.AbiField("bpf"
, -1
, (uint) Marshal.SizeOf(typeof(int)) // bpf
, "channels"
, "position"
, (long) Marshal.OffsetOf(typeof(GstAudioInfo_bpfAlign), "bpf")
, 0
),
new GLib.AbiField("position"
, -1
, (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.Audio.AudioChannelPosition))) * 64 // position
, "bpf"
, "_gst_reserved"
, (long) Marshal.OffsetOf(typeof(GstAudioInfo_positionAlign), "position")
, 0
),
new GLib.AbiField("_gst_reserved"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
, "position"
, null
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
});
return _abi_info;
}
}
[StructLayout(LayoutKind.Sequential)]
public struct GstAudioInfo_flagsAlign
{
sbyte f1;
private Gst.Audio.AudioFlags flags;
}
[StructLayout(LayoutKind.Sequential)]
public struct GstAudioInfo_layoutAlign
{
sbyte f1;
private Gst.Audio.AudioLayout layout;
}
[StructLayout(LayoutKind.Sequential)]
public struct GstAudioInfo_rateAlign
{
sbyte f1;
private int rate;
}
[StructLayout(LayoutKind.Sequential)]
public struct GstAudioInfo_channelsAlign
{
sbyte f1;
private int channels;
}
[StructLayout(LayoutKind.Sequential)]
public struct GstAudioInfo_bpfAlign
{
sbyte f1;
private int bpf;
}
[StructLayout(LayoutKind.Sequential)]
public struct GstAudioInfo_positionAlign
{
sbyte f1;
[MarshalAs (UnmanagedType.ByValArray, SizeConst=64)]
private Gst.Audio.AudioChannelPosition[] position;
}
// End of the ABI representation.
#endregion
}
}
@@ -0,0 +1,28 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[GLib.GType (typeof (Gst.Audio.AudioLayoutGType))]
public enum AudioLayout {
Interleaved = 0,
NonInterleaved = 1,
}
internal class AudioLayoutGType {
[DllImport ("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_layout_get_type ();
public static GLib.GType GType {
get {
return new GLib.GType (gst_audio_layout_get_type ());
}
}
}
#endregion
}
@@ -0,0 +1,74 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
[StructLayout(LayoutKind.Sequential)]
public partial struct AudioMeta : IEquatable<AudioMeta> {
public Gst.Meta Meta;
private IntPtr _info;
public Gst.Audio.AudioInfo Info {
get {
return _info == IntPtr.Zero ? null : (Gst.Audio.AudioInfo) GLib.Opaque.GetOpaque (_info, typeof (Gst.Audio.AudioInfo), false);
}
set {
_info = value == null ? IntPtr.Zero : value.Handle;
}
}
private UIntPtr samples;
public ulong Samples {
get {
return (ulong) samples;
}
set {
samples = new UIntPtr (value);
}
}
private UIntPtr offsets;
public ulong Offsets {
get {
return (ulong) offsets;
}
set {
offsets = new UIntPtr (value);
}
}
[MarshalAs (UnmanagedType.ByValArray, SizeConst=4)]
private IntPtr[] _gstGstReserved;
public static Gst.Audio.AudioMeta Zero = new Gst.Audio.AudioMeta ();
public static Gst.Audio.AudioMeta New(IntPtr raw) {
if (raw == IntPtr.Zero)
return Gst.Audio.AudioMeta.Zero;
return (Gst.Audio.AudioMeta) Marshal.PtrToStructure (raw, typeof (Gst.Audio.AudioMeta));
}
public bool Equals (AudioMeta other)
{
return true && Meta.Equals (other.Meta) && Info.Equals (other.Info) && Samples.Equals (other.Samples) && Offsets.Equals (other.Offsets);
}
public override bool Equals (object other)
{
return other is AudioMeta && Equals ((AudioMeta) other);
}
public override int GetHashCode ()
{
return this.GetType ().FullName.GetHashCode () ^ Meta.GetHashCode () ^ Info.GetHashCode () ^ Samples.GetHashCode () ^ Offsets.GetHashCode ();
}
private static GLib.GType GType {
get { return GLib.GType.Pointer; }
}
#endregion
}
}
@@ -0,0 +1,31 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[GLib.GType (typeof (Gst.Audio.AudioNoiseShapingMethodGType))]
public enum AudioNoiseShapingMethod {
None = 0,
ErrorFeedback = 1,
Simple = 2,
Medium = 3,
High = 4,
}
internal class AudioNoiseShapingMethodGType {
[DllImport ("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_noise_shaping_method_get_type ();
public static GLib.GType GType {
get {
return new GLib.GType (gst_audio_noise_shaping_method_get_type ());
}
}
}
#endregion
}
@@ -0,0 +1,29 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[Flags]
[GLib.GType (typeof (Gst.Audio.AudioPackFlagsGType))]
public enum AudioPackFlags : uint {
None = 0,
TruncateRange = 1,
}
internal class AudioPackFlagsGType {
[DllImport ("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_pack_flags_get_type ();
public static GLib.GType GType {
get {
return new GLib.GType (gst_audio_pack_flags_get_type ());
}
}
}
#endregion
}
@@ -0,0 +1,66 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class AudioQuantize : GLib.Opaque {
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_audio_quantize_reset(IntPtr raw);
public void Reset() {
gst_audio_quantize_reset(Handle);
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_audio_quantize_samples(IntPtr raw, IntPtr in_param, IntPtr out_param, uint samples);
public void Samples(IntPtr in_param, IntPtr out_param, uint samples) {
gst_audio_quantize_samples(Handle, in_param, out_param, samples);
}
public void Samples(uint samples) {
Samples (IntPtr.Zero, IntPtr.Zero, samples);
}
public AudioQuantize(IntPtr raw) : base(raw) {}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_audio_quantize_free(IntPtr raw);
protected override void Free (IntPtr raw)
{
gst_audio_quantize_free (raw);
}
protected override Action<IntPtr> DisposeUnmanagedFunc {
get {
return gst_audio_quantize_free;
}
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}
@@ -0,0 +1,29 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[Flags]
[GLib.GType (typeof (Gst.Audio.AudioQuantizeFlagsGType))]
public enum AudioQuantizeFlags : uint {
None = 0,
NonInterleaved = 1,
}
internal class AudioQuantizeFlagsGType {
[DllImport ("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_quantize_flags_get_type ();
public static GLib.GType GType {
get {
return new GLib.GType (gst_audio_quantize_flags_get_type ());
}
}
}
#endregion
}
@@ -0,0 +1,120 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class AudioResampler : GLib.Opaque {
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern UIntPtr gst_audio_resampler_get_in_frames(IntPtr raw, UIntPtr out_frames);
public ulong GetInFrames(ulong out_frames) {
UIntPtr raw_ret = gst_audio_resampler_get_in_frames(Handle, new UIntPtr (out_frames));
ulong ret = (ulong) raw_ret;
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern UIntPtr gst_audio_resampler_get_max_latency(IntPtr raw);
public ulong MaxLatency {
get {
UIntPtr raw_ret = gst_audio_resampler_get_max_latency(Handle);
ulong ret = (ulong) raw_ret;
return ret;
}
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern UIntPtr gst_audio_resampler_get_out_frames(IntPtr raw, UIntPtr in_frames);
public ulong GetOutFrames(ulong in_frames) {
UIntPtr raw_ret = gst_audio_resampler_get_out_frames(Handle, new UIntPtr (in_frames));
ulong ret = (ulong) raw_ret;
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_audio_resampler_resample(IntPtr raw, IntPtr in_param, UIntPtr in_frames, IntPtr out_param, UIntPtr out_frames);
public void Resample(IntPtr in_param, ulong in_frames, IntPtr out_param, ulong out_frames) {
gst_audio_resampler_resample(Handle, in_param, new UIntPtr (in_frames), out_param, new UIntPtr (out_frames));
}
public void Resample(ulong in_frames, ulong out_frames) {
Resample (IntPtr.Zero, in_frames, IntPtr.Zero, out_frames);
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_audio_resampler_reset(IntPtr raw);
public void Reset() {
gst_audio_resampler_reset(Handle);
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_audio_resampler_update(IntPtr raw, int in_rate, int out_rate, IntPtr options);
public bool Update(int in_rate, int out_rate, Gst.Structure options) {
bool raw_ret = gst_audio_resampler_update(Handle, in_rate, out_rate, options == null ? IntPtr.Zero : options.Handle);
bool ret = raw_ret;
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_resampler_new(int method, int flags, int format, int channels, int in_rate, int out_rate, IntPtr options);
public static Gst.Audio.AudioResampler New(Gst.Audio.AudioResamplerMethod method, Gst.Audio.AudioResamplerFlags flags, Gst.Audio.AudioFormat format, int channels, int in_rate, int out_rate, Gst.Structure options) {
IntPtr raw_ret = gst_audio_resampler_new((int) method, (int) flags, (int) format, channels, in_rate, out_rate, options == null ? IntPtr.Zero : options.Handle);
Gst.Audio.AudioResampler ret = raw_ret == IntPtr.Zero ? null : (Gst.Audio.AudioResampler) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Audio.AudioResampler), true);
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_audio_resampler_options_set_quality(int method, uint quality, int in_rate, int out_rate, IntPtr options);
public static void OptionsSetQuality(Gst.Audio.AudioResamplerMethod method, uint quality, int in_rate, int out_rate, Gst.Structure options) {
gst_audio_resampler_options_set_quality((int) method, quality, in_rate, out_rate, options == null ? IntPtr.Zero : options.Handle);
}
public AudioResampler(IntPtr raw) : base(raw) {}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_audio_resampler_free(IntPtr raw);
protected override void Free (IntPtr raw)
{
gst_audio_resampler_free (raw);
}
protected override Action<IntPtr> DisposeUnmanagedFunc {
get {
return gst_audio_resampler_free;
}
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}
@@ -0,0 +1,29 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[GLib.GType (typeof (Gst.Audio.AudioResamplerFilterInterpolationGType))]
public enum AudioResamplerFilterInterpolation {
None = 0,
Linear = 1,
Cubic = 2,
}
internal class AudioResamplerFilterInterpolationGType {
[DllImport ("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_resampler_filter_interpolation_get_type ();
public static GLib.GType GType {
get {
return new GLib.GType (gst_audio_resampler_filter_interpolation_get_type ());
}
}
}
#endregion
}
@@ -0,0 +1,29 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[GLib.GType (typeof (Gst.Audio.AudioResamplerFilterModeGType))]
public enum AudioResamplerFilterMode {
Interpolated = 0,
Full = 1,
Auto = 2,
}
internal class AudioResamplerFilterModeGType {
[DllImport ("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_resampler_filter_mode_get_type ();
public static GLib.GType GType {
get {
return new GLib.GType (gst_audio_resampler_filter_mode_get_type ());
}
}
}
#endregion
}
@@ -0,0 +1,31 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[Flags]
[GLib.GType (typeof (Gst.Audio.AudioResamplerFlagsGType))]
public enum AudioResamplerFlags : uint {
None = 0,
NonInterleavedIn = 1,
NonInterleavedOut = 2,
VariableRate = 4,
}
internal class AudioResamplerFlagsGType {
[DllImport ("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_resampler_flags_get_type ();
public static GLib.GType GType {
get {
return new GLib.GType (gst_audio_resampler_flags_get_type ());
}
}
}
#endregion
}
@@ -0,0 +1,31 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[GLib.GType (typeof (Gst.Audio.AudioResamplerMethodGType))]
public enum AudioResamplerMethod {
Nearest = 0,
Linear = 1,
Cubic = 2,
BlackmanNuttall = 3,
Kaiser = 4,
}
internal class AudioResamplerMethodGType {
[DllImport ("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_resampler_method_get_type ();
public static GLib.GType GType {
get {
return new GLib.GType (gst_audio_resampler_method_get_type ());
}
}
}
#endregion
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,10 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
public delegate void AudioRingBufferCallback(Gst.Audio.AudioRingBuffer rbuf, byte[] data, uint len);
}
@@ -0,0 +1,41 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[GLib.GType (typeof (Gst.Audio.AudioRingBufferFormatTypeGType))]
public enum AudioRingBufferFormatType {
Raw = 0,
MuLaw = 1,
ALaw = 2,
ImaAdpcm = 3,
Mpeg = 4,
Gsm = 5,
Iec958 = 6,
Ac3 = 7,
Eac3 = 8,
Dts = 9,
Mpeg2Aac = 10,
Mpeg4Aac = 11,
Mpeg2AacRaw = 12,
Mpeg4AacRaw = 13,
Flac = 14,
}
internal class AudioRingBufferFormatTypeGType {
[DllImport ("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_ring_buffer_format_type_get_type ();
public static GLib.GType GType {
get {
return new GLib.GType (gst_audio_ring_buffer_format_type_get_type ());
}
}
}
#endregion
}
@@ -0,0 +1,268 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class AudioRingBufferSpec : GLib.Opaque {
public Gst.Caps Caps {
get {
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("caps"));
return (*raw_ptr) == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque ((*raw_ptr), typeof (Gst.Caps), false);
}
}
set {
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("caps"));
*raw_ptr = value == null ? IntPtr.Zero : value.Handle;
}
}
}
public Gst.Audio.AudioRingBufferFormatType Type {
get {
unsafe {
int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("type"));
return (Gst.Audio.AudioRingBufferFormatType) (*raw_ptr);
}
}
set {
unsafe {
int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("type"));
*raw_ptr = (int) value;
}
}
}
public Gst.Audio.AudioInfo Info {
get {
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("info"));
return (*raw_ptr) == IntPtr.Zero ? null : (Gst.Audio.AudioInfo) GLib.Opaque.GetOpaque ((*raw_ptr), typeof (Gst.Audio.AudioInfo), false);
}
}
set {
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("info"));
*raw_ptr = value == null ? IntPtr.Zero : value.Handle;
}
}
}
public ulong LatencyTime {
get {
unsafe {
ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("latency_time"));
return (*raw_ptr);
}
}
set {
unsafe {
ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("latency_time"));
*raw_ptr = value;
}
}
}
public ulong BufferTime {
get {
unsafe {
ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("buffer_time"));
return (*raw_ptr);
}
}
set {
unsafe {
ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("buffer_time"));
*raw_ptr = value;
}
}
}
public int Segsize {
get {
unsafe {
int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("segsize"));
return (*raw_ptr);
}
}
set {
unsafe {
int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("segsize"));
*raw_ptr = value;
}
}
}
public int Segtotal {
get {
unsafe {
int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("segtotal"));
return (*raw_ptr);
}
}
set {
unsafe {
int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("segtotal"));
*raw_ptr = value;
}
}
}
public int Seglatency {
get {
unsafe {
int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("seglatency"));
return (*raw_ptr);
}
}
set {
unsafe {
int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("seglatency"));
*raw_ptr = value;
}
}
}
public AudioRingBufferSpec(IntPtr raw) : base(raw) {}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("caps"
, 0
, (uint) Marshal.SizeOf(typeof(IntPtr)) // caps
, null
, "type"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("type"
, -1
, (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.Audio.AudioRingBufferFormatType))) // type
, "caps"
, "info"
, (long) Marshal.OffsetOf(typeof(GstAudioRingBufferSpec_typeAlign), "type")
, 0
),
new GLib.AbiField("info"
, -1
, Gst.Audio.AudioInfo.abi_info.Size // info
, "type"
, "latency_time"
, Gst.Audio.AudioInfo.abi_info.Align
, 0
),
new GLib.AbiField("latency_time"
, -1
, (uint) Marshal.SizeOf(typeof(ulong)) // latency_time
, "info"
, "buffer_time"
, (long) Marshal.OffsetOf(typeof(GstAudioRingBufferSpec_latency_timeAlign), "latency_time")
, 0
),
new GLib.AbiField("buffer_time"
, -1
, (uint) Marshal.SizeOf(typeof(ulong)) // buffer_time
, "latency_time"
, "segsize"
, (long) Marshal.OffsetOf(typeof(GstAudioRingBufferSpec_buffer_timeAlign), "buffer_time")
, 0
),
new GLib.AbiField("segsize"
, -1
, (uint) Marshal.SizeOf(typeof(int)) // segsize
, "buffer_time"
, "segtotal"
, (long) Marshal.OffsetOf(typeof(GstAudioRingBufferSpec_segsizeAlign), "segsize")
, 0
),
new GLib.AbiField("segtotal"
, -1
, (uint) Marshal.SizeOf(typeof(int)) // segtotal
, "segsize"
, "seglatency"
, (long) Marshal.OffsetOf(typeof(GstAudioRingBufferSpec_segtotalAlign), "segtotal")
, 0
),
new GLib.AbiField("seglatency"
, -1
, (uint) Marshal.SizeOf(typeof(int)) // seglatency
, "segtotal"
, "_gst_reserved"
, (long) Marshal.OffsetOf(typeof(GstAudioRingBufferSpec_seglatencyAlign), "seglatency")
, 0
),
new GLib.AbiField("_gst_reserved"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
, "seglatency"
, null
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
});
return _abi_info;
}
}
[StructLayout(LayoutKind.Sequential)]
public struct GstAudioRingBufferSpec_typeAlign
{
sbyte f1;
private Gst.Audio.AudioRingBufferFormatType type;
}
[StructLayout(LayoutKind.Sequential)]
public struct GstAudioRingBufferSpec_latency_timeAlign
{
sbyte f1;
private ulong latency_time;
}
[StructLayout(LayoutKind.Sequential)]
public struct GstAudioRingBufferSpec_buffer_timeAlign
{
sbyte f1;
private ulong buffer_time;
}
[StructLayout(LayoutKind.Sequential)]
public struct GstAudioRingBufferSpec_segsizeAlign
{
sbyte f1;
private int segsize;
}
[StructLayout(LayoutKind.Sequential)]
public struct GstAudioRingBufferSpec_segtotalAlign
{
sbyte f1;
private int segtotal;
}
[StructLayout(LayoutKind.Sequential)]
public struct GstAudioRingBufferSpec_seglatencyAlign
{
sbyte f1;
private int seglatency;
}
// End of the ABI representation.
#endregion
}
}
@@ -0,0 +1,30 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[GLib.GType (typeof (Gst.Audio.AudioRingBufferStateGType))]
public enum AudioRingBufferState {
Stopped = 0,
Paused = 1,
Started = 2,
Error = 3,
}
internal class AudioRingBufferStateGType {
[DllImport ("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_ring_buffer_state_get_type ();
public static GLib.GType GType {
get {
return new GLib.GType (gst_audio_ring_buffer_state_get_type ());
}
}
}
#endregion
}
@@ -0,0 +1,735 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class AudioSink : Gst.Audio.AudioBaseSink {
public AudioSink (IntPtr raw) : base(raw) {}
protected AudioSink() : base(IntPtr.Zero)
{
CreateNativeObject (new string [0], new GLib.Value [0]);
}
static OpenNativeDelegate Open_cb_delegate;
static OpenNativeDelegate OpenVMCallback {
get {
if (Open_cb_delegate == null)
Open_cb_delegate = new OpenNativeDelegate (Open_cb);
return Open_cb_delegate;
}
}
static void OverrideOpen (GLib.GType gtype)
{
OverrideOpen (gtype, OpenVMCallback);
}
static void OverrideOpen (GLib.GType gtype, OpenNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("open"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool OpenNativeDelegate (IntPtr inst);
static bool Open_cb (IntPtr inst)
{
try {
AudioSink __obj = GLib.Object.GetObject (inst, false) as AudioSink;
bool __result;
__result = __obj.OnOpen ();
return __result;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw e;
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSink), ConnectionMethod="OverrideOpen")]
protected virtual bool OnOpen ()
{
return InternalOpen ();
}
private bool InternalOpen ()
{
OpenNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("open"));
unmanaged = (OpenNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(OpenNativeDelegate));
}
if (unmanaged == null) return false;
bool __result = unmanaged (this.Handle);
return __result;
}
static PrepareNativeDelegate Prepare_cb_delegate;
static PrepareNativeDelegate PrepareVMCallback {
get {
if (Prepare_cb_delegate == null)
Prepare_cb_delegate = new PrepareNativeDelegate (Prepare_cb);
return Prepare_cb_delegate;
}
}
static void OverridePrepare (GLib.GType gtype)
{
OverridePrepare (gtype, PrepareVMCallback);
}
static void OverridePrepare (GLib.GType gtype, PrepareNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("prepare"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool PrepareNativeDelegate (IntPtr inst, IntPtr spec);
static bool Prepare_cb (IntPtr inst, IntPtr spec)
{
try {
AudioSink __obj = GLib.Object.GetObject (inst, false) as AudioSink;
bool __result;
__result = __obj.OnPrepare (spec == IntPtr.Zero ? null : (Gst.Audio.AudioRingBufferSpec) GLib.Opaque.GetOpaque (spec, typeof (Gst.Audio.AudioRingBufferSpec), false));
return __result;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw e;
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSink), ConnectionMethod="OverridePrepare")]
protected virtual bool OnPrepare (Gst.Audio.AudioRingBufferSpec spec)
{
return InternalPrepare (spec);
}
private bool InternalPrepare (Gst.Audio.AudioRingBufferSpec spec)
{
PrepareNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("prepare"));
unmanaged = (PrepareNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PrepareNativeDelegate));
}
if (unmanaged == null) return false;
bool __result = unmanaged (this.Handle, spec == null ? IntPtr.Zero : spec.Handle);
return __result;
}
static UnprepareNativeDelegate Unprepare_cb_delegate;
static UnprepareNativeDelegate UnprepareVMCallback {
get {
if (Unprepare_cb_delegate == null)
Unprepare_cb_delegate = new UnprepareNativeDelegate (Unprepare_cb);
return Unprepare_cb_delegate;
}
}
static void OverrideUnprepare (GLib.GType gtype)
{
OverrideUnprepare (gtype, UnprepareVMCallback);
}
static void OverrideUnprepare (GLib.GType gtype, UnprepareNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("unprepare"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool UnprepareNativeDelegate (IntPtr inst);
static bool Unprepare_cb (IntPtr inst)
{
try {
AudioSink __obj = GLib.Object.GetObject (inst, false) as AudioSink;
bool __result;
__result = __obj.OnUnprepare ();
return __result;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw e;
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSink), ConnectionMethod="OverrideUnprepare")]
protected virtual bool OnUnprepare ()
{
return InternalUnprepare ();
}
private bool InternalUnprepare ()
{
UnprepareNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("unprepare"));
unmanaged = (UnprepareNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(UnprepareNativeDelegate));
}
if (unmanaged == null) return false;
bool __result = unmanaged (this.Handle);
return __result;
}
static CloseNativeDelegate Close_cb_delegate;
static CloseNativeDelegate CloseVMCallback {
get {
if (Close_cb_delegate == null)
Close_cb_delegate = new CloseNativeDelegate (Close_cb);
return Close_cb_delegate;
}
}
static void OverrideClose (GLib.GType gtype)
{
OverrideClose (gtype, CloseVMCallback);
}
static void OverrideClose (GLib.GType gtype, CloseNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("close"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool CloseNativeDelegate (IntPtr inst);
static bool Close_cb (IntPtr inst)
{
try {
AudioSink __obj = GLib.Object.GetObject (inst, false) as AudioSink;
bool __result;
__result = __obj.OnClose ();
return __result;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw e;
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSink), ConnectionMethod="OverrideClose")]
protected virtual bool OnClose ()
{
return InternalClose ();
}
private bool InternalClose ()
{
CloseNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("close"));
unmanaged = (CloseNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CloseNativeDelegate));
}
if (unmanaged == null) return false;
bool __result = unmanaged (this.Handle);
return __result;
}
static WriteNativeDelegate Write_cb_delegate;
static WriteNativeDelegate WriteVMCallback {
get {
if (Write_cb_delegate == null)
Write_cb_delegate = new WriteNativeDelegate (Write_cb);
return Write_cb_delegate;
}
}
static void OverrideWrite (GLib.GType gtype)
{
OverrideWrite (gtype, WriteVMCallback);
}
static void OverrideWrite (GLib.GType gtype, WriteNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("write"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate int WriteNativeDelegate (IntPtr inst, IntPtr data, uint length);
static int Write_cb (IntPtr inst, IntPtr data, uint length)
{
try {
AudioSink __obj = GLib.Object.GetObject (inst, false) as AudioSink;
int __result;
__result = __obj.OnWrite (data, length);
return __result;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw e;
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSink), ConnectionMethod="OverrideWrite")]
protected virtual int OnWrite (IntPtr data, uint length)
{
return InternalWrite (data, length);
}
private int InternalWrite (IntPtr data, uint length)
{
WriteNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("write"));
unmanaged = (WriteNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(WriteNativeDelegate));
}
if (unmanaged == null) return 0;
int __result = unmanaged (this.Handle, data, length);
return __result;
}
static DelayNativeDelegate Delay_cb_delegate;
static DelayNativeDelegate DelayVMCallback {
get {
if (Delay_cb_delegate == null)
Delay_cb_delegate = new DelayNativeDelegate (Delay_cb);
return Delay_cb_delegate;
}
}
static void OverrideDelay (GLib.GType gtype)
{
OverrideDelay (gtype, DelayVMCallback);
}
static void OverrideDelay (GLib.GType gtype, DelayNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("delay"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate uint DelayNativeDelegate (IntPtr inst);
static uint Delay_cb (IntPtr inst)
{
try {
AudioSink __obj = GLib.Object.GetObject (inst, false) as AudioSink;
uint __result;
__result = __obj.OnDelay ();
return __result;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw e;
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSink), ConnectionMethod="OverrideDelay")]
protected virtual uint OnDelay ()
{
return InternalDelay ();
}
private uint InternalDelay ()
{
DelayNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("delay"));
unmanaged = (DelayNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DelayNativeDelegate));
}
if (unmanaged == null) return 0;
uint __result = unmanaged (this.Handle);
return __result;
}
static ResetNativeDelegate Reset_cb_delegate;
static ResetNativeDelegate ResetVMCallback {
get {
if (Reset_cb_delegate == null)
Reset_cb_delegate = new ResetNativeDelegate (Reset_cb);
return Reset_cb_delegate;
}
}
static void OverrideReset (GLib.GType gtype)
{
OverrideReset (gtype, ResetVMCallback);
}
static void OverrideReset (GLib.GType gtype, ResetNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("reset"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void ResetNativeDelegate (IntPtr inst);
static void Reset_cb (IntPtr inst)
{
try {
AudioSink __obj = GLib.Object.GetObject (inst, false) as AudioSink;
__obj.OnReset ();
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSink), ConnectionMethod="OverrideReset")]
protected virtual void OnReset ()
{
InternalReset ();
}
private void InternalReset ()
{
ResetNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("reset"));
unmanaged = (ResetNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ResetNativeDelegate));
}
if (unmanaged == null) return;
unmanaged (this.Handle);
}
static PauseNativeDelegate Pause_cb_delegate;
static PauseNativeDelegate PauseVMCallback {
get {
if (Pause_cb_delegate == null)
Pause_cb_delegate = new PauseNativeDelegate (Pause_cb);
return Pause_cb_delegate;
}
}
static void OverridePause (GLib.GType gtype)
{
OverridePause (gtype, PauseVMCallback);
}
static void OverridePause (GLib.GType gtype, PauseNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("pause"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void PauseNativeDelegate (IntPtr inst);
static void Pause_cb (IntPtr inst)
{
try {
AudioSink __obj = GLib.Object.GetObject (inst, false) as AudioSink;
__obj.OnPause ();
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSink), ConnectionMethod="OverridePause")]
protected virtual void OnPause ()
{
InternalPause ();
}
private void InternalPause ()
{
PauseNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("pause"));
unmanaged = (PauseNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PauseNativeDelegate));
}
if (unmanaged == null) return;
unmanaged (this.Handle);
}
static ResumeNativeDelegate Resume_cb_delegate;
static ResumeNativeDelegate ResumeVMCallback {
get {
if (Resume_cb_delegate == null)
Resume_cb_delegate = new ResumeNativeDelegate (Resume_cb);
return Resume_cb_delegate;
}
}
static void OverrideResume (GLib.GType gtype)
{
OverrideResume (gtype, ResumeVMCallback);
}
static void OverrideResume (GLib.GType gtype, ResumeNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("resume"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void ResumeNativeDelegate (IntPtr inst);
static void Resume_cb (IntPtr inst)
{
try {
AudioSink __obj = GLib.Object.GetObject (inst, false) as AudioSink;
__obj.OnResume ();
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSink), ConnectionMethod="OverrideResume")]
protected virtual void OnResume ()
{
InternalResume ();
}
private void InternalResume ()
{
ResumeNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("resume"));
unmanaged = (ResumeNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ResumeNativeDelegate));
}
if (unmanaged == null) return;
unmanaged (this.Handle);
}
static StopNativeDelegate Stop_cb_delegate;
static StopNativeDelegate StopVMCallback {
get {
if (Stop_cb_delegate == null)
Stop_cb_delegate = new StopNativeDelegate (Stop_cb);
return Stop_cb_delegate;
}
}
static void OverrideStop (GLib.GType gtype)
{
OverrideStop (gtype, StopVMCallback);
}
static void OverrideStop (GLib.GType gtype, StopNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("stop"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void StopNativeDelegate (IntPtr inst);
static void Stop_cb (IntPtr inst)
{
try {
AudioSink __obj = GLib.Object.GetObject (inst, false) as AudioSink;
__obj.OnStop ();
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSink), ConnectionMethod="OverrideStop")]
protected virtual void OnStop ()
{
InternalStop ();
}
private void InternalStop ()
{
StopNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("stop"));
unmanaged = (StopNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(StopNativeDelegate));
}
if (unmanaged == null) return;
unmanaged (this.Handle);
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _class_abi = null;
static public new GLib.AbiStruct class_abi {
get {
if (_class_abi == null)
_class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("open"
, Gst.Audio.AudioBaseSink.class_abi.Fields
, (uint) Marshal.SizeOf(typeof(IntPtr)) // open
, null
, "prepare"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("prepare"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // prepare
, "open"
, "unprepare"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("unprepare"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // unprepare
, "prepare"
, "close"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("close"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // close
, "unprepare"
, "write"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("write"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // write
, "close"
, "delay"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("delay"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // delay
, "write"
, "reset"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("reset"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // reset
, "delay"
, "pause"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("pause"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // pause
, "reset"
, "resume"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("resume"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // resume
, "pause"
, "stop"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("stop"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // stop
, "resume"
, "extension"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("extension"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // extension
, "stop"
, null
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
});
return _class_abi;
}
}
// End of the ABI representation.
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_sink_get_type();
public static new GLib.GType GType {
get {
IntPtr raw_ret = gst_audio_sink_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
}
static AudioSink ()
{
GtkSharp.GstreamerSharp.ObjectManager.Initialize ();
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public new GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("thread"
, Gst.Audio.AudioBaseSink.abi_info.Fields
, (uint) Marshal.SizeOf(typeof(IntPtr)) // thread
, null
, "_gst_reserved"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("_gst_reserved"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
, "thread"
, null
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}
@@ -0,0 +1,45 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
[StructLayout(LayoutKind.Sequential)]
public partial struct AudioSinkClassExtension : IEquatable<AudioSinkClassExtension> {
private IntPtr _clear_all;
public static Gst.Audio.AudioSinkClassExtension Zero = new Gst.Audio.AudioSinkClassExtension ();
public static Gst.Audio.AudioSinkClassExtension New(IntPtr raw) {
if (raw == IntPtr.Zero)
return Gst.Audio.AudioSinkClassExtension.Zero;
return (Gst.Audio.AudioSinkClassExtension) Marshal.PtrToStructure (raw, typeof (Gst.Audio.AudioSinkClassExtension));
}
public bool Equals (AudioSinkClassExtension other)
{
return true && _clear_all.Equals (other._clear_all);
}
public override bool Equals (object other)
{
return other is AudioSinkClassExtension && Equals ((AudioSinkClassExtension) other);
}
public override int GetHashCode ()
{
return this.GetType ().FullName.GetHashCode () ^ _clear_all.GetHashCode ();
}
private static GLib.GType GType {
get { return GLib.GType.Pointer; }
}
#endregion
}
}
@@ -0,0 +1,552 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class AudioSrc : Gst.Audio.AudioBaseSrc {
public AudioSrc (IntPtr raw) : base(raw) {}
protected AudioSrc() : base(IntPtr.Zero)
{
CreateNativeObject (new string [0], new GLib.Value [0]);
}
static OpenNativeDelegate Open_cb_delegate;
static OpenNativeDelegate OpenVMCallback {
get {
if (Open_cb_delegate == null)
Open_cb_delegate = new OpenNativeDelegate (Open_cb);
return Open_cb_delegate;
}
}
static void OverrideOpen (GLib.GType gtype)
{
OverrideOpen (gtype, OpenVMCallback);
}
static void OverrideOpen (GLib.GType gtype, OpenNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("open"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool OpenNativeDelegate (IntPtr inst);
static bool Open_cb (IntPtr inst)
{
try {
AudioSrc __obj = GLib.Object.GetObject (inst, false) as AudioSrc;
bool __result;
__result = __obj.OnOpen ();
return __result;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw e;
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSrc), ConnectionMethod="OverrideOpen")]
protected virtual bool OnOpen ()
{
return InternalOpen ();
}
private bool InternalOpen ()
{
OpenNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("open"));
unmanaged = (OpenNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(OpenNativeDelegate));
}
if (unmanaged == null) return false;
bool __result = unmanaged (this.Handle);
return __result;
}
static PrepareNativeDelegate Prepare_cb_delegate;
static PrepareNativeDelegate PrepareVMCallback {
get {
if (Prepare_cb_delegate == null)
Prepare_cb_delegate = new PrepareNativeDelegate (Prepare_cb);
return Prepare_cb_delegate;
}
}
static void OverridePrepare (GLib.GType gtype)
{
OverridePrepare (gtype, PrepareVMCallback);
}
static void OverridePrepare (GLib.GType gtype, PrepareNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("prepare"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool PrepareNativeDelegate (IntPtr inst, IntPtr spec);
static bool Prepare_cb (IntPtr inst, IntPtr spec)
{
try {
AudioSrc __obj = GLib.Object.GetObject (inst, false) as AudioSrc;
bool __result;
__result = __obj.OnPrepare (spec == IntPtr.Zero ? null : (Gst.Audio.AudioRingBufferSpec) GLib.Opaque.GetOpaque (spec, typeof (Gst.Audio.AudioRingBufferSpec), false));
return __result;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw e;
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSrc), ConnectionMethod="OverridePrepare")]
protected virtual bool OnPrepare (Gst.Audio.AudioRingBufferSpec spec)
{
return InternalPrepare (spec);
}
private bool InternalPrepare (Gst.Audio.AudioRingBufferSpec spec)
{
PrepareNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("prepare"));
unmanaged = (PrepareNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PrepareNativeDelegate));
}
if (unmanaged == null) return false;
bool __result = unmanaged (this.Handle, spec == null ? IntPtr.Zero : spec.Handle);
return __result;
}
static UnprepareNativeDelegate Unprepare_cb_delegate;
static UnprepareNativeDelegate UnprepareVMCallback {
get {
if (Unprepare_cb_delegate == null)
Unprepare_cb_delegate = new UnprepareNativeDelegate (Unprepare_cb);
return Unprepare_cb_delegate;
}
}
static void OverrideUnprepare (GLib.GType gtype)
{
OverrideUnprepare (gtype, UnprepareVMCallback);
}
static void OverrideUnprepare (GLib.GType gtype, UnprepareNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("unprepare"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool UnprepareNativeDelegate (IntPtr inst);
static bool Unprepare_cb (IntPtr inst)
{
try {
AudioSrc __obj = GLib.Object.GetObject (inst, false) as AudioSrc;
bool __result;
__result = __obj.OnUnprepare ();
return __result;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw e;
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSrc), ConnectionMethod="OverrideUnprepare")]
protected virtual bool OnUnprepare ()
{
return InternalUnprepare ();
}
private bool InternalUnprepare ()
{
UnprepareNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("unprepare"));
unmanaged = (UnprepareNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(UnprepareNativeDelegate));
}
if (unmanaged == null) return false;
bool __result = unmanaged (this.Handle);
return __result;
}
static CloseNativeDelegate Close_cb_delegate;
static CloseNativeDelegate CloseVMCallback {
get {
if (Close_cb_delegate == null)
Close_cb_delegate = new CloseNativeDelegate (Close_cb);
return Close_cb_delegate;
}
}
static void OverrideClose (GLib.GType gtype)
{
OverrideClose (gtype, CloseVMCallback);
}
static void OverrideClose (GLib.GType gtype, CloseNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("close"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool CloseNativeDelegate (IntPtr inst);
static bool Close_cb (IntPtr inst)
{
try {
AudioSrc __obj = GLib.Object.GetObject (inst, false) as AudioSrc;
bool __result;
__result = __obj.OnClose ();
return __result;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw e;
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSrc), ConnectionMethod="OverrideClose")]
protected virtual bool OnClose ()
{
return InternalClose ();
}
private bool InternalClose ()
{
CloseNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("close"));
unmanaged = (CloseNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CloseNativeDelegate));
}
if (unmanaged == null) return false;
bool __result = unmanaged (this.Handle);
return __result;
}
static ReadNativeDelegate Read_cb_delegate;
static ReadNativeDelegate ReadVMCallback {
get {
if (Read_cb_delegate == null)
Read_cb_delegate = new ReadNativeDelegate (Read_cb);
return Read_cb_delegate;
}
}
static void OverrideRead (GLib.GType gtype)
{
OverrideRead (gtype, ReadVMCallback);
}
static void OverrideRead (GLib.GType gtype, ReadNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("read"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate uint ReadNativeDelegate (IntPtr inst, IntPtr data, uint length, ulong timestamp);
static uint Read_cb (IntPtr inst, IntPtr data, uint length, ulong timestamp)
{
try {
AudioSrc __obj = GLib.Object.GetObject (inst, false) as AudioSrc;
uint __result;
__result = __obj.OnRead (data, length, timestamp);
return __result;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw e;
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSrc), ConnectionMethod="OverrideRead")]
protected virtual uint OnRead (IntPtr data, uint length, ulong timestamp)
{
return InternalRead (data, length, timestamp);
}
private uint InternalRead (IntPtr data, uint length, ulong timestamp)
{
ReadNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("read"));
unmanaged = (ReadNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ReadNativeDelegate));
}
if (unmanaged == null) return 0;
uint __result = unmanaged (this.Handle, data, length, timestamp);
return __result;
}
static DelayNativeDelegate Delay_cb_delegate;
static DelayNativeDelegate DelayVMCallback {
get {
if (Delay_cb_delegate == null)
Delay_cb_delegate = new DelayNativeDelegate (Delay_cb);
return Delay_cb_delegate;
}
}
static void OverrideDelay (GLib.GType gtype)
{
OverrideDelay (gtype, DelayVMCallback);
}
static void OverrideDelay (GLib.GType gtype, DelayNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("delay"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate uint DelayNativeDelegate (IntPtr inst);
static uint Delay_cb (IntPtr inst)
{
try {
AudioSrc __obj = GLib.Object.GetObject (inst, false) as AudioSrc;
uint __result;
__result = __obj.OnDelay ();
return __result;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw e;
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSrc), ConnectionMethod="OverrideDelay")]
protected virtual uint OnDelay ()
{
return InternalDelay ();
}
private uint InternalDelay ()
{
DelayNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("delay"));
unmanaged = (DelayNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DelayNativeDelegate));
}
if (unmanaged == null) return 0;
uint __result = unmanaged (this.Handle);
return __result;
}
static ResetNativeDelegate Reset_cb_delegate;
static ResetNativeDelegate ResetVMCallback {
get {
if (Reset_cb_delegate == null)
Reset_cb_delegate = new ResetNativeDelegate (Reset_cb);
return Reset_cb_delegate;
}
}
static void OverrideReset (GLib.GType gtype)
{
OverrideReset (gtype, ResetVMCallback);
}
static void OverrideReset (GLib.GType gtype, ResetNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("reset"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void ResetNativeDelegate (IntPtr inst);
static void Reset_cb (IntPtr inst)
{
try {
AudioSrc __obj = GLib.Object.GetObject (inst, false) as AudioSrc;
__obj.OnReset ();
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSrc), ConnectionMethod="OverrideReset")]
protected virtual void OnReset ()
{
InternalReset ();
}
private void InternalReset ()
{
ResetNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("reset"));
unmanaged = (ResetNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ResetNativeDelegate));
}
if (unmanaged == null) return;
unmanaged (this.Handle);
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _class_abi = null;
static public new GLib.AbiStruct class_abi {
get {
if (_class_abi == null)
_class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("open"
, Gst.Audio.AudioBaseSrc.class_abi.Fields
, (uint) Marshal.SizeOf(typeof(IntPtr)) // open
, null
, "prepare"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("prepare"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // prepare
, "open"
, "unprepare"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("unprepare"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // unprepare
, "prepare"
, "close"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("close"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // close
, "unprepare"
, "read"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("read"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // read
, "close"
, "delay"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("delay"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // delay
, "read"
, "reset"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("reset"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // reset
, "delay"
, "_gst_reserved"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("_gst_reserved"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
, "reset"
, null
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
});
return _class_abi;
}
}
// End of the ABI representation.
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_src_get_type();
public static new GLib.GType GType {
get {
IntPtr raw_ret = gst_audio_src_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
}
static AudioSrc ()
{
GtkSharp.GstreamerSharp.ObjectManager.Initialize ();
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public new GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("thread"
, Gst.Audio.AudioBaseSrc.abi_info.Fields
, (uint) Marshal.SizeOf(typeof(IntPtr)) // thread
, null
, "_gst_reserved"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("_gst_reserved"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
, "thread"
, null
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}
@@ -0,0 +1,207 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
[StructLayout(LayoutKind.Sequential)]
public partial struct AudioStreamAlign : IEquatable<AudioStreamAlign> {
public static Gst.Audio.AudioStreamAlign Zero = new Gst.Audio.AudioStreamAlign ();
public static Gst.Audio.AudioStreamAlign New(IntPtr raw) {
if (raw == IntPtr.Zero)
return Gst.Audio.AudioStreamAlign.Zero;
return (Gst.Audio.AudioStreamAlign) Marshal.PtrToStructure (raw, typeof (Gst.Audio.AudioStreamAlign));
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_stream_align_new(int rate, ulong alignment_threshold, ulong discont_wait);
public static AudioStreamAlign New(int rate, ulong alignment_threshold, ulong discont_wait)
{
AudioStreamAlign result = AudioStreamAlign.New (gst_audio_stream_align_new(rate, alignment_threshold, discont_wait));
return result;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_stream_align_get_type();
public static GLib.GType GType {
get {
IntPtr raw_ret = gst_audio_stream_align_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern ulong gst_audio_stream_align_get_alignment_threshold(IntPtr raw);
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_audio_stream_align_set_alignment_threshold(IntPtr raw, ulong alignment_threshold);
public ulong AlignmentThreshold {
get {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
ulong raw_ret = gst_audio_stream_align_get_alignment_threshold(this_as_native);
ulong ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
set {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
gst_audio_stream_align_set_alignment_threshold(this_as_native, value);
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
}
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern ulong gst_audio_stream_align_get_discont_wait(IntPtr raw);
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_audio_stream_align_set_discont_wait(IntPtr raw, ulong discont_wait);
public ulong DiscontWait {
get {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
ulong raw_ret = gst_audio_stream_align_get_discont_wait(this_as_native);
ulong ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
set {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
gst_audio_stream_align_set_discont_wait(this_as_native, value);
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
}
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gst_audio_stream_align_get_rate(IntPtr raw);
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_audio_stream_align_set_rate(IntPtr raw, int rate);
public int Rate {
get {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
int raw_ret = gst_audio_stream_align_get_rate(this_as_native);
int ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
set {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
gst_audio_stream_align_set_rate(this_as_native, value);
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
}
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern ulong gst_audio_stream_align_get_samples_since_discont(IntPtr raw);
public ulong SamplesSinceDiscont {
get {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
ulong raw_ret = gst_audio_stream_align_get_samples_since_discont(this_as_native);
ulong ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern ulong gst_audio_stream_align_get_timestamp_at_discont(IntPtr raw);
public ulong TimestampAtDiscont {
get {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
ulong raw_ret = gst_audio_stream_align_get_timestamp_at_discont(this_as_native);
ulong ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_audio_stream_align_mark_discont(IntPtr raw);
public void MarkDiscont() {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
gst_audio_stream_align_mark_discont(this_as_native);
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_audio_stream_align_process(IntPtr raw, bool discont, ulong timestamp, uint n_samples, out ulong out_timestamp, out ulong out_duration, out ulong out_sample_position);
public bool Process(bool discont, ulong timestamp, uint n_samples, out ulong out_timestamp, out ulong out_duration, out ulong out_sample_position) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_audio_stream_align_process(this_as_native, discont, timestamp, n_samples, out out_timestamp, out out_duration, out out_sample_position);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
static void ReadNative (IntPtr native, ref Gst.Audio.AudioStreamAlign target)
{
target = New (native);
}
public bool Equals (AudioStreamAlign other)
{
return true;
}
public override bool Equals (object other)
{
return other is AudioStreamAlign && Equals ((AudioStreamAlign) other);
}
public override int GetHashCode ()
{
return this.GetType ().FullName.GetHashCode ();
}
public static explicit operator GLib.Value (Gst.Audio.AudioStreamAlign boxed)
{
GLib.Value val = GLib.Value.Empty;
val.Init (Gst.Audio.AudioStreamAlign.GType);
val.Val = boxed;
return val;
}
public static explicit operator Gst.Audio.AudioStreamAlign (GLib.Value val)
{
return (Gst.Audio.AudioStreamAlign) val.Val;
}
#endregion
}
}
@@ -0,0 +1,49 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class Constants {
public const string AUDIO_CHANNELS_RANGE = @"(int) [ 1, max ]";
public const string AUDIO_CONVERTER_OPT_DITHER_METHOD = @"GstAudioConverter.dither-method";
public const string AUDIO_CONVERTER_OPT_MIX_MATRIX = @"GstAudioConverter.mix-matrix";
public const string AUDIO_CONVERTER_OPT_NOISE_SHAPING_METHOD = @"GstAudioConverter.noise-shaping-method";
public const string AUDIO_CONVERTER_OPT_QUANTIZATION = @"GstAudioConverter.quantization";
public const string AUDIO_CONVERTER_OPT_RESAMPLER_METHOD = @"GstAudioConverter.resampler-method";
public const int AUDIO_DECODER_MAX_ERRORS = 10;
public const string AUDIO_DECODER_SINK_NAME = @"sink";
public const string AUDIO_DECODER_SRC_NAME = @"src";
public const int AUDIO_DEF_CHANNELS = 2;
public const string AUDIO_DEF_FORMAT = @"S16LE";
public const int AUDIO_DEF_RATE = 44100;
public const string AUDIO_ENCODER_SINK_NAME = @"sink";
public const string AUDIO_ENCODER_SRC_NAME = @"src";
public const string AUDIO_FORMATS_ALL = @"{ F64BE, F64LE, F32BE, F32LE, S32BE, S32LE, U32BE, U32LE, S24_32BE, S24_32LE, U24_32BE, U24_32LE, S24BE, S24LE, U24BE, U24LE, S20BE, S20LE, U20BE, U20LE, S18BE, S18LE, U18BE, U18LE, S16BE, S16LE, U16BE, U16LE, S8, U8 }";
public const string AUDIO_RATE_RANGE = @"(int) [ 1, max ]";
public const string AUDIO_RESAMPLER_OPT_CUBIC_B = @"GstAudioResampler.cubic-b";
public const string AUDIO_RESAMPLER_OPT_CUBIC_C = @"GstAudioResampler.cubic-c";
public const string AUDIO_RESAMPLER_OPT_CUTOFF = @"GstAudioResampler.cutoff";
public const string AUDIO_RESAMPLER_OPT_FILTER_INTERPOLATION = @"GstAudioResampler.filter-interpolation";
public const string AUDIO_RESAMPLER_OPT_FILTER_MODE = @"GstAudioResampler.filter-mode";
public const string AUDIO_RESAMPLER_OPT_FILTER_MODE_THRESHOLD = @"GstAudioResampler.filter-mode-threshold";
public const string AUDIO_RESAMPLER_OPT_FILTER_OVERSAMPLE = @"GstAudioResampler.filter-oversample";
public const string AUDIO_RESAMPLER_OPT_MAX_PHASE_ERROR = @"GstAudioResampler.max-phase-error";
public const string AUDIO_RESAMPLER_OPT_N_TAPS = @"GstAudioResampler.n-taps";
public const string AUDIO_RESAMPLER_OPT_STOP_ATTENUATION = @"GstAudioResampler.stop-attenutation";
public const string AUDIO_RESAMPLER_OPT_TRANSITION_BANDWIDTH = @"GstAudioResampler.transition-bandwidth";
public const int AUDIO_RESAMPLER_QUALITY_DEFAULT = 4;
public const int AUDIO_RESAMPLER_QUALITY_MAX = 10;
public const int AUDIO_RESAMPLER_QUALITY_MIN = 0;
public const string META_TAG_AUDIO_CHANNELS_STR = @"channels";
public const string META_TAG_AUDIO_RATE_STR = @"rate";
public const string META_TAG_AUDIO_STR = @"audio";
#endregion
}
}
@@ -0,0 +1,385 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class Global {
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_buffer_clip(IntPtr buffer, IntPtr segment, int rate, int bpf);
public static Gst.Buffer AudioBufferClip(Gst.Buffer buffer, Gst.Segment segment, int rate, int bpf) {
buffer.Owned = false;
IntPtr native_segment = GLib.Marshaller.StructureToPtrAlloc (segment);
IntPtr raw_ret = gst_audio_buffer_clip(buffer == null ? IntPtr.Zero : buffer.Handle, native_segment, rate, bpf);
Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true);
Marshal.FreeHGlobal (native_segment);
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_audio_buffer_reorder_channels(IntPtr buffer, int format, int channels, int[] from, int[] to);
public static bool AudioBufferReorderChannels(Gst.Buffer buffer, Gst.Audio.AudioFormat format, int channels, Gst.Audio.AudioChannelPosition[] from, Gst.Audio.AudioChannelPosition[] to) {
int cnt_from = from == null ? 0 : from.Length;
int[] native_from = new int [cnt_from];
for (int i = 0; i < cnt_from; i++)
native_from [i] = (int) from[i];
int cnt_to = to == null ? 0 : to.Length;
int[] native_to = new int [cnt_to];
for (int i = 0; i < cnt_to; i++)
native_to [i] = (int) to[i];
bool raw_ret = gst_audio_buffer_reorder_channels(buffer == null ? IntPtr.Zero : buffer.Handle, (int) format, channels, native_from, native_to);
bool ret = raw_ret;
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_buffer_truncate(IntPtr buffer, int bpf, UIntPtr trim, UIntPtr samples);
public static Gst.Buffer AudioBufferTruncate(Gst.Buffer buffer, int bpf, ulong trim, ulong samples) {
buffer.Owned = false;
IntPtr raw_ret = gst_audio_buffer_truncate(buffer == null ? IntPtr.Zero : buffer.Handle, bpf, new UIntPtr (trim), new UIntPtr (samples));
Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true);
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern ulong gst_audio_channel_get_fallback_mask(int channels);
public static ulong AudioChannelGetFallbackMask(int channels) {
ulong raw_ret = gst_audio_channel_get_fallback_mask(channels);
ulong ret = raw_ret;
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_audio_channel_positions_from_mask(int channels, ulong channel_mask, int[] position);
public static bool AudioChannelPositionsFromMask(int channels, ulong channel_mask, Gst.Audio.AudioChannelPosition[] position) {
int cnt_position = position == null ? 0 : position.Length;
int[] native_position = new int [cnt_position];
for (int i = 0; i < cnt_position; i++)
native_position [i] = (int) position[i];
bool raw_ret = gst_audio_channel_positions_from_mask(channels, channel_mask, native_position);
bool ret = raw_ret;
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_audio_channel_positions_to_mask(int[] position, int channels, bool force_order, out ulong channel_mask);
public static bool AudioChannelPositionsToMask(Gst.Audio.AudioChannelPosition[] position, int channels, bool force_order, out ulong channel_mask) {
int cnt_position = position == null ? 0 : position.Length;
int[] native_position = new int [cnt_position];
for (int i = 0; i < cnt_position; i++)
native_position [i] = (int) position[i];
bool raw_ret = gst_audio_channel_positions_to_mask(native_position, channels, force_order, out channel_mask);
bool ret = raw_ret;
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_channel_positions_to_string(int[] position, int channels);
public static string AudioChannelPositionsToString(Gst.Audio.AudioChannelPosition[] position, int channels) {
int cnt_position = position == null ? 0 : position.Length;
int[] native_position = new int [cnt_position];
for (int i = 0; i < cnt_position; i++)
native_position [i] = (int) position[i];
IntPtr raw_ret = gst_audio_channel_positions_to_string(native_position, channels);
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_audio_channel_positions_to_valid_order(int[] position, int channels);
public static bool AudioChannelPositionsToValidOrder(Gst.Audio.AudioChannelPosition[] position, int channels) {
int cnt_position = position == null ? 0 : position.Length;
int[] native_position = new int [cnt_position];
for (int i = 0; i < cnt_position; i++)
native_position [i] = (int) position[i];
bool raw_ret = gst_audio_channel_positions_to_valid_order(native_position, channels);
bool ret = raw_ret;
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_audio_check_valid_channel_positions(int[] position, int channels, bool force_order);
public static bool AudioCheckValidChannelPositions(Gst.Audio.AudioChannelPosition[] position, int channels, bool force_order) {
int cnt_position = position == null ? 0 : position.Length;
int[] native_position = new int [cnt_position];
for (int i = 0; i < cnt_position; i++)
native_position [i] = (int) position[i];
bool raw_ret = gst_audio_check_valid_channel_positions(native_position, channels, force_order);
bool ret = raw_ret;
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_clipping_meta_api_get_type();
public static GLib.GType AudioClippingMetaApiGetType() {
IntPtr raw_ret = gst_audio_clipping_meta_api_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_clipping_meta_get_info();
public static Gst.MetaInfo AudioClippingMetaGetInfo() {
IntPtr raw_ret = gst_audio_clipping_meta_get_info();
Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret);
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_downmix_meta_api_get_type();
public static GLib.GType AudioDownmixMetaApiGetType() {
IntPtr raw_ret = gst_audio_downmix_meta_api_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_downmix_meta_get_info();
public static Gst.MetaInfo AudioDownmixMetaGetInfo() {
IntPtr raw_ret = gst_audio_downmix_meta_get_info();
Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret);
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gst_audio_format_build_integer(bool sign, int endianness, int width, int depth);
public static Gst.Audio.AudioFormat AudioFormatBuildInteger(bool sign, int endianness, int width, int depth) {
int raw_ret = gst_audio_format_build_integer(sign, endianness, width, depth);
Gst.Audio.AudioFormat ret = (Gst.Audio.AudioFormat) raw_ret;
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_audio_format_fill_silence(IntPtr info, byte[] dest, UIntPtr n_length);
public static void AudioFormatFillSilence(Gst.Audio.AudioFormatInfo info, byte[] dest) {
IntPtr native_info = GLib.Marshaller.StructureToPtrAlloc (info);
gst_audio_format_fill_silence(native_info, dest, new UIntPtr ((ulong) (dest == null ? 0 : dest.Length)));
Marshal.FreeHGlobal (native_info);
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gst_audio_format_from_string(IntPtr format);
public static Gst.Audio.AudioFormat AudioFormatFromString(string format) {
IntPtr native_format = GLib.Marshaller.StringToPtrGStrdup (format);
int raw_ret = gst_audio_format_from_string(native_format);
Gst.Audio.AudioFormat ret = (Gst.Audio.AudioFormat) raw_ret;
GLib.Marshaller.Free (native_format);
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_format_get_info(int format);
public static Gst.Audio.AudioFormatInfo AudioFormatGetInfo(Gst.Audio.AudioFormat format) {
IntPtr raw_ret = gst_audio_format_get_info((int) format);
Gst.Audio.AudioFormatInfo ret = Gst.Audio.AudioFormatInfo.New (raw_ret);
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_format_info_get_type();
public static GLib.GType AudioFormatInfoGetType() {
IntPtr raw_ret = gst_audio_format_info_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_format_to_string(int format);
public static string AudioFormatToString(Gst.Audio.AudioFormat format) {
IntPtr raw_ret = gst_audio_format_to_string((int) format);
string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_audio_get_channel_reorder_map(int channels, int[] from, int[] to, int[] reorder_map);
public static bool AudioGetChannelReorderMap(int channels, Gst.Audio.AudioChannelPosition[] from, Gst.Audio.AudioChannelPosition[] to, int[] reorder_map) {
int cnt_from = from == null ? 0 : from.Length;
int[] native_from = new int [cnt_from];
for (int i = 0; i < cnt_from; i++)
native_from [i] = (int) from[i];
int cnt_to = to == null ? 0 : to.Length;
int[] native_to = new int [cnt_to];
for (int i = 0; i < cnt_to; i++)
native_to [i] = (int) to[i];
bool raw_ret = gst_audio_get_channel_reorder_map(channels, native_from, native_to, reorder_map);
bool ret = raw_ret;
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern uint gst_audio_iec61937_frame_size(IntPtr spec);
public static uint AudioIec61937FrameSize(Gst.Audio.AudioRingBufferSpec spec) {
uint raw_ret = gst_audio_iec61937_frame_size(spec == null ? IntPtr.Zero : spec.Handle);
uint ret = raw_ret;
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_audio_iec61937_payload(byte[] src, uint src_n, byte[] dst, uint dst_n, IntPtr spec, int endianness);
public static bool AudioIec61937Payload(byte[] src, uint src_n, byte[] dst, uint dst_n, Gst.Audio.AudioRingBufferSpec spec, int endianness) {
bool raw_ret = gst_audio_iec61937_payload(src, src_n, dst, dst_n, spec == null ? IntPtr.Zero : spec.Handle, endianness);
bool ret = raw_ret;
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_make_raw_caps(int[] formats, uint len, int layout);
public static Gst.Caps AudioMakeRawCaps(Gst.Audio.AudioFormat[] formats, uint len, Gst.Audio.AudioLayout layout) {
int cnt_formats = formats == null ? 0 : formats.Length;
int[] native_formats = new int [cnt_formats];
for (int i = 0; i < cnt_formats; i++)
native_formats [i] = (int) formats[i];
IntPtr raw_ret = gst_audio_make_raw_caps(native_formats, len, (int) layout);
Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true);
return ret;
}
public static Gst.Caps AudioMakeRawCaps(uint len, Gst.Audio.AudioLayout layout) {
return AudioMakeRawCaps (null, len, layout);
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_meta_api_get_type();
public static GLib.GType AudioMetaApiGetType() {
IntPtr raw_ret = gst_audio_meta_api_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_meta_get_info();
public static Gst.MetaInfo AudioMetaGetInfo() {
IntPtr raw_ret = gst_audio_meta_get_info();
Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret);
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_audio_reorder_channels(byte[] data, UIntPtr n_length, int format, int channels, int[] from, int[] to);
public static bool AudioReorderChannels(byte[] data, Gst.Audio.AudioFormat format, int channels, Gst.Audio.AudioChannelPosition[] from, Gst.Audio.AudioChannelPosition[] to) {
int cnt_from = from == null ? 0 : from.Length;
int[] native_from = new int [cnt_from];
for (int i = 0; i < cnt_from; i++)
native_from [i] = (int) from[i];
int cnt_to = to == null ? 0 : to.Length;
int[] native_to = new int [cnt_to];
for (int i = 0; i < cnt_to; i++)
native_to [i] = (int) to[i];
bool raw_ret = gst_audio_reorder_channels(data, new UIntPtr ((ulong) (data == null ? 0 : data.Length)), (int) format, channels, native_from, native_to);
bool ret = raw_ret;
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_audio_resampler_new(int method, int flags, int format, int channels, int in_rate, int out_rate, IntPtr options);
public static Gst.Audio.AudioResampler AudioResamplerNew(Gst.Audio.AudioResamplerMethod method, Gst.Audio.AudioResamplerFlags flags, Gst.Audio.AudioFormat format, int channels, int in_rate, int out_rate, Gst.Structure options) {
IntPtr raw_ret = gst_audio_resampler_new((int) method, (int) flags, (int) format, channels, in_rate, out_rate, options == null ? IntPtr.Zero : options.Handle);
Gst.Audio.AudioResampler ret = raw_ret == IntPtr.Zero ? null : (Gst.Audio.AudioResampler) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Audio.AudioResampler), true);
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_audio_resampler_options_set_quality(int method, uint quality, int in_rate, int out_rate, IntPtr options);
public static void AudioResamplerOptionsSetQuality(Gst.Audio.AudioResamplerMethod method, uint quality, int in_rate, int out_rate, Gst.Structure options) {
gst_audio_resampler_options_set_quality((int) method, quality, in_rate, out_rate, options == null ? IntPtr.Zero : options.Handle);
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_buffer_add_audio_clipping_meta(IntPtr buffer, int format, ulong start, ulong end);
public static Gst.Audio.AudioClippingMeta BufferAddAudioClippingMeta(Gst.Buffer buffer, Gst.Format format, ulong start, ulong end) {
IntPtr raw_ret = gst_buffer_add_audio_clipping_meta(buffer == null ? IntPtr.Zero : buffer.Handle, (int) format, start, end);
Gst.Audio.AudioClippingMeta ret = Gst.Audio.AudioClippingMeta.New (raw_ret);
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_buffer_add_audio_downmix_meta(IntPtr buffer, int[] from_position, int from_channels, int[] to_position, int to_channels, float matrix);
public static Gst.Audio.AudioDownmixMeta BufferAddAudioDownmixMeta(Gst.Buffer buffer, Gst.Audio.AudioChannelPosition[] from_position, int from_channels, Gst.Audio.AudioChannelPosition[] to_position, int to_channels, float matrix) {
int cnt_from_position = from_position == null ? 0 : from_position.Length;
int[] native_from_position = new int [cnt_from_position];
for (int i = 0; i < cnt_from_position; i++)
native_from_position [i] = (int) from_position[i];
int cnt_to_position = to_position == null ? 0 : to_position.Length;
int[] native_to_position = new int [cnt_to_position];
for (int i = 0; i < cnt_to_position; i++)
native_to_position [i] = (int) to_position[i];
IntPtr raw_ret = gst_buffer_add_audio_downmix_meta(buffer == null ? IntPtr.Zero : buffer.Handle, native_from_position, from_channels, native_to_position, to_channels, matrix);
Gst.Audio.AudioDownmixMeta ret = Gst.Audio.AudioDownmixMeta.New (raw_ret);
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_buffer_add_audio_meta(IntPtr buffer, IntPtr info, UIntPtr samples, UIntPtr offsets);
public static Gst.Audio.AudioMeta BufferAddAudioMeta(Gst.Buffer buffer, Gst.Audio.AudioInfo info, ulong samples, ulong offsets) {
IntPtr raw_ret = gst_buffer_add_audio_meta(buffer == null ? IntPtr.Zero : buffer.Handle, info == null ? IntPtr.Zero : info.Handle, new UIntPtr (samples), new UIntPtr (offsets));
Gst.Audio.AudioMeta ret = Gst.Audio.AudioMeta.New (raw_ret);
return ret;
}
public static Gst.Audio.AudioMeta BufferAddAudioMeta(Gst.Buffer buffer, Gst.Audio.AudioInfo info, ulong samples) {
return BufferAddAudioMeta (buffer, info, samples, 0);
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_buffer_get_audio_downmix_meta_for_channels(IntPtr buffer, int[] to_position, int to_channels);
public static Gst.Audio.AudioDownmixMeta BufferGetAudioDownmixMetaForChannels(Gst.Buffer buffer, Gst.Audio.AudioChannelPosition[] to_position, int to_channels) {
int cnt_to_position = to_position == null ? 0 : to_position.Length;
int[] native_to_position = new int [cnt_to_position];
for (int i = 0; i < cnt_to_position; i++)
native_to_position [i] = (int) to_position[i];
IntPtr raw_ret = gst_buffer_get_audio_downmix_meta_for_channels(buffer == null ? IntPtr.Zero : buffer.Handle, native_to_position, to_channels);
Gst.Audio.AudioDownmixMeta ret = Gst.Audio.AudioDownmixMeta.New (raw_ret);
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern double gst_stream_volume_convert_volume(int from, int to, double val);
public static double StreamVolumeConvertVolume(Gst.Audio.StreamVolumeFormat from, Gst.Audio.StreamVolumeFormat to, double val) {
double raw_ret = gst_stream_volume_convert_volume((int) from, (int) to, val);
double ret = raw_ret;
return ret;
}
#endregion
}
}
@@ -0,0 +1,92 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.AudioSharp {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
internal delegate void AudioBaseSinkCustomSlavingCallbackNative(IntPtr sink, ulong etime, ulong itime, long requested_skew, int discont_reason, IntPtr user_data);
internal class AudioBaseSinkCustomSlavingCallbackInvoker {
AudioBaseSinkCustomSlavingCallbackNative native_cb;
IntPtr __data;
GLib.DestroyNotify __notify;
~AudioBaseSinkCustomSlavingCallbackInvoker ()
{
if (__notify == null)
return;
__notify (__data);
}
internal AudioBaseSinkCustomSlavingCallbackInvoker (AudioBaseSinkCustomSlavingCallbackNative native_cb) : this (native_cb, IntPtr.Zero, null) {}
internal AudioBaseSinkCustomSlavingCallbackInvoker (AudioBaseSinkCustomSlavingCallbackNative native_cb, IntPtr data) : this (native_cb, data, null) {}
internal AudioBaseSinkCustomSlavingCallbackInvoker (AudioBaseSinkCustomSlavingCallbackNative native_cb, IntPtr data, GLib.DestroyNotify notify)
{
this.native_cb = native_cb;
__data = data;
__notify = notify;
}
internal Gst.Audio.AudioBaseSinkCustomSlavingCallback Handler {
get {
return new Gst.Audio.AudioBaseSinkCustomSlavingCallback(InvokeNative);
}
}
void InvokeNative (Gst.Audio.AudioBaseSink sink, ulong etime, ulong itime, long requested_skew, Gst.Audio.AudioBaseSinkDiscontReason discont_reason)
{
native_cb (sink == null ? IntPtr.Zero : sink.Handle, etime, itime, requested_skew, (int) discont_reason, __data);
}
}
internal class AudioBaseSinkCustomSlavingCallbackWrapper {
public void NativeCallback (IntPtr sink, ulong etime, ulong itime, long requested_skew, int discont_reason, IntPtr user_data)
{
try {
managed (GLib.Object.GetObject(sink) as Gst.Audio.AudioBaseSink, etime, itime, requested_skew, (Gst.Audio.AudioBaseSinkDiscontReason) discont_reason);
if (release_on_call)
gch.Free ();
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
bool release_on_call = false;
GCHandle gch;
public void PersistUntilCalled ()
{
release_on_call = true;
gch = GCHandle.Alloc (this);
}
internal AudioBaseSinkCustomSlavingCallbackNative NativeDelegate;
Gst.Audio.AudioBaseSinkCustomSlavingCallback managed;
public AudioBaseSinkCustomSlavingCallbackWrapper (Gst.Audio.AudioBaseSinkCustomSlavingCallback managed)
{
this.managed = managed;
if (managed != null)
NativeDelegate = new AudioBaseSinkCustomSlavingCallbackNative (NativeCallback);
}
public static Gst.Audio.AudioBaseSinkCustomSlavingCallback GetManagedDelegate (AudioBaseSinkCustomSlavingCallbackNative native)
{
if (native == null)
return null;
AudioBaseSinkCustomSlavingCallbackWrapper wrapper = (AudioBaseSinkCustomSlavingCallbackWrapper) native.Target;
if (wrapper == null)
return null;
return wrapper.managed;
}
}
#endregion
}
@@ -0,0 +1,96 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.AudioSharp {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
internal delegate ulong AudioClockGetTimeFuncNative(IntPtr clock, IntPtr user_data);
internal class AudioClockGetTimeFuncInvoker {
AudioClockGetTimeFuncNative native_cb;
IntPtr __data;
GLib.DestroyNotify __notify;
~AudioClockGetTimeFuncInvoker ()
{
if (__notify == null)
return;
__notify (__data);
}
internal AudioClockGetTimeFuncInvoker (AudioClockGetTimeFuncNative native_cb) : this (native_cb, IntPtr.Zero, null) {}
internal AudioClockGetTimeFuncInvoker (AudioClockGetTimeFuncNative native_cb, IntPtr data) : this (native_cb, data, null) {}
internal AudioClockGetTimeFuncInvoker (AudioClockGetTimeFuncNative native_cb, IntPtr data, GLib.DestroyNotify notify)
{
this.native_cb = native_cb;
__data = data;
__notify = notify;
}
internal Gst.Audio.AudioClockGetTimeFunc Handler {
get {
return new Gst.Audio.AudioClockGetTimeFunc(InvokeNative);
}
}
ulong InvokeNative (Gst.Clock clock)
{
ulong __result = native_cb (clock == null ? IntPtr.Zero : clock.Handle, __data);
return __result;
}
}
internal class AudioClockGetTimeFuncWrapper {
public ulong NativeCallback (IntPtr clock, IntPtr user_data)
{
try {
ulong __ret = managed (GLib.Object.GetObject(clock) as Gst.Clock);
if (release_on_call)
gch.Free ();
return __ret;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: Above call does not return.
throw e;
}
}
bool release_on_call = false;
GCHandle gch;
public void PersistUntilCalled ()
{
release_on_call = true;
gch = GCHandle.Alloc (this);
}
internal AudioClockGetTimeFuncNative NativeDelegate;
Gst.Audio.AudioClockGetTimeFunc managed;
public AudioClockGetTimeFuncWrapper (Gst.Audio.AudioClockGetTimeFunc managed)
{
this.managed = managed;
if (managed != null)
NativeDelegate = new AudioClockGetTimeFuncNative (NativeCallback);
}
public static Gst.Audio.AudioClockGetTimeFunc GetManagedDelegate (AudioClockGetTimeFuncNative native)
{
if (native == null)
return null;
AudioClockGetTimeFuncWrapper wrapper = (AudioClockGetTimeFuncWrapper) native.Target;
if (wrapper == null)
return null;
return wrapper.managed;
}
}
#endregion
}
@@ -0,0 +1,94 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.AudioSharp {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
internal delegate void AudioFormatPackNative(IntPtr info, int flags, byte[] src, byte[] data, int n_length);
internal class AudioFormatPackInvoker {
AudioFormatPackNative native_cb;
IntPtr __data;
GLib.DestroyNotify __notify;
~AudioFormatPackInvoker ()
{
if (__notify == null)
return;
__notify (__data);
}
internal AudioFormatPackInvoker (AudioFormatPackNative native_cb) : this (native_cb, IntPtr.Zero, null) {}
internal AudioFormatPackInvoker (AudioFormatPackNative native_cb, IntPtr data) : this (native_cb, data, null) {}
internal AudioFormatPackInvoker (AudioFormatPackNative native_cb, IntPtr data, GLib.DestroyNotify notify)
{
this.native_cb = native_cb;
__data = data;
__notify = notify;
}
internal Gst.Audio.AudioFormatPack Handler {
get {
return new Gst.Audio.AudioFormatPack(InvokeNative);
}
}
void InvokeNative (Gst.Audio.AudioFormatInfo info, Gst.Audio.AudioPackFlags flags, byte[] src, byte[] data)
{
IntPtr native_info = GLib.Marshaller.StructureToPtrAlloc (info);
native_cb (native_info, (int) flags, src, data, (data == null ? 0 : data.Length));
Marshal.FreeHGlobal (native_info);
}
}
internal class AudioFormatPackWrapper {
public void NativeCallback (IntPtr info, int flags, byte[] src, byte[] data, int n_length)
{
try {
managed (Gst.Audio.AudioFormatInfo.New (info), (Gst.Audio.AudioPackFlags) flags, src, data);
if (release_on_call)
gch.Free ();
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
bool release_on_call = false;
GCHandle gch;
public void PersistUntilCalled ()
{
release_on_call = true;
gch = GCHandle.Alloc (this);
}
internal AudioFormatPackNative NativeDelegate;
Gst.Audio.AudioFormatPack managed;
public AudioFormatPackWrapper (Gst.Audio.AudioFormatPack managed)
{
this.managed = managed;
if (managed != null)
NativeDelegate = new AudioFormatPackNative (NativeCallback);
}
public static Gst.Audio.AudioFormatPack GetManagedDelegate (AudioFormatPackNative native)
{
if (native == null)
return null;
AudioFormatPackWrapper wrapper = (AudioFormatPackWrapper) native.Target;
if (wrapper == null)
return null;
return wrapper.managed;
}
}
#endregion
}
@@ -0,0 +1,94 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.AudioSharp {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
internal delegate void AudioFormatUnpackNative(IntPtr info, int flags, byte[] dest, byte[] data, int n_length);
internal class AudioFormatUnpackInvoker {
AudioFormatUnpackNative native_cb;
IntPtr __data;
GLib.DestroyNotify __notify;
~AudioFormatUnpackInvoker ()
{
if (__notify == null)
return;
__notify (__data);
}
internal AudioFormatUnpackInvoker (AudioFormatUnpackNative native_cb) : this (native_cb, IntPtr.Zero, null) {}
internal AudioFormatUnpackInvoker (AudioFormatUnpackNative native_cb, IntPtr data) : this (native_cb, data, null) {}
internal AudioFormatUnpackInvoker (AudioFormatUnpackNative native_cb, IntPtr data, GLib.DestroyNotify notify)
{
this.native_cb = native_cb;
__data = data;
__notify = notify;
}
internal Gst.Audio.AudioFormatUnpack Handler {
get {
return new Gst.Audio.AudioFormatUnpack(InvokeNative);
}
}
void InvokeNative (Gst.Audio.AudioFormatInfo info, Gst.Audio.AudioPackFlags flags, byte[] dest, byte[] data)
{
IntPtr native_info = GLib.Marshaller.StructureToPtrAlloc (info);
native_cb (native_info, (int) flags, dest, data, (data == null ? 0 : data.Length));
Marshal.FreeHGlobal (native_info);
}
}
internal class AudioFormatUnpackWrapper {
public void NativeCallback (IntPtr info, int flags, byte[] dest, byte[] data, int n_length)
{
try {
managed (Gst.Audio.AudioFormatInfo.New (info), (Gst.Audio.AudioPackFlags) flags, dest, data);
if (release_on_call)
gch.Free ();
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
bool release_on_call = false;
GCHandle gch;
public void PersistUntilCalled ()
{
release_on_call = true;
gch = GCHandle.Alloc (this);
}
internal AudioFormatUnpackNative NativeDelegate;
Gst.Audio.AudioFormatUnpack managed;
public AudioFormatUnpackWrapper (Gst.Audio.AudioFormatUnpack managed)
{
this.managed = managed;
if (managed != null)
NativeDelegate = new AudioFormatUnpackNative (NativeCallback);
}
public static Gst.Audio.AudioFormatUnpack GetManagedDelegate (AudioFormatUnpackNative native)
{
if (native == null)
return null;
AudioFormatUnpackWrapper wrapper = (AudioFormatUnpackWrapper) native.Target;
if (wrapper == null)
return null;
return wrapper.managed;
}
}
#endregion
}
@@ -0,0 +1,92 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.AudioSharp {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
internal delegate void AudioRingBufferCallbackNative(IntPtr rbuf, byte[] data, uint len, IntPtr user_data);
internal class AudioRingBufferCallbackInvoker {
AudioRingBufferCallbackNative native_cb;
IntPtr __data;
GLib.DestroyNotify __notify;
~AudioRingBufferCallbackInvoker ()
{
if (__notify == null)
return;
__notify (__data);
}
internal AudioRingBufferCallbackInvoker (AudioRingBufferCallbackNative native_cb) : this (native_cb, IntPtr.Zero, null) {}
internal AudioRingBufferCallbackInvoker (AudioRingBufferCallbackNative native_cb, IntPtr data) : this (native_cb, data, null) {}
internal AudioRingBufferCallbackInvoker (AudioRingBufferCallbackNative native_cb, IntPtr data, GLib.DestroyNotify notify)
{
this.native_cb = native_cb;
__data = data;
__notify = notify;
}
internal Gst.Audio.AudioRingBufferCallback Handler {
get {
return new Gst.Audio.AudioRingBufferCallback(InvokeNative);
}
}
void InvokeNative (Gst.Audio.AudioRingBuffer rbuf, byte[] data, uint len)
{
native_cb (rbuf == null ? IntPtr.Zero : rbuf.Handle, data, len, __data);
}
}
internal class AudioRingBufferCallbackWrapper {
public void NativeCallback (IntPtr rbuf, byte[] data, uint len, IntPtr user_data)
{
try {
managed (GLib.Object.GetObject(rbuf) as Gst.Audio.AudioRingBuffer, data, len);
if (release_on_call)
gch.Free ();
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
bool release_on_call = false;
GCHandle gch;
public void PersistUntilCalled ()
{
release_on_call = true;
gch = GCHandle.Alloc (this);
}
internal AudioRingBufferCallbackNative NativeDelegate;
Gst.Audio.AudioRingBufferCallback managed;
public AudioRingBufferCallbackWrapper (Gst.Audio.AudioRingBufferCallback managed)
{
this.managed = managed;
if (managed != null)
NativeDelegate = new AudioRingBufferCallbackNative (NativeCallback);
}
public static Gst.Audio.AudioRingBufferCallback GetManagedDelegate (AudioRingBufferCallbackNative native)
{
if (native == null)
return null;
AudioRingBufferCallbackWrapper wrapper = (AudioRingBufferCallbackWrapper) native.Target;
if (wrapper == null)
return null;
return wrapper.managed;
}
}
#endregion
}
@@ -0,0 +1,27 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
#region Autogenerated code
public partial interface IStreamVolume : GLib.IWrapper {
double GetVolume(Gst.Audio.StreamVolumeFormat format);
void SetVolume(Gst.Audio.StreamVolumeFormat format, double val);
bool Mute {
get; set;
}
}
[GLib.GInterface (typeof (StreamVolumeAdapter))]
public partial interface IStreamVolumeImplementor : GLib.IWrapper {
[GLib.Property ("mute")]
bool Mute {
get; set;
}
}
#endregion
}
@@ -0,0 +1,148 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class StreamVolumeAdapter : GLib.GInterfaceAdapter, Gst.Audio.IStreamVolume {
[StructLayout (LayoutKind.Sequential)]
struct GstStreamVolumeInterface {
}
static GstStreamVolumeInterface iface;
static StreamVolumeAdapter ()
{
GLib.GType.Register (_gtype, typeof (StreamVolumeAdapter));
}
static void Initialize (IntPtr ptr, IntPtr data)
{
}
GLib.Object implementor;
public StreamVolumeAdapter ()
{
InitHandler = new GLib.GInterfaceInitHandler (Initialize);
}
public StreamVolumeAdapter (IStreamVolumeImplementor implementor)
{
if (implementor == null)
throw new ArgumentNullException ("implementor");
else if (!(implementor is GLib.Object))
throw new ArgumentException ("implementor must be a subclass of GLib.Object");
this.implementor = implementor as GLib.Object;
}
public StreamVolumeAdapter (IntPtr handle)
{
if (!_gtype.IsInstance (handle))
throw new ArgumentException ("The gobject doesn't implement the GInterface of this adapter", "handle");
implementor = GLib.Object.GetObject (handle);
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_stream_volume_get_type();
private static GLib.GType _gtype = new GLib.GType (gst_stream_volume_get_type ());
public static GLib.GType GType {
get {
return _gtype;
}
}
public override GLib.GType GInterfaceGType {
get {
return _gtype;
}
}
public override IntPtr Handle {
get {
return implementor.Handle;
}
}
public IntPtr OwnedHandle {
get {
return implementor.OwnedHandle;
}
}
public static IStreamVolume GetObject (IntPtr handle, bool owned)
{
GLib.Object obj = GLib.Object.GetObject (handle, owned);
return GetObject (obj);
}
public static IStreamVolume GetObject (GLib.Object obj)
{
if (obj == null)
return null;
else if (obj is IStreamVolumeImplementor)
return new StreamVolumeAdapter (obj as IStreamVolumeImplementor);
else if (obj as IStreamVolume == null)
return new StreamVolumeAdapter (obj.Handle);
else
return obj as IStreamVolume;
}
public IStreamVolumeImplementor Implementor {
get {
return implementor as IStreamVolumeImplementor;
}
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_stream_volume_get_mute(IntPtr raw);
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_stream_volume_set_mute(IntPtr raw, bool mute);
[GLib.Property ("mute")]
public bool Mute {
get {
bool raw_ret = gst_stream_volume_get_mute(Handle);
bool ret = raw_ret;
return ret;
}
set {
gst_stream_volume_set_mute(Handle, value);
}
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern double gst_stream_volume_convert_volume(int from, int to, double val);
public static double ConvertVolume(Gst.Audio.StreamVolumeFormat from, Gst.Audio.StreamVolumeFormat to, double val) {
double raw_ret = gst_stream_volume_convert_volume((int) from, (int) to, val);
double ret = raw_ret;
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern double gst_stream_volume_get_volume(IntPtr raw, int format);
public double GetVolume(Gst.Audio.StreamVolumeFormat format) {
double raw_ret = gst_stream_volume_get_volume(Handle, (int) format);
double ret = raw_ret;
return ret;
}
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_stream_volume_set_volume(IntPtr raw, int format, double val);
public void SetVolume(Gst.Audio.StreamVolumeFormat format, double val) {
gst_stream_volume_set_volume(Handle, (int) format, val);
}
#endregion
}
}
@@ -0,0 +1,17 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
public enum StreamVolumeFormat {
Linear = 0,
Cubic = 1,
Db = 2,
}
#endregion
}
@@ -0,0 +1,303 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Base {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class Adapter : GLib.Object {
public Adapter (IntPtr raw) : base(raw) {}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_adapter_new();
public Adapter () : base (IntPtr.Zero)
{
if (GetType () != typeof (Adapter)) {
CreateNativeObject (new string [0], new GLib.Value[0]);
return;
}
Raw = gst_adapter_new();
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _class_abi = null;
static public new GLib.AbiStruct class_abi {
get {
if (_class_abi == null)
_class_abi = new GLib.AbiStruct (GLib.Object.class_abi.Fields);
return _class_abi;
}
}
// End of the ABI representation.
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_adapter_get_type();
public static new GLib.GType GType {
get {
IntPtr raw_ret = gst_adapter_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern UIntPtr gst_adapter_available(IntPtr raw);
public ulong Available() {
UIntPtr raw_ret = gst_adapter_available(Handle);
ulong ret = (ulong) raw_ret;
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern UIntPtr gst_adapter_available_fast(IntPtr raw);
public ulong AvailableFast() {
UIntPtr raw_ret = gst_adapter_available_fast(Handle);
ulong ret = (ulong) raw_ret;
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_adapter_clear(IntPtr raw);
public void Clear() {
gst_adapter_clear(Handle);
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_adapter_copy_bytes(IntPtr raw, UIntPtr offset, UIntPtr size);
public GLib.Bytes CopyBytes(ulong offset, ulong size) {
IntPtr raw_ret = gst_adapter_copy_bytes(Handle, new UIntPtr (offset), new UIntPtr (size));
GLib.Bytes ret = new GLib.Bytes(raw_ret);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern ulong gst_adapter_distance_from_discont(IntPtr raw);
public ulong DistanceFromDiscont() {
ulong raw_ret = gst_adapter_distance_from_discont(Handle);
ulong ret = raw_ret;
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern ulong gst_adapter_dts_at_discont(IntPtr raw);
public ulong DtsAtDiscont() {
ulong raw_ret = gst_adapter_dts_at_discont(Handle);
ulong ret = raw_ret;
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_adapter_flush(IntPtr raw, UIntPtr flush);
public void Flush(ulong flush) {
gst_adapter_flush(Handle, new UIntPtr (flush));
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_adapter_get_buffer(IntPtr raw, UIntPtr nbytes);
public Gst.Buffer GetBuffer(ulong nbytes) {
IntPtr raw_ret = gst_adapter_get_buffer(Handle, new UIntPtr (nbytes));
Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_adapter_get_buffer_fast(IntPtr raw, UIntPtr nbytes);
public Gst.Buffer GetBufferFast(ulong nbytes) {
IntPtr raw_ret = gst_adapter_get_buffer_fast(Handle, new UIntPtr (nbytes));
Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_adapter_get_buffer_list(IntPtr raw, UIntPtr nbytes);
public Gst.BufferList GetBufferList(ulong nbytes) {
IntPtr raw_ret = gst_adapter_get_buffer_list(Handle, new UIntPtr (nbytes));
Gst.BufferList ret = raw_ret == IntPtr.Zero ? null : (Gst.BufferList) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.BufferList), true);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_adapter_get_list(IntPtr raw, UIntPtr nbytes);
public GLib.List[] GetList(ulong nbytes) {
IntPtr raw_ret = gst_adapter_get_list(Handle, new UIntPtr (nbytes));
GLib.List[] ret = (GLib.List[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(GLib.List));
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_adapter_masked_scan_uint32(IntPtr raw, uint mask, uint pattern, UIntPtr offset, UIntPtr size);
public long MaskedScanUint32(uint mask, uint pattern, ulong offset, ulong size) {
IntPtr raw_ret = gst_adapter_masked_scan_uint32(Handle, mask, pattern, new UIntPtr (offset), new UIntPtr (size));
long ret = (long) raw_ret;
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_adapter_masked_scan_uint32_peek(IntPtr raw, uint mask, uint pattern, UIntPtr offset, UIntPtr size, out uint value);
public long MaskedScanUint32Peek(uint mask, uint pattern, ulong offset, ulong size, out uint value) {
IntPtr raw_ret = gst_adapter_masked_scan_uint32_peek(Handle, mask, pattern, new UIntPtr (offset), new UIntPtr (size), out value);
long ret = (long) raw_ret;
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern ulong gst_adapter_offset_at_discont(IntPtr raw);
public ulong OffsetAtDiscont() {
ulong raw_ret = gst_adapter_offset_at_discont(Handle);
ulong ret = raw_ret;
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern ulong gst_adapter_prev_dts(IntPtr raw, out ulong distance);
public ulong PrevDts(out ulong distance) {
ulong raw_ret = gst_adapter_prev_dts(Handle, out distance);
ulong ret = raw_ret;
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern ulong gst_adapter_prev_dts_at_offset(IntPtr raw, UIntPtr offset, out ulong distance);
public ulong PrevDtsAtOffset(ulong offset, out ulong distance) {
ulong raw_ret = gst_adapter_prev_dts_at_offset(Handle, new UIntPtr (offset), out distance);
ulong ret = raw_ret;
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern ulong gst_adapter_prev_offset(IntPtr raw, out ulong distance);
public ulong PrevOffset(out ulong distance) {
ulong raw_ret = gst_adapter_prev_offset(Handle, out distance);
ulong ret = raw_ret;
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern ulong gst_adapter_prev_pts(IntPtr raw, out ulong distance);
public ulong PrevPts(out ulong distance) {
ulong raw_ret = gst_adapter_prev_pts(Handle, out distance);
ulong ret = raw_ret;
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern ulong gst_adapter_prev_pts_at_offset(IntPtr raw, UIntPtr offset, out ulong distance);
public ulong PrevPtsAtOffset(ulong offset, out ulong distance) {
ulong raw_ret = gst_adapter_prev_pts_at_offset(Handle, new UIntPtr (offset), out distance);
ulong ret = raw_ret;
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern ulong gst_adapter_pts_at_discont(IntPtr raw);
public ulong PtsAtDiscont() {
ulong raw_ret = gst_adapter_pts_at_discont(Handle);
ulong ret = raw_ret;
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_adapter_push(IntPtr raw, IntPtr buf);
public void Push(Gst.Buffer buf) {
buf.Owned = false;
gst_adapter_push(Handle, buf == null ? IntPtr.Zero : buf.Handle);
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_adapter_take_buffer(IntPtr raw, UIntPtr nbytes);
public Gst.Buffer TakeBuffer(ulong nbytes) {
IntPtr raw_ret = gst_adapter_take_buffer(Handle, new UIntPtr (nbytes));
Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_adapter_take_buffer_fast(IntPtr raw, UIntPtr nbytes);
public Gst.Buffer TakeBufferFast(ulong nbytes) {
IntPtr raw_ret = gst_adapter_take_buffer_fast(Handle, new UIntPtr (nbytes));
Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_adapter_take_buffer_list(IntPtr raw, UIntPtr nbytes);
public Gst.BufferList TakeBufferList(ulong nbytes) {
IntPtr raw_ret = gst_adapter_take_buffer_list(Handle, new UIntPtr (nbytes));
Gst.BufferList ret = raw_ret == IntPtr.Zero ? null : (Gst.BufferList) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.BufferList), true);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_adapter_take_list(IntPtr raw, UIntPtr nbytes);
public GLib.List[] TakeList(ulong nbytes) {
IntPtr raw_ret = gst_adapter_take_list(Handle, new UIntPtr (nbytes));
GLib.List[] ret = (GLib.List[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(GLib.List));
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_adapter_unmap(IntPtr raw);
public void Unmap() {
gst_adapter_unmap(Handle);
}
static Adapter ()
{
GtkSharp.GstreamerSharp.ObjectManager.Initialize ();
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public new GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (GLib.Object.abi_info.Fields);
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,376 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Base {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class AggregatorPad : Gst.Pad {
public AggregatorPad (IntPtr raw) : base(raw) {}
protected AggregatorPad() : base(IntPtr.Zero)
{
CreateNativeObject (new string [0], new GLib.Value [0]);
}
[GLib.Property ("emit-signals")]
public bool EmitSignals {
get {
GLib.Value val = GetProperty ("emit-signals");
bool ret = (bool) val;
val.Dispose ();
return ret;
}
set {
GLib.Value val = new GLib.Value(value);
SetProperty("emit-signals", val);
val.Dispose ();
}
}
public Gst.Segment Segment {
get {
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("segment"));
return Gst.Segment.New ((*raw_ptr));
}
}
}
[GLib.Signal("buffer-consumed")]
public event Gst.Base.BufferConsumedHandler BufferConsumed {
add {
this.AddSignalHandler ("buffer-consumed", value, typeof (Gst.Base.BufferConsumedArgs));
}
remove {
this.RemoveSignalHandler ("buffer-consumed", value);
}
}
static BufferConsumedNativeDelegate BufferConsumed_cb_delegate;
static BufferConsumedNativeDelegate BufferConsumedVMCallback {
get {
if (BufferConsumed_cb_delegate == null)
BufferConsumed_cb_delegate = new BufferConsumedNativeDelegate (BufferConsumed_cb);
return BufferConsumed_cb_delegate;
}
}
static void OverrideBufferConsumed (GLib.GType gtype)
{
OverrideBufferConsumed (gtype, BufferConsumedVMCallback);
}
static void OverrideBufferConsumed (GLib.GType gtype, BufferConsumedNativeDelegate callback)
{
OverrideVirtualMethod (gtype, "buffer-consumed", callback);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void BufferConsumedNativeDelegate (IntPtr inst, IntPtr _object);
static void BufferConsumed_cb (IntPtr inst, IntPtr _object)
{
try {
AggregatorPad __obj = GLib.Object.GetObject (inst, false) as AggregatorPad;
__obj.OnBufferConsumed (_object == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (_object, typeof (Gst.Buffer), false));
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gst.Base.AggregatorPad), ConnectionMethod="OverrideBufferConsumed")]
protected virtual void OnBufferConsumed (Gst.Buffer _object)
{
InternalBufferConsumed (_object);
}
private void InternalBufferConsumed (Gst.Buffer _object)
{
GLib.Value ret = GLib.Value.Empty;
GLib.ValueArray inst_and_params = new GLib.ValueArray (2);
GLib.Value[] vals = new GLib.Value [2];
vals [0] = new GLib.Value (this);
inst_and_params.Append (vals [0]);
vals [1] = new GLib.Value (_object);
inst_and_params.Append (vals [1]);
g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
foreach (GLib.Value v in vals)
v.Dispose ();
}
static FlushNativeDelegate Flush_cb_delegate;
static FlushNativeDelegate FlushVMCallback {
get {
if (Flush_cb_delegate == null)
Flush_cb_delegate = new FlushNativeDelegate (Flush_cb);
return Flush_cb_delegate;
}
}
static void OverrideFlush (GLib.GType gtype)
{
OverrideFlush (gtype, FlushVMCallback);
}
static void OverrideFlush (GLib.GType gtype, FlushNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("flush"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate int FlushNativeDelegate (IntPtr inst, IntPtr aggregator);
static int Flush_cb (IntPtr inst, IntPtr aggregator)
{
try {
AggregatorPad __obj = GLib.Object.GetObject (inst, false) as AggregatorPad;
Gst.FlowReturn __result;
__result = __obj.OnFlush (GLib.Object.GetObject(aggregator) as Gst.Base.Aggregator);
return (int) __result;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw e;
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gst.Base.AggregatorPad), ConnectionMethod="OverrideFlush")]
protected virtual Gst.FlowReturn OnFlush (Gst.Base.Aggregator aggregator)
{
return InternalFlush (aggregator);
}
private Gst.FlowReturn InternalFlush (Gst.Base.Aggregator aggregator)
{
FlushNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("flush"));
unmanaged = (FlushNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(FlushNativeDelegate));
}
if (unmanaged == null) return (Gst.FlowReturn) 0;
int __result = unmanaged (this.Handle, aggregator == null ? IntPtr.Zero : aggregator.Handle);
return (Gst.FlowReturn) __result;
}
static SkipBufferNativeDelegate SkipBuffer_cb_delegate;
static SkipBufferNativeDelegate SkipBufferVMCallback {
get {
if (SkipBuffer_cb_delegate == null)
SkipBuffer_cb_delegate = new SkipBufferNativeDelegate (SkipBuffer_cb);
return SkipBuffer_cb_delegate;
}
}
static void OverrideSkipBuffer (GLib.GType gtype)
{
OverrideSkipBuffer (gtype, SkipBufferVMCallback);
}
static void OverrideSkipBuffer (GLib.GType gtype, SkipBufferNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("skip_buffer"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool SkipBufferNativeDelegate (IntPtr inst, IntPtr aggregator, IntPtr buffer);
static bool SkipBuffer_cb (IntPtr inst, IntPtr aggregator, IntPtr buffer)
{
try {
AggregatorPad __obj = GLib.Object.GetObject (inst, false) as AggregatorPad;
bool __result;
__result = __obj.OnSkipBuffer (GLib.Object.GetObject(aggregator) as Gst.Base.Aggregator, buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buffer, typeof (Gst.Buffer), false));
return __result;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw e;
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gst.Base.AggregatorPad), ConnectionMethod="OverrideSkipBuffer")]
protected virtual bool OnSkipBuffer (Gst.Base.Aggregator aggregator, Gst.Buffer buffer)
{
return InternalSkipBuffer (aggregator, buffer);
}
private bool InternalSkipBuffer (Gst.Base.Aggregator aggregator, Gst.Buffer buffer)
{
SkipBufferNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("skip_buffer"));
unmanaged = (SkipBufferNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SkipBufferNativeDelegate));
}
if (unmanaged == null) return false;
bool __result = unmanaged (this.Handle, aggregator == null ? IntPtr.Zero : aggregator.Handle, buffer == null ? IntPtr.Zero : buffer.Handle);
return __result;
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _class_abi = null;
static public new GLib.AbiStruct class_abi {
get {
if (_class_abi == null)
_class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("flush"
, Gst.Pad.class_abi.Fields
, (uint) Marshal.SizeOf(typeof(IntPtr)) // flush
, null
, "skip_buffer"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("skip_buffer"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // skip_buffer
, "flush"
, "_gst_reserved"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("_gst_reserved"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) * 20 // _gst_reserved
, "skip_buffer"
, null
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
});
return _class_abi;
}
}
// End of the ABI representation.
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_aggregator_pad_get_type();
public static new GLib.GType GType {
get {
IntPtr raw_ret = gst_aggregator_pad_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_aggregator_pad_drop_buffer(IntPtr raw);
public bool DropBuffer() {
bool raw_ret = gst_aggregator_pad_drop_buffer(Handle);
bool ret = raw_ret;
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_aggregator_pad_has_buffer(IntPtr raw);
public bool HasBuffer {
get {
bool raw_ret = gst_aggregator_pad_has_buffer(Handle);
bool ret = raw_ret;
return ret;
}
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_aggregator_pad_is_eos(IntPtr raw);
public bool IsEos {
get {
bool raw_ret = gst_aggregator_pad_is_eos(Handle);
bool ret = raw_ret;
return ret;
}
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_aggregator_pad_peek_buffer(IntPtr raw);
public Gst.Buffer PeekBuffer() {
IntPtr raw_ret = gst_aggregator_pad_peek_buffer(Handle);
Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_aggregator_pad_pop_buffer(IntPtr raw);
public Gst.Buffer PopBuffer() {
IntPtr raw_ret = gst_aggregator_pad_pop_buffer(Handle);
Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true);
return ret;
}
static AggregatorPad ()
{
GtkSharp.GstreamerSharp.ObjectManager.Initialize ();
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public new GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("segment"
, Gst.Pad.abi_info.Fields
, (uint) Marshal.SizeOf(typeof(Gst.Segment)) // segment
, null
, "priv"
, (long) Marshal.OffsetOf(typeof(GstAggregatorPad_segmentAlign), "segment")
, 0
),
new GLib.AbiField("priv"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // priv
, "segment"
, "_gst_reserved"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("_gst_reserved"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
, "priv"
, null
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
});
return _abi_info;
}
}
[StructLayout(LayoutKind.Sequential)]
public struct GstAggregatorPad_segmentAlign
{
sbyte f1;
private Gst.Segment segment;
}
// End of the ABI representation.
#endregion
}
}
@@ -0,0 +1,29 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Base {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[GLib.GType (typeof (Gst.Base.AggregatorStartTimeSelectionGType))]
public enum AggregatorStartTimeSelection {
Zero = 0,
First = 1,
Set = 2,
}
internal class AggregatorStartTimeSelectionGType {
[DllImport ("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_aggregator_start_time_selection_get_type ();
public static GLib.GType GType {
get {
return new GLib.GType (gst_aggregator_start_time_selection_get_type ());
}
}
}
#endregion
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,116 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Base {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
[StructLayout(LayoutKind.Sequential)]
public partial struct BaseParseFrame : IEquatable<BaseParseFrame> {
private IntPtr _buffer;
public Gst.Buffer Buffer {
get {
return _buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (_buffer, typeof (Gst.Buffer), false);
}
set {
_buffer = value == null ? IntPtr.Zero : value.Handle;
}
}
private IntPtr _out_buffer;
public Gst.Buffer OutBuffer {
get {
return _out_buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (_out_buffer, typeof (Gst.Buffer), false);
}
set {
_out_buffer = value == null ? IntPtr.Zero : value.Handle;
}
}
public uint Flags;
public ulong Offset;
public int Overhead;
private int size;
[MarshalAs (UnmanagedType.ByValArray, SizeConst=2)]
private uint[] _gstGstReservedI;
[MarshalAs (UnmanagedType.ByValArray, SizeConst=2)]
private IntPtr[] _gstGstReservedP;
private uint _private_flags;
public static Gst.Base.BaseParseFrame Zero = new Gst.Base.BaseParseFrame ();
public static Gst.Base.BaseParseFrame New(IntPtr raw) {
if (raw == IntPtr.Zero)
return Gst.Base.BaseParseFrame.Zero;
return (Gst.Base.BaseParseFrame) Marshal.PtrToStructure (raw, typeof (Gst.Base.BaseParseFrame));
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_base_parse_frame_new(IntPtr buffer, int flags, int overhead);
public static BaseParseFrame New(Gst.Buffer buffer, Gst.Base.BaseParseFrameFlags flags, int overhead)
{
BaseParseFrame result = BaseParseFrame.New (gst_base_parse_frame_new(buffer == null ? IntPtr.Zero : buffer.Handle, (int) flags, overhead));
return result;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_base_parse_frame_get_type();
public static GLib.GType GType {
get {
IntPtr raw_ret = gst_base_parse_frame_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_base_parse_frame_init(IntPtr raw);
public void Init() {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
gst_base_parse_frame_init(this_as_native);
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
}
static void ReadNative (IntPtr native, ref Gst.Base.BaseParseFrame target)
{
target = New (native);
}
public bool Equals (BaseParseFrame other)
{
return true && Buffer.Equals (other.Buffer) && OutBuffer.Equals (other.OutBuffer) && Flags.Equals (other.Flags) && Offset.Equals (other.Offset) && Overhead.Equals (other.Overhead) && size.Equals (other.size) && _private_flags.Equals (other._private_flags);
}
public override bool Equals (object other)
{
return other is BaseParseFrame && Equals ((BaseParseFrame) other);
}
public override int GetHashCode ()
{
return this.GetType ().FullName.GetHashCode () ^ Buffer.GetHashCode () ^ OutBuffer.GetHashCode () ^ Flags.GetHashCode () ^ Offset.GetHashCode () ^ Overhead.GetHashCode () ^ size.GetHashCode () ^ _private_flags.GetHashCode ();
}
public static explicit operator GLib.Value (Gst.Base.BaseParseFrame boxed)
{
GLib.Value val = GLib.Value.Empty;
val.Init (Gst.Base.BaseParseFrame.GType);
val.Val = boxed;
return val;
}
public static explicit operator Gst.Base.BaseParseFrame (GLib.Value val)
{
return (Gst.Base.BaseParseFrame) val.Val;
}
#endregion
}
}
@@ -0,0 +1,21 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Base {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[Flags]
public enum BaseParseFrameFlags : uint {
None = 0,
NewFrame = 1,
NoFrame = 2,
Clip = 4,
Drop = 8,
Queue = 16,
}
#endregion
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,18 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Base {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[Flags]
public enum BaseSrcFlags : uint {
Starting = 16384,
Started = 32768,
Last = 1048576,
}
#endregion
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,251 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Base {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
[StructLayout(LayoutKind.Sequential)]
public partial struct BitReader : IEquatable<BitReader> {
[MarshalAs (UnmanagedType.ByValArray, SizeConst=0)]
public byte[] Data;
public uint Size;
public uint Byte;
public uint Bit;
[MarshalAs (UnmanagedType.ByValArray, SizeConst=4)]
private IntPtr[] _gstGstReserved;
public static Gst.Base.BitReader Zero = new Gst.Base.BitReader ();
public static Gst.Base.BitReader New(IntPtr raw) {
if (raw == IntPtr.Zero)
return Gst.Base.BitReader.Zero;
return (Gst.Base.BitReader) Marshal.PtrToStructure (raw, typeof (Gst.Base.BitReader));
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_bit_reader_free(IntPtr raw);
public void Free() {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
gst_bit_reader_free(this_as_native);
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_bit_reader_get_bits_uint16(IntPtr raw, out ushort val, uint nbits);
public bool GetBitsUint16(out ushort val, uint nbits) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_bit_reader_get_bits_uint16(this_as_native, out val, nbits);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_bit_reader_get_bits_uint32(IntPtr raw, out uint val, uint nbits);
public bool GetBitsUint32(out uint val, uint nbits) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_bit_reader_get_bits_uint32(this_as_native, out val, nbits);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_bit_reader_get_bits_uint64(IntPtr raw, out ulong val, uint nbits);
public bool GetBitsUint64(out ulong val, uint nbits) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_bit_reader_get_bits_uint64(this_as_native, out val, nbits);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_bit_reader_get_bits_uint8(IntPtr raw, out byte val, uint nbits);
public bool GetBitsUint8(out byte val, uint nbits) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_bit_reader_get_bits_uint8(this_as_native, out val, nbits);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern uint gst_bit_reader_get_pos(IntPtr raw);
public uint Pos {
get {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
uint raw_ret = gst_bit_reader_get_pos(this_as_native);
uint ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern uint gst_bit_reader_get_remaining(IntPtr raw);
public uint Remaining {
get {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
uint raw_ret = gst_bit_reader_get_remaining(this_as_native);
uint ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_bit_reader_init(IntPtr raw, byte[] data, uint size);
public void Init(byte[] data, uint size) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
gst_bit_reader_init(this_as_native, data, size);
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_bit_reader_peek_bits_uint16(IntPtr raw, out ushort val, uint nbits);
public bool PeekBitsUint16(out ushort val, uint nbits) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_bit_reader_peek_bits_uint16(this_as_native, out val, nbits);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_bit_reader_peek_bits_uint32(IntPtr raw, out uint val, uint nbits);
public bool PeekBitsUint32(out uint val, uint nbits) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_bit_reader_peek_bits_uint32(this_as_native, out val, nbits);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_bit_reader_peek_bits_uint64(IntPtr raw, out ulong val, uint nbits);
public bool PeekBitsUint64(out ulong val, uint nbits) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_bit_reader_peek_bits_uint64(this_as_native, out val, nbits);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_bit_reader_peek_bits_uint8(IntPtr raw, out byte val, uint nbits);
public bool PeekBitsUint8(out byte val, uint nbits) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_bit_reader_peek_bits_uint8(this_as_native, out val, nbits);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_bit_reader_set_pos(IntPtr raw, uint pos);
public bool SetPos(uint pos) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_bit_reader_set_pos(this_as_native, pos);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_bit_reader_skip(IntPtr raw, uint nbits);
public bool Skip(uint nbits) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_bit_reader_skip(this_as_native, nbits);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_bit_reader_skip_to_byte(IntPtr raw);
public bool SkipToByte() {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_bit_reader_skip_to_byte(this_as_native);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
static void ReadNative (IntPtr native, ref Gst.Base.BitReader target)
{
target = New (native);
}
public bool Equals (BitReader other)
{
return true && Data.Equals (other.Data) && Size.Equals (other.Size) && Byte.Equals (other.Byte) && Bit.Equals (other.Bit);
}
public override bool Equals (object other)
{
return other is BitReader && Equals ((BitReader) other);
}
public override int GetHashCode ()
{
return this.GetType ().FullName.GetHashCode () ^ Data.GetHashCode () ^ Size.GetHashCode () ^ Byte.GetHashCode () ^ Bit.GetHashCode ();
}
private static GLib.GType GType {
get { return GLib.GType.Pointer; }
}
#endregion
}
}
@@ -0,0 +1,225 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Base {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
[StructLayout(LayoutKind.Sequential)]
public partial struct BitWriter : IEquatable<BitWriter> {
public byte Data;
public uint BitSize;
private uint bit_capacity;
private bool auto_grow;
private bool owned;
[MarshalAs (UnmanagedType.ByValArray, SizeConst=4)]
private IntPtr[] _gstGstReserved;
public static Gst.Base.BitWriter Zero = new Gst.Base.BitWriter ();
public static Gst.Base.BitWriter New(IntPtr raw) {
if (raw == IntPtr.Zero)
return Gst.Base.BitWriter.Zero;
return (Gst.Base.BitWriter) Marshal.PtrToStructure (raw, typeof (Gst.Base.BitWriter));
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_bit_writer_align_bytes(IntPtr raw, byte trailing_bit);
public bool AlignBytes(byte trailing_bit) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_bit_writer_align_bytes(this_as_native, trailing_bit);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_bit_writer_free(IntPtr raw);
public void Free() {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
gst_bit_writer_free(this_as_native);
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_bit_writer_free_and_get_buffer(IntPtr raw);
public Gst.Buffer FreeAndGetBuffer() {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
IntPtr raw_ret = gst_bit_writer_free_and_get_buffer(this_as_native);
Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true);
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern uint gst_bit_writer_get_remaining(IntPtr raw);
public uint Remaining {
get {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
uint raw_ret = gst_bit_writer_get_remaining(this_as_native);
uint ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern uint gst_bit_writer_get_size(IntPtr raw);
public uint Size {
get {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
uint raw_ret = gst_bit_writer_get_size(this_as_native);
uint ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_bit_writer_put_bits_uint16(IntPtr raw, ushort value, uint nbits);
public bool PutBitsUint16(ushort value, uint nbits) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_bit_writer_put_bits_uint16(this_as_native, value, nbits);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_bit_writer_put_bits_uint32(IntPtr raw, uint value, uint nbits);
public bool PutBitsUint32(uint value, uint nbits) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_bit_writer_put_bits_uint32(this_as_native, value, nbits);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_bit_writer_put_bits_uint64(IntPtr raw, ulong value, uint nbits);
public bool PutBitsUint64(ulong value, uint nbits) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_bit_writer_put_bits_uint64(this_as_native, value, nbits);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_bit_writer_put_bits_uint8(IntPtr raw, byte value, uint nbits);
public bool PutBitsUint8(byte value, uint nbits) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_bit_writer_put_bits_uint8(this_as_native, value, nbits);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_bit_writer_put_bytes(IntPtr raw, byte data, uint nbytes);
public bool PutBytes(byte data, uint nbytes) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_bit_writer_put_bytes(this_as_native, data, nbytes);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_bit_writer_reset(IntPtr raw);
public void Reset() {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
gst_bit_writer_reset(this_as_native);
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_bit_writer_reset_and_get_buffer(IntPtr raw);
public Gst.Buffer ResetAndGetBuffer() {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
IntPtr raw_ret = gst_bit_writer_reset_and_get_buffer(this_as_native);
Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true);
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_bit_writer_set_pos(IntPtr raw, uint pos);
public bool SetPos(uint pos) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_bit_writer_set_pos(this_as_native, pos);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
static void ReadNative (IntPtr native, ref Gst.Base.BitWriter target)
{
target = New (native);
}
public bool Equals (BitWriter other)
{
return true && Data.Equals (other.Data) && BitSize.Equals (other.BitSize) && bit_capacity.Equals (other.bit_capacity) && auto_grow.Equals (other.auto_grow) && owned.Equals (other.owned);
}
public override bool Equals (object other)
{
return other is BitWriter && Equals ((BitWriter) other);
}
public override int GetHashCode ()
{
return this.GetType ().FullName.GetHashCode () ^ Data.GetHashCode () ^ BitSize.GetHashCode () ^ bit_capacity.GetHashCode () ^ auto_grow.GetHashCode () ^ owned.GetHashCode ();
}
private static GLib.GType GType {
get { return GLib.GType.Pointer; }
}
#endregion
}
}
@@ -0,0 +1,18 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Base {
using System;
public delegate void BufferConsumedHandler(object o, BufferConsumedArgs args);
public class BufferConsumedArgs : GLib.SignalArgs {
public Gst.Buffer Object{
get {
return (Gst.Buffer) Args [0];
}
}
}
}
@@ -0,0 +1,110 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Base {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class ByteReader : GLib.Opaque {
public uint Size {
get {
unsafe {
uint* raw_ptr = (uint*)(((byte*)Handle) + abi_info.GetFieldOffset("size"));
return (*raw_ptr);
}
}
set {
unsafe {
uint* raw_ptr = (uint*)(((byte*)Handle) + abi_info.GetFieldOffset("size"));
*raw_ptr = value;
}
}
}
public uint Byte {
get {
unsafe {
uint* raw_ptr = (uint*)(((byte*)Handle) + abi_info.GetFieldOffset("byte"));
return (*raw_ptr);
}
}
set {
unsafe {
uint* raw_ptr = (uint*)(((byte*)Handle) + abi_info.GetFieldOffset("byte"));
*raw_ptr = value;
}
}
}
public ByteReader(IntPtr raw) : base(raw) {}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("data"
, 0
, (uint) Marshal.SizeOf(typeof(IntPtr)) // data
, null
, "size"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("size"
, -1
, (uint) Marshal.SizeOf(typeof(uint)) // size
, "data"
, "byte"
, (long) Marshal.OffsetOf(typeof(GstByteReader_sizeAlign), "size")
, 0
),
new GLib.AbiField("byte"
, -1
, (uint) Marshal.SizeOf(typeof(uint)) // byte
, "size"
, "_gst_reserved"
, (long) Marshal.OffsetOf(typeof(GstByteReader_byteAlign), "_byte")
, 0
),
new GLib.AbiField("_gst_reserved"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
, "byte"
, null
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
});
return _abi_info;
}
}
[StructLayout(LayoutKind.Sequential)]
public struct GstByteReader_sizeAlign
{
sbyte f1;
private uint size;
}
[StructLayout(LayoutKind.Sequential)]
public struct GstByteReader_byteAlign
{
sbyte f1;
private uint _byte;
}
// End of the ABI representation.
#endregion
}
}
@@ -0,0 +1,551 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Base {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
[StructLayout(LayoutKind.Sequential)]
public partial struct ByteWriter : IEquatable<ByteWriter> {
private IntPtr _parent;
public Gst.Base.ByteReader Parent {
get {
return _parent == IntPtr.Zero ? null : (Gst.Base.ByteReader) GLib.Opaque.GetOpaque (_parent, typeof (Gst.Base.ByteReader), false);
}
set {
_parent = value == null ? IntPtr.Zero : value.Handle;
}
}
public uint AllocSize;
public bool Fixed;
public bool Owned;
[MarshalAs (UnmanagedType.ByValArray, SizeConst=4)]
private IntPtr[] _gstGstReserved;
public static Gst.Base.ByteWriter Zero = new Gst.Base.ByteWriter ();
public static Gst.Base.ByteWriter New(IntPtr raw) {
if (raw == IntPtr.Zero)
return Gst.Base.ByteWriter.Zero;
return (Gst.Base.ByteWriter) Marshal.PtrToStructure (raw, typeof (Gst.Base.ByteWriter));
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_byte_writer_ensure_free_space(IntPtr raw, uint size);
public bool EnsureFreeSpace(uint size) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_byte_writer_ensure_free_space(this_as_native, size);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_byte_writer_fill(IntPtr raw, byte value, uint size);
public bool Fill(byte value, uint size) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_byte_writer_fill(this_as_native, value, size);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_byte_writer_free(IntPtr raw);
public void Free() {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
gst_byte_writer_free(this_as_native);
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_byte_writer_free_and_get_buffer(IntPtr raw);
public Gst.Buffer FreeAndGetBuffer() {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
IntPtr raw_ret = gst_byte_writer_free_and_get_buffer(this_as_native);
Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true);
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern byte gst_byte_writer_free_and_get_data(IntPtr raw);
public byte FreeAndGetData() {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
byte raw_ret = gst_byte_writer_free_and_get_data(this_as_native);
byte ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern uint gst_byte_writer_get_remaining(IntPtr raw);
public uint Remaining {
get {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
uint raw_ret = gst_byte_writer_get_remaining(this_as_native);
uint ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_byte_writer_init(IntPtr raw);
public void Init() {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
gst_byte_writer_init(this_as_native);
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_byte_writer_init_with_data(IntPtr raw, byte[] data, uint size, bool initialized);
public void InitWithData(byte[] data, uint size, bool initialized) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
gst_byte_writer_init_with_data(this_as_native, data, size, initialized);
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_byte_writer_init_with_size(IntPtr raw, uint size, bool mfixed);
public void InitWithSize(uint size, bool mfixed) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
gst_byte_writer_init_with_size(this_as_native, size, mfixed);
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_byte_writer_put_buffer(IntPtr raw, IntPtr buffer, UIntPtr offset, IntPtr size);
public bool PutBuffer(Gst.Buffer buffer, ulong offset, long size) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_byte_writer_put_buffer(this_as_native, buffer == null ? IntPtr.Zero : buffer.Handle, new UIntPtr (offset), new IntPtr (size));
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_byte_writer_put_data(IntPtr raw, byte[] data, uint size);
public bool PutData(byte[] data, uint size) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_byte_writer_put_data(this_as_native, data, size);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_byte_writer_put_float32_be(IntPtr raw, float val);
public bool PutFloat32Be(float val) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_byte_writer_put_float32_be(this_as_native, val);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_byte_writer_put_float32_le(IntPtr raw, float val);
public bool PutFloat32Le(float val) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_byte_writer_put_float32_le(this_as_native, val);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_byte_writer_put_float64_be(IntPtr raw, double val);
public bool PutFloat64Be(double val) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_byte_writer_put_float64_be(this_as_native, val);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_byte_writer_put_float64_le(IntPtr raw, double val);
public bool PutFloat64Le(double val) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_byte_writer_put_float64_le(this_as_native, val);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_byte_writer_put_int16_be(IntPtr raw, short val);
public bool PutInt16Be(short val) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_byte_writer_put_int16_be(this_as_native, val);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_byte_writer_put_int16_le(IntPtr raw, short val);
public bool PutInt16Le(short val) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_byte_writer_put_int16_le(this_as_native, val);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_byte_writer_put_int24_be(IntPtr raw, int val);
public bool PutInt24Be(int val) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_byte_writer_put_int24_be(this_as_native, val);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_byte_writer_put_int24_le(IntPtr raw, int val);
public bool PutInt24Le(int val) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_byte_writer_put_int24_le(this_as_native, val);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_byte_writer_put_int32_be(IntPtr raw, int val);
public bool PutInt32Be(int val) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_byte_writer_put_int32_be(this_as_native, val);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_byte_writer_put_int32_le(IntPtr raw, int val);
public bool PutInt32Le(int val) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_byte_writer_put_int32_le(this_as_native, val);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_byte_writer_put_int64_be(IntPtr raw, long val);
public bool PutInt64Be(long val) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_byte_writer_put_int64_be(this_as_native, val);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_byte_writer_put_int64_le(IntPtr raw, long val);
public bool PutInt64Le(long val) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_byte_writer_put_int64_le(this_as_native, val);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_byte_writer_put_int8(IntPtr raw, sbyte val);
public bool PutInt8(sbyte val) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_byte_writer_put_int8(this_as_native, val);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_byte_writer_put_string_utf16(IntPtr raw, ushort[] data);
public bool PutStringUtf16(ushort[] data) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_byte_writer_put_string_utf16(this_as_native, data);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_byte_writer_put_string_utf32(IntPtr raw, uint[] data);
public bool PutStringUtf32(uint[] data) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_byte_writer_put_string_utf32(this_as_native, data);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_byte_writer_put_string_utf8(IntPtr raw, IntPtr data);
public bool PutStringUtf8(string data) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
IntPtr native_data = GLib.Marshaller.StringToPtrGStrdup (data);
bool raw_ret = gst_byte_writer_put_string_utf8(this_as_native, native_data);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
GLib.Marshaller.Free (native_data);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_byte_writer_put_uint16_be(IntPtr raw, ushort val);
public bool PutUint16Be(ushort val) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_byte_writer_put_uint16_be(this_as_native, val);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_byte_writer_put_uint16_le(IntPtr raw, ushort val);
public bool PutUint16Le(ushort val) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_byte_writer_put_uint16_le(this_as_native, val);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_byte_writer_put_uint24_be(IntPtr raw, uint val);
public bool PutUint24Be(uint val) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_byte_writer_put_uint24_be(this_as_native, val);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_byte_writer_put_uint24_le(IntPtr raw, uint val);
public bool PutUint24Le(uint val) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_byte_writer_put_uint24_le(this_as_native, val);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_byte_writer_put_uint32_be(IntPtr raw, uint val);
public bool PutUint32Be(uint val) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_byte_writer_put_uint32_be(this_as_native, val);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_byte_writer_put_uint32_le(IntPtr raw, uint val);
public bool PutUint32Le(uint val) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_byte_writer_put_uint32_le(this_as_native, val);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_byte_writer_put_uint64_be(IntPtr raw, ulong val);
public bool PutUint64Be(ulong val) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_byte_writer_put_uint64_be(this_as_native, val);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_byte_writer_put_uint64_le(IntPtr raw, ulong val);
public bool PutUint64Le(ulong val) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_byte_writer_put_uint64_le(this_as_native, val);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_byte_writer_put_uint8(IntPtr raw, byte val);
public bool PutUint8(byte val) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
bool raw_ret = gst_byte_writer_put_uint8(this_as_native, val);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_byte_writer_reset(IntPtr raw);
public void Reset() {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
gst_byte_writer_reset(this_as_native);
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_byte_writer_reset_and_get_buffer(IntPtr raw);
public Gst.Buffer ResetAndGetBuffer() {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
IntPtr raw_ret = gst_byte_writer_reset_and_get_buffer(this_as_native);
Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true);
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
static void ReadNative (IntPtr native, ref Gst.Base.ByteWriter target)
{
target = New (native);
}
public bool Equals (ByteWriter other)
{
return true && Parent.Equals (other.Parent) && AllocSize.Equals (other.AllocSize) && Fixed.Equals (other.Fixed) && Owned.Equals (other.Owned);
}
public override bool Equals (object other)
{
return other is ByteWriter && Equals ((ByteWriter) other);
}
public override int GetHashCode ()
{
return this.GetType ().FullName.GetHashCode () ^ Parent.GetHashCode () ^ AllocSize.GetHashCode () ^ Fixed.GetHashCode () ^ Owned.GetHashCode ();
}
private static GLib.GType GType {
get { return GLib.GType.Pointer; }
}
#endregion
}
}
@@ -0,0 +1,75 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Base {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
[StructLayout(LayoutKind.Sequential)]
public partial struct CollectData : IEquatable<CollectData> {
private IntPtr _collect;
public Gst.Base.CollectPads Collect {
get {
return GLib.Object.GetObject(_collect) as Gst.Base.CollectPads;
}
set {
_collect = value == null ? IntPtr.Zero : value.Handle;
}
}
private IntPtr _pad;
public Gst.Pad Pad {
get {
return GLib.Object.GetObject(_pad) as Gst.Pad;
}
set {
_pad = value == null ? IntPtr.Zero : value.Handle;
}
}
private IntPtr _buffer;
public Gst.Buffer Buffer {
get {
return _buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (_buffer, typeof (Gst.Buffer), false);
}
set {
_buffer = value == null ? IntPtr.Zero : value.Handle;
}
}
public uint Pos;
public Gst.Segment Segment;
private Gst.Base.CollectPadsStateFlags state;
private IntPtr _priv;
public static Gst.Base.CollectData Zero = new Gst.Base.CollectData ();
public static Gst.Base.CollectData New(IntPtr raw) {
if (raw == IntPtr.Zero)
return Gst.Base.CollectData.Zero;
return (Gst.Base.CollectData) Marshal.PtrToStructure (raw, typeof (Gst.Base.CollectData));
}
public bool Equals (CollectData other)
{
return true && Collect.Equals (other.Collect) && Pad.Equals (other.Pad) && Buffer.Equals (other.Buffer) && Pos.Equals (other.Pos) && Segment.Equals (other.Segment) && state.Equals (other.state) && _priv.Equals (other._priv);
}
public override bool Equals (object other)
{
return other is CollectData && Equals ((CollectData) other);
}
public override int GetHashCode ()
{
return this.GetType ().FullName.GetHashCode () ^ Collect.GetHashCode () ^ Pad.GetHashCode () ^ Buffer.GetHashCode () ^ Pos.GetHashCode () ^ Segment.GetHashCode () ^ state.GetHashCode () ^ _priv.GetHashCode ();
}
private static GLib.GType GType {
get { return GLib.GType.Pointer; }
}
#endregion
}
}
@@ -0,0 +1,10 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Base {
using System;
public delegate void CollectDataDestroyNotify(Gst.Base.CollectData data);
}
@@ -0,0 +1,364 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Base {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class CollectPads : Gst.Object {
public CollectPads (IntPtr raw) : base(raw) {}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_collect_pads_new();
public CollectPads () : base (IntPtr.Zero)
{
if (GetType () != typeof (CollectPads)) {
CreateNativeObject (new string [0], new GLib.Value[0]);
return;
}
Raw = gst_collect_pads_new();
}
public GLib.SList Data {
get {
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("data"));
return new GLib.SList((*raw_ptr));
}
}
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _class_abi = null;
static public new GLib.AbiStruct class_abi {
get {
if (_class_abi == null)
_class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("_gst_reserved"
, Gst.Object.class_abi.Fields
, (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
, null
, null
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
});
return _class_abi;
}
}
// End of the ABI representation.
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_collect_pads_get_type();
public static new GLib.GType GType {
get {
IntPtr raw_ret = gst_collect_pads_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_collect_pads_add_pad(IntPtr raw, IntPtr pad, uint size, Gst.BaseSharp.CollectDataDestroyNotifyNative destroy_notify, bool _lock);
public Gst.Base.CollectData AddPad(Gst.Pad pad, uint size, Gst.Base.CollectDataDestroyNotify destroy_notify, bool _lock) {
Gst.BaseSharp.CollectDataDestroyNotifyWrapper destroy_notify_wrapper = new Gst.BaseSharp.CollectDataDestroyNotifyWrapper (destroy_notify);
destroy_notify_wrapper.PersistUntilCalled ();
IntPtr raw_ret = gst_collect_pads_add_pad(Handle, pad == null ? IntPtr.Zero : pad.Handle, size, destroy_notify_wrapper.NativeDelegate, _lock);
Gst.Base.CollectData ret = Gst.Base.CollectData.New (raw_ret);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern uint gst_collect_pads_available(IntPtr raw);
public uint Available() {
uint raw_ret = gst_collect_pads_available(Handle);
uint ret = raw_ret;
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gst_collect_pads_clip_running_time(IntPtr raw, IntPtr cdata, IntPtr buf, out IntPtr outbuf, IntPtr user_data);
public Gst.FlowReturn ClipRunningTime(Gst.Base.CollectData cdata, Gst.Buffer buf, out Gst.Buffer outbuf, IntPtr user_data) {
IntPtr native_cdata = GLib.Marshaller.StructureToPtrAlloc (cdata);
IntPtr native_outbuf;
int raw_ret = gst_collect_pads_clip_running_time(Handle, native_cdata, buf == null ? IntPtr.Zero : buf.Handle, out native_outbuf, user_data);
Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret;
Marshal.FreeHGlobal (native_cdata);
outbuf = native_outbuf == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (native_outbuf, typeof (Gst.Buffer), true);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_collect_pads_event_default(IntPtr raw, IntPtr data, IntPtr evnt, bool discard);
public bool EventDefault(Gst.Base.CollectData data, Gst.Event evnt, bool discard) {
IntPtr native_data = GLib.Marshaller.StructureToPtrAlloc (data);
bool raw_ret = gst_collect_pads_event_default(Handle, native_data, evnt == null ? IntPtr.Zero : evnt.Handle, discard);
bool ret = raw_ret;
Marshal.FreeHGlobal (native_data);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern uint gst_collect_pads_flush(IntPtr raw, IntPtr data, uint size);
public uint Flush(Gst.Base.CollectData data, uint size) {
IntPtr native_data = GLib.Marshaller.StructureToPtrAlloc (data);
uint raw_ret = gst_collect_pads_flush(Handle, native_data, size);
uint ret = raw_ret;
Marshal.FreeHGlobal (native_data);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_collect_pads_peek(IntPtr raw, IntPtr data);
public Gst.Buffer Peek(Gst.Base.CollectData data) {
IntPtr native_data = GLib.Marshaller.StructureToPtrAlloc (data);
IntPtr raw_ret = gst_collect_pads_peek(Handle, native_data);
Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true);
Marshal.FreeHGlobal (native_data);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_collect_pads_pop(IntPtr raw, IntPtr data);
public Gst.Buffer Pop(Gst.Base.CollectData data) {
IntPtr native_data = GLib.Marshaller.StructureToPtrAlloc (data);
IntPtr raw_ret = gst_collect_pads_pop(Handle, native_data);
Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true);
Marshal.FreeHGlobal (native_data);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_collect_pads_query_default(IntPtr raw, IntPtr data, IntPtr query, bool discard);
public bool QueryDefault(Gst.Base.CollectData data, Gst.Query query, bool discard) {
IntPtr native_data = GLib.Marshaller.StructureToPtrAlloc (data);
bool raw_ret = gst_collect_pads_query_default(Handle, native_data, query == null ? IntPtr.Zero : query.Handle, discard);
bool ret = raw_ret;
Marshal.FreeHGlobal (native_data);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_collect_pads_read_buffer(IntPtr raw, IntPtr data, uint size);
public Gst.Buffer ReadBuffer(Gst.Base.CollectData data, uint size) {
IntPtr native_data = GLib.Marshaller.StructureToPtrAlloc (data);
IntPtr raw_ret = gst_collect_pads_read_buffer(Handle, native_data, size);
Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true);
Marshal.FreeHGlobal (native_data);
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_collect_pads_remove_pad(IntPtr raw, IntPtr pad);
public bool RemovePad(Gst.Pad pad) {
bool raw_ret = gst_collect_pads_remove_pad(Handle, pad == null ? IntPtr.Zero : pad.Handle);
bool ret = raw_ret;
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_collect_pads_set_buffer_function(IntPtr raw, Gst.BaseSharp.CollectPadsBufferFunctionNative func, IntPtr user_data);
public Gst.Base.CollectPadsBufferFunction BufferFunction {
set {
Gst.BaseSharp.CollectPadsBufferFunctionWrapper value_wrapper = new Gst.BaseSharp.CollectPadsBufferFunctionWrapper (value);
gst_collect_pads_set_buffer_function(Handle, value_wrapper.NativeDelegate, IntPtr.Zero);
}
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_collect_pads_set_clip_function(IntPtr raw, Gst.BaseSharp.CollectPadsClipFunctionNative clipfunc, IntPtr user_data);
public Gst.Base.CollectPadsClipFunction ClipFunction {
set {
Gst.BaseSharp.CollectPadsClipFunctionWrapper value_wrapper = new Gst.BaseSharp.CollectPadsClipFunctionWrapper (value);
gst_collect_pads_set_clip_function(Handle, value_wrapper.NativeDelegate, IntPtr.Zero);
}
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_collect_pads_set_compare_function(IntPtr raw, Gst.BaseSharp.CollectPadsCompareFunctionNative func, IntPtr user_data);
public Gst.Base.CollectPadsCompareFunction CompareFunction {
set {
Gst.BaseSharp.CollectPadsCompareFunctionWrapper value_wrapper = new Gst.BaseSharp.CollectPadsCompareFunctionWrapper (value);
gst_collect_pads_set_compare_function(Handle, value_wrapper.NativeDelegate, IntPtr.Zero);
}
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_collect_pads_set_event_function(IntPtr raw, Gst.BaseSharp.CollectPadsEventFunctionNative func, IntPtr user_data);
public Gst.Base.CollectPadsEventFunction EventFunction {
set {
Gst.BaseSharp.CollectPadsEventFunctionWrapper value_wrapper = new Gst.BaseSharp.CollectPadsEventFunctionWrapper (value);
gst_collect_pads_set_event_function(Handle, value_wrapper.NativeDelegate, IntPtr.Zero);
}
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_collect_pads_set_flush_function(IntPtr raw, Gst.BaseSharp.CollectPadsFlushFunctionNative func, IntPtr user_data);
public Gst.Base.CollectPadsFlushFunction FlushFunction {
set {
Gst.BaseSharp.CollectPadsFlushFunctionWrapper value_wrapper = new Gst.BaseSharp.CollectPadsFlushFunctionWrapper (value);
gst_collect_pads_set_flush_function(Handle, value_wrapper.NativeDelegate, IntPtr.Zero);
}
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_collect_pads_set_flushing(IntPtr raw, bool flushing);
public bool Flushing {
set {
gst_collect_pads_set_flushing(Handle, value);
}
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_collect_pads_set_function(IntPtr raw, Gst.BaseSharp.CollectPadsFunctionNative func, IntPtr user_data);
public Gst.Base.CollectPadsFunction Function {
set {
Gst.BaseSharp.CollectPadsFunctionWrapper value_wrapper = new Gst.BaseSharp.CollectPadsFunctionWrapper (value);
gst_collect_pads_set_function(Handle, value_wrapper.NativeDelegate, IntPtr.Zero);
}
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_collect_pads_set_query_function(IntPtr raw, Gst.BaseSharp.CollectPadsQueryFunctionNative func, IntPtr user_data);
public Gst.Base.CollectPadsQueryFunction QueryFunction {
set {
Gst.BaseSharp.CollectPadsQueryFunctionWrapper value_wrapper = new Gst.BaseSharp.CollectPadsQueryFunctionWrapper (value);
gst_collect_pads_set_query_function(Handle, value_wrapper.NativeDelegate, IntPtr.Zero);
}
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_collect_pads_set_waiting(IntPtr raw, IntPtr data, bool waiting);
public void SetWaiting(Gst.Base.CollectData data, bool waiting) {
IntPtr native_data = GLib.Marshaller.StructureToPtrAlloc (data);
gst_collect_pads_set_waiting(Handle, native_data, waiting);
Marshal.FreeHGlobal (native_data);
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_collect_pads_src_event_default(IntPtr raw, IntPtr pad, IntPtr evnt);
public bool SrcEventDefault(Gst.Pad pad, Gst.Event evnt) {
bool raw_ret = gst_collect_pads_src_event_default(Handle, pad == null ? IntPtr.Zero : pad.Handle, evnt == null ? IntPtr.Zero : evnt.Handle);
bool ret = raw_ret;
return ret;
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_collect_pads_start(IntPtr raw);
public void Start() {
gst_collect_pads_start(Handle);
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_collect_pads_stop(IntPtr raw);
public void Stop() {
gst_collect_pads_stop(Handle);
}
[DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_collect_pads_take_buffer(IntPtr raw, IntPtr data, uint size);
public Gst.Buffer TakeBuffer(Gst.Base.CollectData data, uint size) {
IntPtr native_data = GLib.Marshaller.StructureToPtrAlloc (data);
IntPtr raw_ret = gst_collect_pads_take_buffer(Handle, native_data, size);
Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true);
Marshal.FreeHGlobal (native_data);
return ret;
}
static CollectPads ()
{
GtkSharp.GstreamerSharp.ObjectManager.Initialize ();
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public new GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("data"
, Gst.Object.abi_info.Fields
, (uint) Marshal.SizeOf(typeof(IntPtr)) // data
, null
, "stream_lock"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("stream_lock"
, -1
, (uint) Marshal.SizeOf(typeof(GLib.RecMutex.ABI)) // stream_lock
, "data"
, "priv"
, (long) Marshal.OffsetOf(typeof(GstCollectPads_stream_lockAlign), "stream_lock")
, 0
),
new GLib.AbiField("priv"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // priv
, "stream_lock"
, "_gst_reserved"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("_gst_reserved"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
, "priv"
, null
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
});
return _abi_info;
}
}
[StructLayout(LayoutKind.Sequential)]
public struct GstCollectPads_stream_lockAlign
{
sbyte f1;
private GLib.RecMutex.ABI stream_lock;
}
// End of the ABI representation.
#endregion
}
}
@@ -0,0 +1,10 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Base {
using System;
public delegate Gst.FlowReturn CollectPadsBufferFunction(Gst.Base.CollectPads pads, Gst.Base.CollectData data, Gst.Buffer buffer);
}
@@ -0,0 +1,10 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Base {
using System;
public delegate Gst.FlowReturn CollectPadsClipFunction(Gst.Base.CollectPads pads, Gst.Base.CollectData data, Gst.Buffer inbuffer, out Gst.Buffer outbuffer);
}
@@ -0,0 +1,10 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Base {
using System;
public delegate int CollectPadsCompareFunction(Gst.Base.CollectPads pads, Gst.Base.CollectData data1, ulong timestamp1, Gst.Base.CollectData data2, ulong timestamp2);
}
@@ -0,0 +1,10 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Base {
using System;
public delegate bool CollectPadsEventFunction(Gst.Base.CollectPads pads, Gst.Base.CollectData pad, Gst.Event evnt);
}

Some files were not shown because too many files have changed in this diff Show More