public RTSPExtensionAdapter(IRTSPExtensionImplementor implementor)
 {
     if (implementor == null)
     {
         throw new ArgumentNullException("implementor");
     }
     else if (!(implementor is GLib.Object))
     {
         throw new ArgumentException("implementor must be a subclass of GLib.Object");
     }
     this.implementor = implementor as GLib.Object;
 }
 static int ParseSdp_cb(IntPtr inst, IntPtr sdp, IntPtr s)
 {
     try {
         IRTSPExtensionImplementor __obj = GLib.Object.GetObject(inst, false) as IRTSPExtensionImplementor;
         Gst.Rtsp.RTSPResult       __result;
         __result = __obj.ParseSdp(sdp == IntPtr.Zero ? null : (Gst.Sdp.SDPMessage)GLib.Opaque.GetOpaque(sdp, typeof(Gst.Sdp.SDPMessage), false), s == IntPtr.Zero ? null : (Gst.Structure)GLib.Opaque.GetOpaque(s, typeof(Gst.Structure), false));
         return((int)__result);
     } catch (Exception e) {
         GLib.ExceptionManager.RaiseUnhandledException(e, true);
         // NOTREACHED: above call does not return.
         throw e;
     }
 }
 static int AfterSend_cb(IntPtr inst, IntPtr req, IntPtr resp)
 {
     try {
         IRTSPExtensionImplementor __obj = GLib.Object.GetObject(inst, false) as IRTSPExtensionImplementor;
         Gst.Rtsp.RTSPResult       __result;
         __result = __obj.AfterSend(Gst.Rtsp.RTSPMessage.New(req), Gst.Rtsp.RTSPMessage.New(resp));
         return((int)__result);
     } catch (Exception e) {
         GLib.ExceptionManager.RaiseUnhandledException(e, true);
         // NOTREACHED: above call does not return.
         throw e;
     }
 }
 static bool DetectServer_cb(IntPtr inst, IntPtr resp)
 {
     try {
         IRTSPExtensionImplementor __obj = GLib.Object.GetObject(inst, false) as IRTSPExtensionImplementor;
         bool __result;
         __result = __obj.DetectServer(Gst.Rtsp.RTSPMessage.New(resp));
         return(__result);
     } catch (Exception e) {
         GLib.ExceptionManager.RaiseUnhandledException(e, true);
         // NOTREACHED: above call does not return.
         throw e;
     }
 }
 static int StreamSelect_cb(IntPtr inst, IntPtr url)
 {
     try {
         IRTSPExtensionImplementor __obj = GLib.Object.GetObject(inst, false) as IRTSPExtensionImplementor;
         Gst.Rtsp.RTSPResult       __result;
         __result = __obj.StreamSelect(Gst.Rtsp.RTSPUrl.New(url));
         return((int)__result);
     } catch (Exception e) {
         GLib.ExceptionManager.RaiseUnhandledException(e, true);
         // NOTREACHED: above call does not return.
         throw e;
     }
 }
 static int GetTransports_cb(IntPtr inst, int protocols, IntPtr transport)
 {
     try {
         IRTSPExtensionImplementor __obj = GLib.Object.GetObject(inst, false) as IRTSPExtensionImplementor;
         Gst.Rtsp.RTSPResult       __result;
         __result = __obj.GetTransports((Gst.Rtsp.RTSPLowerTrans)protocols, GLib.Marshaller.Utf8PtrToString(transport));
         return((int)__result);
     } catch (Exception e) {
         GLib.ExceptionManager.RaiseUnhandledException(e, true);
         // NOTREACHED: above call does not return.
         throw e;
     }
 }
 static bool ConfigureStream_cb(IntPtr inst, IntPtr caps)
 {
     try {
         IRTSPExtensionImplementor __obj = GLib.Object.GetObject(inst, false) as IRTSPExtensionImplementor;
         bool __result;
         __result = __obj.ConfigureStream(caps == IntPtr.Zero ? null : (Gst.Caps)GLib.Opaque.GetOpaque(caps, typeof(Gst.Caps), false));
         return(__result);
     } catch (Exception e) {
         GLib.ExceptionManager.RaiseUnhandledException(e, true);
         // NOTREACHED: above call does not return.
         throw e;
     }
 }