示例#1
0
        public Gst.Rtsp.RTSPResult AppendHeaders(string str)
        {
            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_rtsp_message_append_headers(this_as_native, new GLib.GString(str).Handle);

            Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult)raw_ret;
            ReadNative(this_as_native, ref this);
            System.Runtime.InteropServices.Marshal.FreeHGlobal(this_as_native);
            return(ret);
        }
示例#2
0
        public Gst.Rtsp.RTSPResult Dump()
        {
            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_rtsp_message_dump(this_as_native);

            Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult)raw_ret;
            ReadNative(this_as_native, ref this);
            System.Runtime.InteropServices.Marshal.FreeHGlobal(this_as_native);
            return(ret);
        }
示例#3
0
        public Gst.Rtsp.RTSPResult RemoveHeader(Gst.Rtsp.RTSPHeaderField field, int indx)
        {
            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_rtsp_message_remove_header(this_as_native, (int)field, indx);

            Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult)raw_ret;
            ReadNative(this_as_native, ref this);
            System.Runtime.InteropServices.Marshal.FreeHGlobal(this_as_native);
            return(ret);
        }
示例#4
0
        public Gst.Rtsp.RTSPResult TakeHeader(Gst.Rtsp.RTSPHeaderField field, string value)
        {
            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_rtsp_message_take_header(this_as_native, (int)field, GLib.Marshaller.StringToPtrGStrdup(value));

            Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult)raw_ret;
            ReadNative(this_as_native, ref this);
            System.Runtime.InteropServices.Marshal.FreeHGlobal(this_as_native);
            return(ret);
        }
        public static Gst.Rtsp.RTSPResult RtspUrlParse(string urlstr, out Gst.Rtsp.RTSPUrl url)
        {
            IntPtr native_urlstr = GLib.Marshaller.StringToPtrGStrdup(urlstr);
            IntPtr native_url    = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(Gst.Rtsp.RTSPUrl)));
            int    raw_ret       = gst_rtsp_url_parse(native_urlstr, native_url);

            Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult)raw_ret;
            GLib.Marshaller.Free(native_urlstr);
            url = Gst.Rtsp.RTSPUrl.New(native_url);
            Marshal.FreeHGlobal(native_url);
            return(ret);
        }
        public static Gst.Rtsp.RTSPResult RtspRangeParse(string rangestr, out Gst.Rtsp.RTSPTimeRange range)
        {
            IntPtr native_rangestr = GLib.Marshaller.StringToPtrGStrdup(rangestr);
            IntPtr native_range    = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(Gst.Rtsp.RTSPTimeRange)));
            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);
            range = Gst.Rtsp.RTSPTimeRange.New(native_range);
            Marshal.FreeHGlobal(native_range);
            return(ret);
        }
        public static Gst.Rtsp.RTSPResult RtspMessageNewRequest(out Gst.Rtsp.RTSPMessage msg, Gst.Rtsp.RTSPMethod method, string uri)
        {
            IntPtr native_msg = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(Gst.Rtsp.RTSPMessage)));
            IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup(uri);
            int    raw_ret    = gst_rtsp_message_new_request(native_msg, (int)method, native_uri);

            Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult)raw_ret;
            msg = Gst.Rtsp.RTSPMessage.New(native_msg);
            Marshal.FreeHGlobal(native_msg);
            GLib.Marshaller.Free(native_uri);
            return(ret);
        }
        public Gst.Rtsp.RTSPResult SetBodyBuffer(Gst.Buffer buffer)
        {
            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_rtsp_message_set_body_buffer(this_as_native, buffer == null ? IntPtr.Zero : buffer.Handle);

            Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult)raw_ret;
            ReadNative(this_as_native, ref this);
            System.Runtime.InteropServices.Marshal.FreeHGlobal(this_as_native);
            return(ret);
        }
示例#9
0
        public Gst.Rtsp.RTSPResult SetPort(ushort port)
        {
            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_rtsp_url_set_port(this_as_native, port);

            Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult)raw_ret;
            ReadNative(this_as_native, ref this);
            System.Runtime.InteropServices.Marshal.FreeHGlobal(this_as_native);
            return(ret);
        }
示例#10
0
        public static Gst.Rtsp.RTSPResult RtspConnectionCreateFromSocket(GLib.Socket socket, string ip, ushort port, string initial_buffer, out Gst.Rtsp.RTSPConnection conn)
        {
            IntPtr native_ip             = GLib.Marshaller.StringToPtrGStrdup(ip);
            IntPtr native_initial_buffer = GLib.Marshaller.StringToPtrGStrdup(initial_buffer);
            IntPtr native_conn;
            int    raw_ret = gst_rtsp_connection_create_from_socket(socket == null ? IntPtr.Zero : socket.Handle, native_ip, port, native_initial_buffer, out native_conn);

            Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult)raw_ret;
            GLib.Marshaller.Free(native_ip);
            GLib.Marshaller.Free(native_initial_buffer);
            conn = native_conn == IntPtr.Zero ? null : (Gst.Rtsp.RTSPConnection)GLib.Opaque.GetOpaque(native_conn, typeof(Gst.Rtsp.RTSPConnection), true);
            return(ret);
        }
示例#11
0
        public static Gst.Rtsp.RTSPResult RtspMessageNewResponse(out Gst.Rtsp.RTSPMessage msg, Gst.Rtsp.RTSPStatusCode code, string reason, Gst.Rtsp.RTSPMessage request)
        {
            IntPtr native_msg     = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(Gst.Rtsp.RTSPMessage)));
            IntPtr native_reason  = GLib.Marshaller.StringToPtrGStrdup(reason);
            IntPtr native_request = GLib.Marshaller.StructureToPtrAlloc(request);
            int    raw_ret        = gst_rtsp_message_new_response(native_msg, (int)code, native_reason, native_request);

            Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult)raw_ret;
            msg = Gst.Rtsp.RTSPMessage.New(native_msg);
            Marshal.FreeHGlobal(native_msg);
            GLib.Marshaller.Free(native_reason);
            Marshal.FreeHGlobal(native_request);
            return(ret);
        }
示例#12
0
        public Gst.Rtsp.RTSPResult GetHeader(Gst.Rtsp.RTSPHeaderField field, out string value, int indx)
        {
            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_value;
            int    raw_ret = gst_rtsp_message_get_header(this_as_native, (int)field, out native_value, indx);

            Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult)raw_ret;
            ReadNative(this_as_native, ref this);
            System.Runtime.InteropServices.Marshal.FreeHGlobal(this_as_native);
            value = GLib.Marshaller.Utf8PtrToString(native_value);
            return(ret);
        }
示例#13
0
        public Gst.Rtsp.RTSPResult StealBodyBuffer(out Gst.Buffer buffer)
        {
            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_buffer;
            int    raw_ret = gst_rtsp_message_steal_body_buffer(this_as_native, out native_buffer);

            Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult)raw_ret;
            ReadNative(this_as_native, ref this);
            System.Runtime.InteropServices.Marshal.FreeHGlobal(this_as_native);
            buffer = native_buffer == IntPtr.Zero ? null : (Gst.Buffer)GLib.Opaque.GetOpaque(native_buffer, typeof(Gst.Buffer), true);
            return(ret);
        }
        public Gst.Rtsp.RTSPResult GetMediaType(out string media_type)
        {
            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_media_type;
            int    raw_ret = gst_rtsp_transport_get_media_type(this_as_native, out native_media_type);

            Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult)raw_ret;
            ReadNative(this_as_native, ref this);
            System.Runtime.InteropServices.Marshal.FreeHGlobal(this_as_native);
            media_type = GLib.Marshaller.Utf8PtrToString(native_media_type);
            return(ret);
        }
示例#15
0
        public Gst.Rtsp.RTSPResult RemoveHeaderByName(string header, int index)
        {
            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_header = GLib.Marshaller.StringToPtrGStrdup(header);
            int    raw_ret       = gst_rtsp_message_remove_header_by_name(this_as_native, native_header, index);

            Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult)raw_ret;
            ReadNative(this_as_native, ref this);
            System.Runtime.InteropServices.Marshal.FreeHGlobal(this_as_native);
            GLib.Marshaller.Free(native_header);
            return(ret);
        }
示例#16
0
        public Gst.Rtsp.RTSPResult InitRequest(Gst.Rtsp.RTSPMethod method, string uri)
        {
            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_uri = GLib.Marshaller.StringToPtrGStrdup(uri);
            int    raw_ret    = gst_rtsp_message_init_request(this_as_native, (int)method, native_uri);

            Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult)raw_ret;
            ReadNative(this_as_native, ref this);
            System.Runtime.InteropServices.Marshal.FreeHGlobal(this_as_native);
            GLib.Marshaller.Free(native_uri);
            return(ret);
        }
示例#17
0
        public Gst.Rtsp.RTSPResult InitResponse(Gst.Rtsp.RTSPStatusCode code, string reason, Gst.Rtsp.RTSPMessage request)
        {
            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_reason  = GLib.Marshaller.StringToPtrGStrdup(reason);
            IntPtr native_request = GLib.Marshaller.StructureToPtrAlloc(request);
            int    raw_ret        = gst_rtsp_message_init_response(this_as_native, (int)code, native_reason, native_request);

            Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult)raw_ret;
            ReadNative(this_as_native, ref this);
            System.Runtime.InteropServices.Marshal.FreeHGlobal(this_as_native);
            GLib.Marshaller.Free(native_reason);
            Marshal.FreeHGlobal(native_request);
            return(ret);
        }
示例#18
0
        public Gst.Rtsp.RTSPResult ParseResponse(out Gst.Rtsp.RTSPStatusCode code, out string reason, out Gst.Rtsp.RTSPVersion version)
        {
            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    native_code;
            IntPtr native_reason;
            int    native_version;
            int    raw_ret = gst_rtsp_message_parse_response(this_as_native, out native_code, out native_reason, out native_version);

            Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult)raw_ret;
            ReadNative(this_as_native, ref this);
            System.Runtime.InteropServices.Marshal.FreeHGlobal(this_as_native);
            code    = (Gst.Rtsp.RTSPStatusCode)native_code;
            reason  = GLib.Marshaller.Utf8PtrToString(native_reason);
            version = (Gst.Rtsp.RTSPVersion)native_version;
            return(ret);
        }
示例#19
0
        public Gst.Rtsp.RTSPResult ParseRequest(out Gst.Rtsp.RTSPMethod method, out string uri, out Gst.Rtsp.RTSPVersion version)
        {
            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    native_method;
            IntPtr native_uri;
            int    native_version;
            int    raw_ret = gst_rtsp_message_parse_request(this_as_native, out native_method, out native_uri, out native_version);

            Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult)raw_ret;
            ReadNative(this_as_native, ref this);
            System.Runtime.InteropServices.Marshal.FreeHGlobal(this_as_native);
            method  = (Gst.Rtsp.RTSPMethod)native_method;
            uri     = GLib.Marshaller.Utf8PtrToString(native_uri);
            version = (Gst.Rtsp.RTSPVersion)native_version;
            return(ret);
        }