public bool DetectServer(Gst.Rtsp.RTSPMessage resp)
        {
            IntPtr native_resp = GLib.Marshaller.StructureToPtrAlloc(resp);
            bool   raw_ret     = gst_rtsp_extension_detect_server(Handle, native_resp);
            bool   ret         = raw_ret;

            Marshal.FreeHGlobal(native_resp);
            return(ret);
        }
        public Gst.Rtsp.RTSPResult ReceiveRequest(Gst.Rtsp.RTSPMessage req)
        {
            IntPtr native_req = GLib.Marshaller.StructureToPtrAlloc(req);
            int    raw_ret    = gst_rtsp_extension_receive_request(Handle, native_req);

            Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult)raw_ret;
            Marshal.FreeHGlobal(native_req);
            return(ret);
        }
Example #3
0
        public Gst.Rtsp.RTSPResult SendMessage(Gst.Rtsp.RTSPMessage message, out uint id)
        {
            IntPtr native_message = GLib.Marshaller.StructureToPtrAlloc(message);
            int    raw_ret        = gst_rtsp_watch_send_message(Handle, native_message, out id);

            Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult)raw_ret;
            Marshal.FreeHGlobal(native_message);
            return(ret);
        }
Example #4
0
        public Gst.Rtsp.RTSPResult ConnectWithResponse(IntPtr timeout, Gst.Rtsp.RTSPMessage response)
        {
            IntPtr native_response = GLib.Marshaller.StructureToPtrAlloc(response);
            int    raw_ret         = gst_rtsp_connection_connect_with_response(Handle, timeout, native_response);

            Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult)raw_ret;
            Marshal.FreeHGlobal(native_response);
            return(ret);
        }
Example #5
0
        public Gst.Rtsp.RTSPResult Send(Gst.Rtsp.RTSPMessage message, IntPtr timeout)
        {
            IntPtr native_message = GLib.Marshaller.StructureToPtrAlloc(message);
            int    raw_ret        = gst_rtsp_connection_send(Handle, native_message, timeout);

            Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult)raw_ret;
            Marshal.FreeHGlobal(native_message);
            return(ret);
        }
Example #6
0
        public static Gst.Rtsp.RTSPResult RtspMessageNewData(out Gst.Rtsp.RTSPMessage msg, byte channel)
        {
            IntPtr native_msg = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(Gst.Rtsp.RTSPMessage)));
            int    raw_ret    = gst_rtsp_message_new_data(native_msg, channel);

            Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult)raw_ret;
            msg = Gst.Rtsp.RTSPMessage.New(native_msg);
            Marshal.FreeHGlobal(native_msg);
            return(ret);
        }
        public Gst.Rtsp.RTSPResult Send(Gst.Rtsp.RTSPMessage req, Gst.Rtsp.RTSPMessage resp)
        {
            IntPtr native_req  = GLib.Marshaller.StructureToPtrAlloc(req);
            IntPtr native_resp = GLib.Marshaller.StructureToPtrAlloc(resp);
            int    raw_ret     = gst_rtsp_extension_send(Handle, native_req, native_resp);

            Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult)raw_ret;
            Marshal.FreeHGlobal(native_req);
            Marshal.FreeHGlobal(native_resp);
            return(ret);
        }
Example #8
0
        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);
        }
Example #9
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);
        }
Example #10
0
 public static Gst.Rtsp.RTSPResult RtspMessageNewResponse(out Gst.Rtsp.RTSPMessage msg, Gst.Rtsp.RTSPStatusCode code)
 {
     return(RtspMessageNewResponse(out msg, code, null, Gst.Rtsp.RTSPMessage.Zero));
 }
Example #11
0
 static void ReadNative(IntPtr native, ref Gst.Rtsp.RTSPMessage target)
 {
     target = New(native);
 }
Example #12
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);
        }