Ejemplo n.º 1
0
        public static Gst.MetaInfo ProtectionMetaGetInfo()
        {
            IntPtr raw_ret = gst_protection_meta_get_info();

            Gst.MetaInfo ret = Gst.MetaInfo.New(raw_ret);
            return(ret);
        }
Ejemplo n.º 2
0
        public static Gst.MetaInfo ReferenceTimestampMetaGetInfo()
        {
            IntPtr raw_ret = gst_reference_timestamp_meta_get_info();

            Gst.MetaInfo ret = Gst.MetaInfo.New(raw_ret);
            return(ret);
        }
Ejemplo n.º 3
0
        public static Gst.MetaInfo RtpSourceMetaGetInfo()
        {
            IntPtr raw_ret = gst_rtp_source_meta_get_info();

            Gst.MetaInfo ret = Gst.MetaInfo.New(raw_ret);
            return(ret);
        }
Ejemplo n.º 4
0
        public static Gst.MetaInfo ParentBufferMetaGetInfo()
        {
            IntPtr raw_ret = gst_parent_buffer_meta_get_info();

            Gst.MetaInfo ret = Gst.MetaInfo.New(raw_ret);
            return(ret);
        }
Ejemplo n.º 5
0
        public static Gst.MetaInfo AudioMetaGetInfo()
        {
            IntPtr raw_ret = gst_audio_meta_get_info();

            Gst.MetaInfo ret = Gst.MetaInfo.New(raw_ret);
            return(ret);
        }
Ejemplo n.º 6
0
        public static Gst.MetaInfo NetControlMessageMetaGetInfo()
        {
            IntPtr raw_ret = gst_net_control_message_meta_get_info();

            Gst.MetaInfo ret = Gst.MetaInfo.New(raw_ret);
            return(ret);
        }
Ejemplo n.º 7
0
        public static Gst.MetaInfo NetAddressMetaGetInfo()
        {
            IntPtr raw_ret = gst_net_address_meta_get_info();

            Gst.MetaInfo ret = Gst.MetaInfo.New(raw_ret);
            return(ret);
        }
Ejemplo n.º 8
0
        public static Gst.MetaInfo MetaRegisterCustom(string name, string[] tags, Gst.CustomMetaTransformFunction transform_func)
        {
            IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup(name);
            int    cnt_tags    = tags == null ? 0 : tags.Length;

            IntPtr[] native_tags = new IntPtr [cnt_tags + 1];
            for (int i = 0; i < cnt_tags; i++)
            {
                native_tags [i] = GLib.Marshaller.StringToPtrGStrdup(tags[i]);
            }
            native_tags [cnt_tags] = IntPtr.Zero;
            GstSharp.CustomMetaTransformFunctionWrapper transform_func_wrapper = new GstSharp.CustomMetaTransformFunctionWrapper(transform_func);
            IntPtr user_data;

            GLib.DestroyNotify destroy_data;
            if (transform_func == null)
            {
                user_data    = IntPtr.Zero;
                destroy_data = null;
            }
            else
            {
                user_data    = (IntPtr)GCHandle.Alloc(transform_func_wrapper);
                destroy_data = GLib.DestroyHelper.NotifyHandler;
            }
            IntPtr raw_ret = gst_meta_register_custom(native_name, native_tags, transform_func_wrapper.NativeDelegate, user_data, destroy_data);

            Gst.MetaInfo ret = Gst.MetaInfo.New(raw_ret);
            GLib.Marshaller.Free(native_name);
            return(ret);
        }
Ejemplo n.º 9
0
        public static Gst.MetaInfo GetInfo(string impl)
        {
            IntPtr native_impl = GLib.Marshaller.StringToPtrGStrdup(impl);
            IntPtr raw_ret     = gst_meta_get_info(native_impl);

            Gst.MetaInfo ret = Gst.MetaInfo.New(raw_ret);
            GLib.Marshaller.Free(native_impl);
            return(ret);
        }
Ejemplo n.º 10
0
        public Gst.Meta AddMeta(Gst.MetaInfo info, IntPtr parms)
        {
            IntPtr native_info = GLib.Marshaller.StructureToPtrAlloc(info);
            IntPtr raw_ret     = gst_buffer_add_meta(Handle, native_info, parms);

            Gst.Meta ret = Gst.Meta.New(raw_ret);
            Marshal.FreeHGlobal(native_info);
            return(ret);
        }
Ejemplo n.º 11
0
        public static Gst.MetaInfo Register(GLib.GType api, string impl, ulong size, Gst.MetaInitFunction init_func, Gst.MetaFreeFunction free_func, Gst.MetaTransformFunction transform_func)
        {
            IntPtr native_impl = GLib.Marshaller.StringToPtrGStrdup(impl);

            GstSharp.MetaInitFunctionWrapper init_func_wrapper = new GstSharp.MetaInitFunctionWrapper(init_func);
            init_func_wrapper.PersistUntilCalled();
            GstSharp.MetaFreeFunctionWrapper free_func_wrapper = new GstSharp.MetaFreeFunctionWrapper(free_func);
            free_func_wrapper.PersistUntilCalled();
            GstSharp.MetaTransformFunctionWrapper transform_func_wrapper = new GstSharp.MetaTransformFunctionWrapper(transform_func);
            transform_func_wrapper.PersistUntilCalled();
            IntPtr raw_ret = gst_meta_register(api.Val, native_impl, new UIntPtr(size), init_func_wrapper.NativeDelegate, free_func_wrapper.NativeDelegate, transform_func_wrapper.NativeDelegate);

            Gst.MetaInfo ret = Gst.MetaInfo.New(raw_ret);
            GLib.Marshaller.Free(native_impl);
            return(ret);
        }
Ejemplo n.º 12
0
 public Gst.Meta AddMeta(Gst.MetaInfo info)
 {
     return(AddMeta(info, IntPtr.Zero));
 }
Ejemplo n.º 13
0
 static void ReadNative(IntPtr native, ref Gst.MetaInfo target)
 {
     target = New(native);
 }