mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-12 04:11:31 +00:00
102 lines
3.5 KiB
C#
102 lines
3.5 KiB
C#
|
// This file was generated by the Gtk# code generator.
|
||
|
// Any changes made will be lost if regenerated.
|
||
|
|
||
|
namespace Gst.Rtsp {
|
||
|
|
||
|
using System;
|
||
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using System.Runtime.InteropServices;
|
||
|
|
||
|
#region Autogenerated code
|
||
|
[StructLayout(LayoutKind.Sequential)]
|
||
|
public partial struct RTSPRange : IEquatable<RTSPRange> {
|
||
|
|
||
|
public int Min;
|
||
|
public int Max;
|
||
|
|
||
|
public static Gst.Rtsp.RTSPRange Zero = new Gst.Rtsp.RTSPRange ();
|
||
|
|
||
|
public static Gst.Rtsp.RTSPRange New(IntPtr raw) {
|
||
|
if (raw == IntPtr.Zero)
|
||
|
return Gst.Rtsp.RTSPRange.Zero;
|
||
|
return (Gst.Rtsp.RTSPRange) Marshal.PtrToStructure (raw, typeof (Gst.Rtsp.RTSPRange));
|
||
|
}
|
||
|
|
||
|
[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
||
|
static extern bool gst_rtsp_range_convert_units(IntPtr range, int unit);
|
||
|
|
||
|
public static bool ConvertUnits(Gst.Rtsp.RTSPTimeRange range, Gst.Rtsp.RTSPRangeUnit unit) {
|
||
|
IntPtr native_range = GLib.Marshaller.StructureToPtrAlloc (range);
|
||
|
bool raw_ret = gst_rtsp_range_convert_units(native_range, (int) unit);
|
||
|
bool ret = raw_ret;
|
||
|
Marshal.FreeHGlobal (native_range);
|
||
|
return ret;
|
||
|
}
|
||
|
|
||
|
[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
||
|
static extern void gst_rtsp_range_free(IntPtr range);
|
||
|
|
||
|
public static void Free(Gst.Rtsp.RTSPTimeRange range) {
|
||
|
IntPtr native_range = GLib.Marshaller.StructureToPtrAlloc (range);
|
||
|
gst_rtsp_range_free(native_range);
|
||
|
Marshal.FreeHGlobal (native_range);
|
||
|
}
|
||
|
|
||
|
[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
||
|
static extern bool gst_rtsp_range_get_times(IntPtr range, ulong min, ulong max);
|
||
|
|
||
|
public static bool GetTimes(Gst.Rtsp.RTSPTimeRange range, ulong min, ulong max) {
|
||
|
IntPtr native_range = GLib.Marshaller.StructureToPtrAlloc (range);
|
||
|
bool raw_ret = gst_rtsp_range_get_times(native_range, min, max);
|
||
|
bool ret = raw_ret;
|
||
|
Marshal.FreeHGlobal (native_range);
|
||
|
return ret;
|
||
|
}
|
||
|
|
||
|
[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
||
|
static extern int gst_rtsp_range_parse(IntPtr rangestr, IntPtr range);
|
||
|
|
||
|
public static Gst.Rtsp.RTSPResult Parse(string rangestr, Gst.Rtsp.RTSPTimeRange range) {
|
||
|
IntPtr native_rangestr = GLib.Marshaller.StringToPtrGStrdup (rangestr);
|
||
|
IntPtr native_range = GLib.Marshaller.StructureToPtrAlloc (range);
|
||
|
int raw_ret = gst_rtsp_range_parse(native_rangestr, native_range);
|
||
|
Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret;
|
||
|
GLib.Marshaller.Free (native_rangestr);
|
||
|
Marshal.FreeHGlobal (native_range);
|
||
|
return ret;
|
||
|
}
|
||
|
|
||
|
[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
||
|
static extern IntPtr gst_rtsp_range_to_string(IntPtr range);
|
||
|
|
||
|
public static string ToString(Gst.Rtsp.RTSPTimeRange range) {
|
||
|
IntPtr native_range = GLib.Marshaller.StructureToPtrAlloc (range);
|
||
|
IntPtr raw_ret = gst_rtsp_range_to_string(native_range);
|
||
|
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
|
||
|
Marshal.FreeHGlobal (native_range);
|
||
|
return ret;
|
||
|
}
|
||
|
|
||
|
public bool Equals (RTSPRange other)
|
||
|
{
|
||
|
return true && Min.Equals (other.Min) && Max.Equals (other.Max);
|
||
|
}
|
||
|
|
||
|
public override bool Equals (object other)
|
||
|
{
|
||
|
return other is RTSPRange && Equals ((RTSPRange) other);
|
||
|
}
|
||
|
|
||
|
public override int GetHashCode ()
|
||
|
{
|
||
|
return this.GetType ().FullName.GetHashCode () ^ Min.GetHashCode () ^ Max.GetHashCode ();
|
||
|
}
|
||
|
|
||
|
private static GLib.GType GType {
|
||
|
get { return GLib.GType.Pointer; }
|
||
|
}
|
||
|
#endregion
|
||
|
}
|
||
|
}
|