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.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));
|
|
|
|
}
|
|
|
|
|
2019-10-24 14:00:17 +00:00
|
|
|
[DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
2018-01-29 18:56:49 +00:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2019-10-24 14:00:17 +00:00
|
|
|
[DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
2018-01-29 18:56:49 +00:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
|
2019-10-24 14:00:17 +00:00
|
|
|
[DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
2018-05-17 19:38:32 +00:00
|
|
|
static extern bool gst_rtsp_range_get_times(IntPtr range, out ulong min, out ulong max);
|
2018-01-29 18:56:49 +00:00
|
|
|
|
2018-05-17 19:38:32 +00:00
|
|
|
public static bool GetTimes(Gst.Rtsp.RTSPTimeRange range, out ulong min, out ulong max) {
|
2018-01-29 18:56:49 +00:00
|
|
|
IntPtr native_range = GLib.Marshaller.StructureToPtrAlloc (range);
|
2018-05-17 19:38:32 +00:00
|
|
|
bool raw_ret = gst_rtsp_range_get_times(native_range, out min, out max);
|
2018-01-29 18:56:49 +00:00
|
|
|
bool ret = raw_ret;
|
|
|
|
Marshal.FreeHGlobal (native_range);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2019-10-24 14:00:17 +00:00
|
|
|
[DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
2018-01-29 18:56:49 +00:00
|
|
|
static extern int gst_rtsp_range_parse(IntPtr rangestr, IntPtr range);
|
|
|
|
|
2018-05-17 19:38:32 +00:00
|
|
|
public static Gst.Rtsp.RTSPResult Parse(string rangestr, out Gst.Rtsp.RTSPTimeRange range) {
|
2018-01-29 18:56:49 +00:00
|
|
|
IntPtr native_rangestr = GLib.Marshaller.StringToPtrGStrdup (rangestr);
|
2018-05-17 19:38:32 +00:00
|
|
|
IntPtr native_range = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.Rtsp.RTSPTimeRange)));
|
2018-01-29 18:56:49 +00:00
|
|
|
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);
|
2018-05-17 19:38:32 +00:00
|
|
|
range = Gst.Rtsp.RTSPTimeRange.New (native_range);
|
2018-01-29 18:56:49 +00:00
|
|
|
Marshal.FreeHGlobal (native_range);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2019-10-24 14:00:17 +00:00
|
|
|
[DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
2018-01-29 18:56:49 +00:00
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|