2018-01-29 18:56:49 +00:00
|
|
|
// 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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-10-24 14:00:17 +00:00
|
|
|
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
2018-01-29 18:56:49 +00:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-10-24 14:00:17 +00:00
|
|
|
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
2018-05-17 19:38:32 +00:00
|
|
|
static extern bool gst_audio_info_convert(IntPtr raw, int src_fmt, long src_val, int dest_fmt, out long dest_val);
|
2018-01-29 18:56:49 +00:00
|
|
|
|
2018-05-17 19:38:32 +00:00
|
|
|
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);
|
2018-01-29 18:56:49 +00:00
|
|
|
bool ret = raw_ret;
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2019-10-24 14:00:17 +00:00
|
|
|
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
2018-01-29 18:56:49 +00:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2019-10-24 14:00:17 +00:00
|
|
|
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
2018-01-29 18:56:49 +00:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2019-10-24 14:00:17 +00:00
|
|
|
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
2018-03-11 15:28:57 +00:00
|
|
|
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);
|
|
|
|
}
|
2018-01-29 18:56:49 +00:00
|
|
|
|
2018-03-11 15:28:57 +00:00
|
|
|
public void SetFormat(Gst.Audio.AudioFormat format, int rate, int channels) {
|
|
|
|
SetFormat (format, rate, channels, null);
|
2018-01-29 18:56:49 +00:00
|
|
|
}
|
|
|
|
|
2019-10-24 14:00:17 +00:00
|
|
|
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
2018-01-29 18:56:49 +00:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2023-03-01 09:55:38 +00:00
|
|
|
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
|
|
|
static extern bool gst_audio_info_from_caps(out IntPtr info, IntPtr caps);
|
|
|
|
|
|
|
|
public static bool FromCaps(out Gst.Audio.AudioInfo info, Gst.Caps caps) {
|
|
|
|
IntPtr native_info;
|
|
|
|
bool raw_ret = gst_audio_info_from_caps(out native_info, caps == null ? IntPtr.Zero : caps.Handle);
|
|
|
|
bool ret = raw_ret;
|
|
|
|
info = native_info == IntPtr.Zero ? null : (Gst.Audio.AudioInfo) GLib.Opaque.GetOpaque (native_info, typeof (Gst.Audio.AudioInfo), false);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
|
|
|
static extern void gst_audio_info_init(out IntPtr info);
|
|
|
|
|
|
|
|
public static Gst.Audio.AudioInfo Init() {
|
|
|
|
Gst.Audio.AudioInfo info;
|
|
|
|
IntPtr native_info;
|
|
|
|
gst_audio_info_init(out native_info);
|
|
|
|
info = native_info == IntPtr.Zero ? null : (Gst.Audio.AudioInfo) GLib.Opaque.GetOpaque (native_info, typeof (Gst.Audio.AudioInfo), false);
|
|
|
|
return info;
|
|
|
|
}
|
|
|
|
|
2018-01-29 18:56:49 +00:00
|
|
|
public AudioInfo(IntPtr raw) : base(raw) {}
|
|
|
|
|
2019-10-24 14:00:17 +00:00
|
|
|
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
2018-01-29 18:56:49 +00:00
|
|
|
static extern IntPtr gst_audio_info_new();
|
|
|
|
|
|
|
|
public AudioInfo ()
|
|
|
|
{
|
|
|
|
Raw = gst_audio_info_new();
|
|
|
|
}
|
|
|
|
|
2023-03-01 09:55:38 +00:00
|
|
|
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
|
|
|
static extern IntPtr gst_audio_info_new_from_caps(IntPtr caps);
|
|
|
|
|
|
|
|
public AudioInfo (Gst.Caps caps)
|
|
|
|
{
|
|
|
|
Raw = gst_audio_info_new_from_caps(caps == null ? IntPtr.Zero : caps.Handle);
|
|
|
|
}
|
|
|
|
|
2019-10-24 14:00:17 +00:00
|
|
|
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
2018-01-29 18:56:49 +00:00
|
|
|
static extern void gst_audio_info_free(IntPtr raw);
|
|
|
|
|
|
|
|
protected override void Free (IntPtr raw)
|
|
|
|
{
|
|
|
|
gst_audio_info_free (raw);
|
|
|
|
}
|
|
|
|
|
2021-08-05 13:37:27 +00:00
|
|
|
protected override Action<IntPtr> DisposeUnmanagedFunc {
|
|
|
|
get {
|
|
|
|
return gst_audio_info_free;
|
2018-01-29 18:56:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 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
|
|
|
|
}
|
|
|
|
}
|