예제 #1
0
        public void SetNthAllocationParam(uint index, Gst.Allocator allocator, Gst.AllocationParams parms)
        {
            IntPtr native_parms = GLib.Marshaller.StructureToPtrAlloc(parms);

            gst_query_set_nth_allocation_param(Handle, index, allocator == null ? IntPtr.Zero : allocator.Handle, native_parms);
            Marshal.FreeHGlobal(native_parms);
        }
예제 #2
0
        public Buffer(Gst.Allocator allocator, ulong size, Gst.AllocationParams parms)
        {
            IntPtr native_parms = GLib.Marshaller.StructureToPtrAlloc(parms);

            Raw = gst_buffer_new_allocate(allocator == null ? IntPtr.Zero : allocator.Handle, new UIntPtr(size), native_parms);
            Marshal.FreeHGlobal(native_parms);
        }
예제 #3
0
        public void AddAllocationParam(Gst.Allocator allocator, Gst.AllocationParams parms)
        {
            IntPtr native_parms = GLib.Marshaller.StructureToPtrAlloc(parms);

            gst_query_add_allocation_param(Handle, allocator == null ? IntPtr.Zero : allocator.Handle, native_parms);
            Marshal.FreeHGlobal(native_parms);
        }
예제 #4
0
        public static void ConfigSetAllocator(Gst.Structure config, Gst.Allocator allocator, Gst.AllocationParams parms)
        {
            IntPtr native_parms = GLib.Marshaller.StructureToPtrAlloc(parms);

            gst_buffer_pool_config_set_allocator(config == null ? IntPtr.Zero : config.Handle, allocator == null ? IntPtr.Zero : allocator.Handle, native_parms);
            Marshal.FreeHGlobal(native_parms);
        }
        public static void Register(string name, Gst.Allocator allocator)
        {
            IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup(name);

            gst_allocator_register(native_name, allocator == null ? IntPtr.Zero : allocator.OwnedHandle);
            GLib.Marshaller.Free(native_name);
        }
        public static Gst.Allocator Find(string name)
        {
            IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup(name);
            IntPtr raw_ret     = gst_allocator_find(native_name);

            Gst.Allocator ret = GLib.Object.GetObject(raw_ret, true) as Gst.Allocator;
            GLib.Marshaller.Free(native_name);
            return(ret);
        }
예제 #7
0
        public void ParseNthAllocationParam(uint index, out Gst.Allocator allocator, out Gst.AllocationParams parms)
        {
            IntPtr native_allocator;
            IntPtr native_parms = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(Gst.AllocationParams)));

            gst_query_parse_nth_allocation_param(Handle, index, out native_allocator, native_parms);
            allocator = GLib.Object.GetObject(native_allocator, true) as Gst.Allocator;
            parms     = Gst.AllocationParams.New(native_parms);
            Marshal.FreeHGlobal(native_parms);
        }
예제 #8
0
        public static bool ConfigGetAllocator(Gst.Structure config, out Gst.Allocator allocator, out Gst.AllocationParams parms)
        {
            IntPtr native_allocator;
            IntPtr native_parms = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(Gst.AllocationParams)));
            bool   raw_ret      = gst_buffer_pool_config_get_allocator(config == null ? IntPtr.Zero : config.Handle, out native_allocator, native_parms);
            bool   ret          = raw_ret;

            allocator = GLib.Object.GetObject(native_allocator) as Gst.Allocator;
            parms     = Gst.AllocationParams.New(native_parms);
            Marshal.FreeHGlobal(native_parms);
            return(ret);
        }