mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-09 08:55:33 +00:00
parent
63ee9a97f0
commit
5b386f21fb
2 changed files with 44 additions and 4 deletions
|
@ -32,8 +32,47 @@ namespace Gst {
|
|||
|
||||
}
|
||||
|
||||
[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||
static extern void gst_init(ref int argc, ref IntPtr[] argv);
|
||||
|
||||
[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||
static extern void gst_init(IntPtr argc, IntPtr argv);
|
||||
|
||||
|
||||
public static void Init() {
|
||||
gst_init (0, null);
|
||||
gst_init (IntPtr.Zero, IntPtr.Zero);
|
||||
}
|
||||
|
||||
public static void Init(ref string[] argv) {
|
||||
int cnt_argv = argv == null ? 0 : argv.Length;
|
||||
IntPtr[] native_argv = new IntPtr [cnt_argv];
|
||||
for (int i = 0; i < cnt_argv; i++)
|
||||
native_argv [i] = GLib.Marshaller.StringToPtrGStrdup(argv[i]);
|
||||
gst_init(ref cnt_argv, ref native_argv);
|
||||
}
|
||||
|
||||
[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||
static extern bool gst_init_check(ref int argc, ref IntPtr[] argv, out IntPtr error);
|
||||
|
||||
[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||
static extern bool gst_init_check(IntPtr argc, IntPtr argv, out IntPtr error);
|
||||
|
||||
public static bool InitCheck() {
|
||||
IntPtr error = IntPtr.Zero;
|
||||
bool ret = gst_init_check (IntPtr.Zero, IntPtr.Zero, out error);
|
||||
if (error != IntPtr.Zero) throw new GLib.GException (error);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static bool InitCheck(ref string[] argv) {
|
||||
int cnt_argv = argv == null ? 0 : argv.Length;
|
||||
IntPtr[] native_argv = new IntPtr [cnt_argv];
|
||||
for (int i = 0; i < cnt_argv; i++)
|
||||
native_argv [i] = GLib.Marshaller.StringToPtrGStrdup(argv[i]);
|
||||
IntPtr error = IntPtr.Zero;
|
||||
bool ret = gst_init_check(ref cnt_argv, ref native_argv, out error);
|
||||
if (error != IntPtr.Zero) throw new GLib.GException (error);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -70,9 +70,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|||
<!-- Maybe some problems with the name -->
|
||||
<remove-node path="/api/namespace/interface[@cname='GstURIHandler']/class_struct/method[@vm='get_type']" name="vm"/>
|
||||
<remove-node path="/api/namespace/interface[@cname='GstURIHandler']/virtual_method[@cname='get_type']" name="hidden"/>
|
||||
<!-- gapi cannot handle count parameters properly -->
|
||||
<attr path="/api/namespace/object[@cname='GstGlobal']/method[@cname='gst_init']/parameters/parameter[@name='argc']" name="name">n_argc</attr>
|
||||
<attr path="/api/namespace/object[@cname='GstGlobal']/method[@cname='gst_init_check']/parameters/parameter[@name='argc']" name="name">n_argc</attr>
|
||||
|
||||
<!-- calling oldobj.Handle should fix this -->
|
||||
<remove-attr path="/api/namespace/object[@cname='GstObject']/method[@cname='gst_object_replace']/parameters/parameter[@name='oldobj']" name="pass_as"/>
|
||||
<!-- Some glue problems -->
|
||||
|
@ -123,6 +121,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|||
<attr path="/api/namespace/boxed[@cname='GstMessage']/method[@cname='gst_message_parse_error']" name="hidden">true</attr>
|
||||
<attr path="/api/namespace/boxed[@cname='GstMessage']/method[@cname='gst_message_get_stream_status_object']" name="hidden">true</attr>
|
||||
<attr path="/api/namespace/boxed[@cname='GstMessage']/method[@cname='gst_message_set_stream_status_object']" name="hidden">true</attr>
|
||||
<attr path="/api/namespace/object[@cname='GstGlobal']/method[@cname='gst_init']" name="hidden">true</attr>
|
||||
<attr path="/api/namespace/object[@cname='GstGlobal']/method[@cname='gst_init_check']" name="hidden">true</attr>
|
||||
|
||||
|
||||
<!-- GstVideo -->
|
||||
<attr path="/api/namespace/boxed[@cname='GstVideoCodecState']/field[@cname='padding']" name="type">gpointer</attr>
|
||||
|
|
Loading…
Reference in a new issue