コード例 #1
0
        bool InvokeNative(Gst.Pad pad, Gst.Object parent, Gst.Event evnt)
        {
            evnt.Owned = false;
            bool __result = native_cb(pad == null ? IntPtr.Zero : pad.Handle, parent == null ? IntPtr.Zero : parent.Handle, evnt == null ? IntPtr.Zero : evnt.Handle);

            return(__result);
        }
        Gst.QueryType[] InvokeNative(Gst.Pad pad)
        {
            IntPtr raw_ret = native_cb(pad == null ? IntPtr.Zero : pad.Handle);

            if (raw_ret == IntPtr.Zero)
            {
                return new Gst.QueryType[] {}
            }
            ;

            ArrayList result = new ArrayList();
            bool      term   = false;
            int       ofs    = 0;

            while (!term)
            {
                Gst.QueryType t = (Gst.QueryType)Marshal.ReadInt32(raw_ret, ofs);

                if (t == Gst.QueryType.None)
                {
                    term = true;
                }
                else
                {
                    result.Add(t);
                    ofs += 4;
                }
            }

            return((Gst.QueryType[])result.ToArray(typeof(Gst.QueryType)));
        }
    }
コード例 #3
0
        public bool SrcEventDefault(Gst.Pad pad, Gst.Event evnt)
        {
            bool raw_ret = gst_collect_pads_src_event_default(Handle, pad == null ? IntPtr.Zero : pad.Handle, evnt == null ? IntPtr.Zero : evnt.Handle);
            bool ret     = raw_ret;

            return(ret);
        }
コード例 #4
0
        public bool RemovePad(Gst.Pad pad)
        {
            bool raw_ret = gst_collect_pads_remove_pad(Handle, pad == null ? IntPtr.Zero : pad.Handle);
            bool ret     = raw_ret;

            return(ret);
        }
コード例 #5
0
ファイル: Global.cs プロジェクト: thiblahute/gstreamer-sharp
        public static Gst.Caps TypeFindHelper(Gst.Pad src, ulong size)
        {
            IntPtr raw_ret = gst_type_find_helper(src == null ? IntPtr.Zero : src.Handle, size);

            Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps)GLib.Opaque.GetOpaque(raw_ret, typeof(Gst.Caps), true);
            return(ret);
        }
コード例 #6
0
ファイル: GhostPad.cs プロジェクト: leelaser/gstreamer-sharp
        public static bool InternalActivateModeDefault(Gst.Pad pad, Gst.Object parent, Gst.PadMode mode, bool active)
        {
            bool raw_ret = gst_ghost_pad_internal_activate_mode_default(pad == null ? IntPtr.Zero : pad.Handle, parent == null ? IntPtr.Zero : parent.Handle, (int)mode, active);
            bool ret     = raw_ret;

            return(ret);
        }
コード例 #7
0
ファイル: GhostPad.cs プロジェクト: leelaser/gstreamer-sharp
        public bool SetTarget(Gst.Pad newtarget)
        {
            bool raw_ret = gst_ghost_pad_set_target(Handle, newtarget == null ? IntPtr.Zero : newtarget.Handle);
            bool ret     = raw_ret;

            return(ret);
        }
コード例 #8
0
ファイル: ProxyPad.cs プロジェクト: xiaohszx/gstreamer-sharp
        public static Gst.Iterator IterateInternalLinksDefault(Gst.Pad pad, Gst.Object parent)
        {
            IntPtr raw_ret = gst_proxy_pad_iterate_internal_links_default(pad == null ? IntPtr.Zero : pad.Handle, parent == null ? IntPtr.Zero : parent.Handle);

            Gst.Iterator ret = raw_ret == IntPtr.Zero ? null : (Gst.Iterator)GLib.Opaque.GetOpaque(raw_ret, typeof(Gst.Iterator), true);
            return(ret);
        }
コード例 #9
0
ファイル: ProxyPad.cs プロジェクト: xiaohszx/gstreamer-sharp
        public static Gst.FlowReturn ChainListDefault(Gst.Pad pad, Gst.Object parent, Gst.BufferList list)
        {
            list.Owned = false;
            int raw_ret = gst_proxy_pad_chain_list_default(pad == null ? IntPtr.Zero : pad.Handle, parent == null ? IntPtr.Zero : parent.Handle, list == null ? IntPtr.Zero : list.Handle);

            Gst.FlowReturn ret = (Gst.FlowReturn)raw_ret;
            return(ret);
        }
        Gst.PadProbeReturn InvokeNative(Gst.Pad pad, Gst.PadProbeInfo info)
        {
            IntPtr native_info = GLib.Marshaller.StructureToPtrAlloc(info);

            Gst.PadProbeReturn __result = (Gst.PadProbeReturn)native_cb(pad == null ? IntPtr.Zero : pad.Handle, native_info, __data);
            Marshal.FreeHGlobal(native_info);
            return(__result);
        }
コード例 #11
0
ファイル: ProxyPad.cs プロジェクト: xiaohszx/gstreamer-sharp
        public static Gst.FlowReturn ChainDefault(Gst.Pad pad, Gst.Object parent, Gst.Buffer buffer)
        {
            buffer.Owned = false;
            int raw_ret = gst_proxy_pad_chain_default(pad == null ? IntPtr.Zero : pad.Handle, parent == null ? IntPtr.Zero : parent.Handle, buffer == null ? IntPtr.Zero : buffer.Handle);

            Gst.FlowReturn ret = (Gst.FlowReturn)raw_ret;
            return(ret);
        }
コード例 #12
0
        public Gst.Base.CollectData AddPad(Gst.Pad pad, uint size, Gst.Base.CollectDataDestroyNotify destroy_notify, bool _lock)
        {
            Gst.BaseSharp.CollectDataDestroyNotifyWrapper destroy_notify_wrapper = new Gst.BaseSharp.CollectDataDestroyNotifyWrapper(destroy_notify);
            destroy_notify_wrapper.PersistUntilCalled();
            IntPtr raw_ret = gst_collect_pads_add_pad(Handle, pad == null ? IntPtr.Zero : pad.Handle, size, destroy_notify_wrapper.NativeDelegate, _lock);

            Gst.Base.CollectData ret = Gst.Base.CollectData.New(raw_ret);
            return(ret);
        }
コード例 #13
0
        public void RemovePad(Gst.Pad pad)
        {
            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);
            gst_flow_combiner_remove_pad(this_as_native, pad == null ? IntPtr.Zero : pad.Handle);
            ReadNative(this_as_native, ref this);
            System.Runtime.InteropServices.Marshal.FreeHGlobal(this_as_native);
        }
コード例 #14
0
ファイル: ProxyPad.cs プロジェクト: xiaohszx/gstreamer-sharp
        public static Gst.FlowReturn GetrangeDefault(Gst.Pad pad, Gst.Object parent, ulong offset, uint size, out Gst.Buffer buffer)
        {
            IntPtr native_buffer;
            int    raw_ret = gst_proxy_pad_getrange_default(pad == null ? IntPtr.Zero : pad.Handle, parent == null ? IntPtr.Zero : parent.Handle, offset, size, out native_buffer);

            Gst.FlowReturn ret = (Gst.FlowReturn)raw_ret;
            buffer = native_buffer == IntPtr.Zero ? null : (Gst.Buffer)GLib.Opaque.GetOpaque(native_buffer, typeof(Gst.Buffer), true);
            return(ret);
        }
コード例 #15
0
        public Gst.FlowReturn UpdatePadFlow(Gst.Pad pad, Gst.FlowReturn fret)
        {
            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_flow_combiner_update_pad_flow(this_as_native, pad == null ? IntPtr.Zero : pad.Handle, (int)fret);

            Gst.FlowReturn ret = (Gst.FlowReturn)raw_ret;
            ReadNative(this_as_native, ref this);
            System.Runtime.InteropServices.Marshal.FreeHGlobal(this_as_native);
            return(ret);
        }
コード例 #16
0
        private void InternalPadCreatedEvent(Gst.Pad pad)
        {
            PadCreatedEventNativeDelegate unmanaged = null;

            unsafe {
                IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("pad_created"));
                unmanaged = (PadCreatedEventNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PadCreatedEventNativeDelegate));
            }
            if (unmanaged == null)
            {
                return;
            }

            unmanaged(this.Handle, pad == null ? IntPtr.Zero : pad.Handle);
        }
コード例 #17
0
ファイル: GhostPad.cs プロジェクト: leelaser/gstreamer-sharp
        public GhostPad(string name, Gst.Pad target, Gst.PadTemplate templ) : base(IntPtr.Zero)
        {
            if (GetType() != typeof(GhostPad))
            {
                var vals  = new List <GLib.Value> ();
                var names = new List <string> ();
                names.Add("name");
                vals.Add(new GLib.Value(name));
                CreateNativeObject(names.ToArray(), vals.ToArray());
                return;
            }
            IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup(name);

            Raw = gst_ghost_pad_new_from_template(native_name, target == null ? IntPtr.Zero : target.Handle, templ == null ? IntPtr.Zero : templ.Handle);
            GLib.Marshaller.Free(native_name);
        }
コード例 #18
0
        private Gst.Caps InternalGetCaps(Gst.Pad pad, Gst.Caps filter)
        {
            GetCapsNativeDelegate unmanaged = null;

            unsafe {
                IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("get_caps"));
                unmanaged = (GetCapsNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetCapsNativeDelegate));
            }
            if (unmanaged == null)
            {
                return(null);
            }

            IntPtr __result = unmanaged(this.Handle, pad == null ? IntPtr.Zero : pad.Handle, filter == null ? IntPtr.Zero : filter.Handle);

            return(__result == IntPtr.Zero ? null : (Gst.Caps)GLib.Opaque.GetOpaque(__result, typeof(Gst.Caps), true));
        }
コード例 #19
0
        private bool InternalQuery(Gst.Pad pad, Gst.Query query)
        {
            QueryNativeDelegate unmanaged = null;

            unsafe {
                IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("query"));
                unmanaged = (QueryNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(QueryNativeDelegate));
            }
            if (unmanaged == null)
            {
                return(false);
            }

            bool __result = unmanaged(this.Handle, pad == null ? IntPtr.Zero : pad.Handle, query == null ? IntPtr.Zero : query.Handle);

            return(__result);
        }
コード例 #20
0
ファイル: GhostPad.cs プロジェクト: leelaser/gstreamer-sharp
 public static bool InternalActivateModeDefault(Gst.Pad pad, Gst.PadMode mode, bool active)
 {
     return(InternalActivateModeDefault(pad, null, mode, active));
 }
 Gst.Iterator InvokeNative(Gst.Pad pad, Gst.Object parent)
 {
     Gst.Iterator __result = native_cb(pad == null ? IntPtr.Zero : pad.Handle, parent == null ? IntPtr.Zero : parent.Handle) == IntPtr.Zero ? null : (Gst.Iterator)GLib.Opaque.GetOpaque(native_cb(pad == null ? IntPtr.Zero : pad.Handle, parent == null ? IntPtr.Zero : parent.Handle), typeof(Gst.Iterator), true);
     return(__result);
 }
コード例 #22
0
 protected virtual void OnPadCreatedEvent(Gst.Pad pad)
 {
     InternalPadCreatedEvent(pad);
 }
コード例 #23
0
        bool InvokeNative(Gst.Pad pad)
        {
            bool __result = native_cb(pad == null ? IntPtr.Zero : pad.Handle, __data);

            return(__result);
        }
コード例 #24
0
ファイル: ProxyPad.cs プロジェクト: xiaohszx/gstreamer-sharp
 public static Gst.FlowReturn ChainListDefault(Gst.Pad pad, Gst.BufferList list)
 {
     return(ChainListDefault(pad, null, list));
 }
コード例 #25
0
ファイル: ProxyPad.cs プロジェクト: xiaohszx/gstreamer-sharp
 public static Gst.FlowReturn ChainDefault(Gst.Pad pad, Gst.Buffer buffer)
 {
     return(ChainDefault(pad, null, buffer));
 }
コード例 #26
0
ファイル: ProxyPad.cs プロジェクト: xiaohszx/gstreamer-sharp
 public static Gst.Iterator IterateInternalLinksDefault(Gst.Pad pad)
 {
     return(IterateInternalLinksDefault(pad, null));
 }
        bool InvokeNative(Gst.Pad pad, Gst.Event evnt)
        {
            bool __result = native_cb(pad == null ? IntPtr.Zero : pad.Handle, evnt == null ? IntPtr.Zero : evnt.Handle, __data);

            return(__result);
        }
コード例 #28
0
        bool InvokeNative(Gst.Pad pad, Gst.Object parent, Gst.PadMode mode, bool active)
        {
            bool __result = native_cb(pad == null ? IntPtr.Zero : pad.Handle, parent == null ? IntPtr.Zero : parent.Handle, (int)mode, active);

            return(__result);
        }
コード例 #29
0
 public void PadCreated(Gst.Pad pad)
 {
     gst_pad_template_pad_created(Handle, pad == null ? IntPtr.Zero : pad.Handle);
 }
コード例 #30
0
 Gst.FlowReturn InvokeNative(Gst.Pad pad, Gst.Object parent, Gst.Buffer buffer)
 {
     buffer.Owned = false;
     Gst.FlowReturn __result = (Gst.FlowReturn)native_cb(pad == null ? IntPtr.Zero : pad.Handle, parent == null ? IntPtr.Zero : parent.Handle, buffer == null ? IntPtr.Zero : buffer.Handle);
     return(__result);
 }