Exemple #1
0
        public uint AddWatch(Gst.BusFunc func)
        {
            // https://developer.gnome.org/glib/unstable/glib-The-Main-Event-Loop.html#G-PRIORITY-DEFAULT:CAPS
            int G_PRIORITY_DEFAULT = 0;

            return(AddWatchFull(G_PRIORITY_DEFAULT, func));
        }
Exemple #2
0
 public BusFuncWrapper(Gst.BusFunc managed)
 {
     this.managed = managed;
     if (managed != null)
     {
         NativeDelegate = new BusFuncNative(NativeCallback);
     }
 }
Exemple #3
0
        public uint AddWatchFull(int priority, Gst.BusFunc func)
        {
            GstSharp.BusFuncWrapper func_wrapper = new GstSharp.BusFuncWrapper(func);
            IntPtr user_data;

            GLib.DestroyNotify notify;
            if (func == null)
            {
                user_data = IntPtr.Zero;
                notify    = null;
            }
            else
            {
                user_data = (IntPtr)GCHandle.Alloc(func_wrapper);
                notify    = GLib.DestroyHelper.NotifyHandler;
            }
            uint raw_ret = gst_bus_add_watch_full(Handle, priority, func_wrapper.NativeDelegate, user_data, notify);
            uint ret     = raw_ret;

            return(ret);
        }
		public BusFuncWrapper (Gst.BusFunc managed)
		{
			this.managed = managed;
			if (managed != null)
				NativeDelegate = new BusFuncNative (NativeCallback);
		}