示例#1
0
        public static unsafe Gst.PbUtils.EncodingTarget LoadFromFile(string filepath)
        {
            IntPtr native_filepath = GLib.Marshaller.StringToFilenamePtr(filepath);
            IntPtr error           = IntPtr.Zero;
            IntPtr raw_ret         = gst_encoding_target_load_from_file(native_filepath, out error);

            Gst.PbUtils.EncodingTarget ret = GLib.Object.GetObject(raw_ret, true) as Gst.PbUtils.EncodingTarget;
            GLib.Marshaller.Free(native_filepath);
            if (error != IntPtr.Zero)
            {
                throw new GLib.GException(error);
            }
            return(ret);
        }
示例#2
0
        public static unsafe Gst.PbUtils.EncodingTarget Load(string name, string category)
        {
            IntPtr native_name     = GLib.Marshaller.StringToPtrGStrdup(name);
            IntPtr native_category = GLib.Marshaller.StringToPtrGStrdup(category);
            IntPtr error           = IntPtr.Zero;
            IntPtr raw_ret         = gst_encoding_target_load(native_name, native_category, out error);

            Gst.PbUtils.EncodingTarget ret = GLib.Object.GetObject(raw_ret, true) as Gst.PbUtils.EncodingTarget;
            GLib.Marshaller.Free(native_name);
            GLib.Marshaller.Free(native_category);
            if (error != IntPtr.Zero)
            {
                throw new GLib.GException(error);
            }
            return(ret);
        }