public void AddChildrenProps(Gst.Element element, string[] wanted_categories, string[] blacklist, string[] whitelist) { int cnt_wanted_categories = wanted_categories == null ? 0 : wanted_categories.Length; IntPtr[] native_wanted_categories = new IntPtr [cnt_wanted_categories + 1]; for (int i = 0; i < cnt_wanted_categories; i++) { native_wanted_categories [i] = GLib.Marshaller.StringToPtrGStrdup(wanted_categories[i]); } native_wanted_categories [cnt_wanted_categories] = IntPtr.Zero; int cnt_blacklist = blacklist == null ? 0 : blacklist.Length; IntPtr[] native_blacklist = new IntPtr [cnt_blacklist + 1]; for (int i = 0; i < cnt_blacklist; i++) { native_blacklist [i] = GLib.Marshaller.StringToPtrGStrdup(blacklist[i]); } native_blacklist [cnt_blacklist] = IntPtr.Zero; int cnt_whitelist = whitelist == null ? 0 : whitelist.Length; IntPtr[] native_whitelist = new IntPtr [cnt_whitelist + 1]; for (int i = 0; i < cnt_whitelist; i++) { native_whitelist [i] = GLib.Marshaller.StringToPtrGStrdup(whitelist[i]); } native_whitelist [cnt_whitelist] = IntPtr.Zero; ges_track_element_add_children_props(Handle, element == null ? IntPtr.Zero : element.Handle, native_wanted_categories, native_blacklist, native_whitelist); }
public bool ReconfigureElement(Gst.Element element) { bool raw_ret = gst_device_reconfigure_element(Handle, element == null ? IntPtr.Zero : element.Handle); bool ret = raw_ret; return(ret); }
public static Gst.Sample PlaySinkConvertFrame(Gst.Element playsink, Gst.Caps caps) { IntPtr raw_ret = ges_play_sink_convert_frame(playsink == null ? IntPtr.Zero : playsink.Handle, caps == null ? IntPtr.Zero : caps.Handle); Gst.Sample ret = raw_ret == IntPtr.Zero ? null : (Gst.Sample)GLib.Opaque.GetOpaque(raw_ret, typeof(Gst.Sample), true); return(ret); }
public Gst.Element PreviewGetVideoSink() { IntPtr raw_ret = ges_pipeline_preview_get_video_sink(Handle); Gst.Element ret = GLib.Object.GetObject(raw_ret, true) as Gst.Element; return(ret); }
public static Gst.Message MissingEncoderMessageNew(Gst.Element element, Gst.Caps encode_caps) { IntPtr raw_ret = gst_missing_encoder_message_new(element == null ? IntPtr.Zero : element.Handle, encode_caps == null ? IntPtr.Zero : encode_caps.Handle); Gst.Message ret = raw_ret == IntPtr.Zero ? null : (Gst.Message)GLib.Opaque.GetOpaque(raw_ret, typeof(Gst.Message), true); return(ret); }
public static unsafe Gst.Element LaunchvFull(string[] argv, Gst.ParseContext context, Gst.ParseFlags flags) { int cnt_argv = argv == null ? 0 : argv.Length; IntPtr[] native_argv = new IntPtr [cnt_argv + 1]; for (int i = 0; i < cnt_argv; i++) { native_argv [i] = GLib.Marshaller.StringToPtrGStrdup(argv[i]); } native_argv [cnt_argv] = IntPtr.Zero; IntPtr error = IntPtr.Zero; IntPtr raw_ret = gst_parse_launchv_full(native_argv, context == null ? IntPtr.Zero : context.Handle, (int)flags, out error); Gst.Element ret = GLib.Object.GetObject(raw_ret) as Gst.Element; for (int i = 0; i < native_argv.Length - 1; i++) { argv [i] = GLib.Marshaller.Utf8PtrToString(native_argv[i]); GLib.Marshaller.Free(native_argv[i]); } if (error != IntPtr.Zero) { throw new GLib.GException(error); } return(ret); }
public static Gst.Message MissingElementMessageNew(Gst.Element element, string factory_name) { IntPtr native_factory_name = GLib.Marshaller.StringToPtrGStrdup(factory_name); IntPtr raw_ret = gst_missing_element_message_new(element == null ? IntPtr.Zero : element.Handle, native_factory_name); Gst.Message ret = raw_ret == IntPtr.Zero ? null : (Gst.Message)GLib.Opaque.GetOpaque(raw_ret, typeof(Gst.Message), true); GLib.Marshaller.Free(native_factory_name); return(ret); }
public Gst.Element Create(string name) { IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup(name); IntPtr raw_ret = gst_element_factory_create(Handle, native_name); Gst.Element ret = GLib.Object.GetObject(raw_ret) as Gst.Element; GLib.Marshaller.Free(native_name); return(ret); }
public static Gst.Message MissingUriSourceMessageNew(Gst.Element element, string protocol) { IntPtr native_protocol = GLib.Marshaller.StringToPtrGStrdup(protocol); IntPtr raw_ret = gst_missing_uri_source_message_new(element == null ? IntPtr.Zero : element.Handle, native_protocol); Gst.Message ret = raw_ret == IntPtr.Zero ? null : (Gst.Message)GLib.Opaque.GetOpaque(raw_ret, typeof(Gst.Message), true); GLib.Marshaller.Free(native_protocol); return(ret); }
public bool LookupChild(string prop_name, out Gst.Element element, out IntPtr pspec) { IntPtr native_prop_name = GLib.Marshaller.StringToPtrGStrdup(prop_name); IntPtr native_element; bool raw_ret = ges_track_element_lookup_child(Handle, native_prop_name, out native_element, out pspec); bool ret = raw_ret; GLib.Marshaller.Free(native_prop_name); element = GLib.Object.GetObject(native_element, true) as Gst.Element; return(ret); }
public static Gst.Element Make(string factoryname, string name) { IntPtr native_factoryname = GLib.Marshaller.StringToPtrGStrdup(factoryname); IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup(name); IntPtr raw_ret = gst_element_factory_make(native_factoryname, native_name); Gst.Element ret = GLib.Object.GetObject(raw_ret) as Gst.Element; GLib.Marshaller.Free(native_factoryname); GLib.Marshaller.Free(native_name); return(ret); }
public static unsafe Gst.Element Launch(string pipeline_description) { IntPtr native_pipeline_description = GLib.Marshaller.StringToPtrGStrdup(pipeline_description); IntPtr error = IntPtr.Zero; IntPtr raw_ret = gst_parse_launch(native_pipeline_description, out error); Gst.Element ret = GLib.Object.GetObject(raw_ret) as Gst.Element; GLib.Marshaller.Free(native_pipeline_description); if (error != IntPtr.Zero) { throw new GLib.GException(error); } return(ret); }
public static unsafe Gst.Element BinFromDescriptionFull(string bin_description, bool ghost_unlinked_pads, Gst.ParseContext context, Gst.ParseFlags flags) { IntPtr native_bin_description = GLib.Marshaller.StringToPtrGStrdup(bin_description); IntPtr error = IntPtr.Zero; IntPtr raw_ret = gst_parse_bin_from_description_full(native_bin_description, ghost_unlinked_pads, context == null ? IntPtr.Zero : context.Handle, (int)flags, out error); Gst.Element ret = GLib.Object.GetObject(raw_ret) as Gst.Element; GLib.Marshaller.Free(native_bin_description); if (error != IntPtr.Zero) { throw new GLib.GException(error); } return(ret); }
public static unsafe Gst.Element LaunchFull(string pipeline_description, Gst.ParseContext context, Gst.ParseFlags flags) { IntPtr native_pipeline_description = GLib.Marshaller.StringToPtrGStrdup(pipeline_description); IntPtr error = IntPtr.Zero; IntPtr raw_ret = gst_parse_launch_full(native_pipeline_description, context == null ? IntPtr.Zero : context.Handle, (int)flags, out error); Gst.Element ret = GLib.Object.GetObject(raw_ret) as Gst.Element; GLib.Marshaller.Free(native_pipeline_description); if (error != IntPtr.Zero) { throw new GLib.GException(error); } return(ret); }
public IntPtr NativeCallback(IntPtr track) { try { Gst.Element __ret = managed(GLib.Object.GetObject(track) as GES.Track); if (release_on_call) { gch.Free(); } return(__ret == null ? IntPtr.Zero : __ret.Handle); } catch (Exception e) { GLib.ExceptionManager.RaiseUnhandledException(e, true); // NOTREACHED: Above call does not return. throw e; } }
private void InternalSourceSetup(Gst.Element source) { SourceSetupNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("source_setup")); unmanaged = (SourceSetupNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SourceSetupNativeDelegate)); } if (unmanaged == null) { return; } unmanaged(this.Handle, source == null ? IntPtr.Zero : source.Handle); }
private bool InternalReconfigureElement(Gst.Element element) { ReconfigureElementNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("reconfigure_element")); unmanaged = (ReconfigureElementNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ReconfigureElementNativeDelegate)); } if (unmanaged == null) { return(false); } bool __result = unmanaged(this.Handle, element == null ? IntPtr.Zero : element.Handle); return(__result); }
public static unsafe Gst.Element Launchv(string[] argv) { int cnt_argv = argv == null ? 0 : argv.Length; IntPtr[] native_argv = new IntPtr [cnt_argv + 1]; for (int i = 0; i < cnt_argv; i++) { native_argv [i] = GLib.Marshaller.StringToPtrGStrdup(argv[i]); } native_argv [cnt_argv] = IntPtr.Zero; IntPtr error = IntPtr.Zero; IntPtr raw_ret = gst_parse_launchv(native_argv, out error); Gst.Element ret = GLib.Object.GetObject(raw_ret) as Gst.Element; if (error != IntPtr.Zero) { throw new GLib.GException(error); } return(ret); }
private bool InternalLookupChild(string prop_name, out Gst.Element element, out IntPtr pspec) { LookupChildNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("lookup_child")); unmanaged = (LookupChildNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(LookupChildNativeDelegate)); } if (unmanaged == null) { throw new InvalidOperationException("No base method to invoke"); } IntPtr native_prop_name = GLib.Marshaller.StringToPtrGStrdup(prop_name); IntPtr native_element; bool __result = unmanaged(this.Handle, native_prop_name, out native_element, out pspec); GLib.Marshaller.Free(native_prop_name); element = GLib.Object.GetObject(native_element, true) as Gst.Element; return(__result); }
bool InvokeNative(Gst.Element element, Gst.Pad pad) { bool __result = native_cb(element == null ? IntPtr.Zero : element.Handle, pad == null ? IntPtr.Zero : pad.Handle, __data); return(__result); }
void InvokeNative(Gst.Element element) { native_cb(element == null ? IntPtr.Zero : element.Handle, __data); }
public void PreviewSetVideoSink(Gst.Element sink) { ges_pipeline_preview_set_video_sink(Handle, sink == null ? IntPtr.Zero : sink.Handle); }
Gst.Element InvokeNative(GES.Track track) { Gst.Element __result = GLib.Object.GetObject(native_cb(track == null ? IntPtr.Zero : track.Handle)) as Gst.Element; return(__result); }
bool InvokeNative(GES.Clip clip, GES.TrackElement track_element, Gst.Element nleobj) { bool __result = native_cb(clip == null ? IntPtr.Zero : clip.Handle, track_element == null ? IntPtr.Zero : track_element.Handle, nleobj == null ? IntPtr.Zero : nleobj.Handle); return(__result); }
protected virtual bool OnLookupChild(string prop_name, out Gst.Element element, out IntPtr pspec) { return(InternalLookupChild(prop_name, out element, out pspec)); }
protected virtual void OnSourceSetup(Gst.Element source) { InternalSourceSetup(source); }
public void AddChildrenProps(Gst.Element element) { AddChildrenProps(element, null, null, null); }
public MainWindow() : base(WindowType.Toplevel) { BuildInterface (); pipeline = new Gst.Pipeline (); drawSink = Gst.ElementFactory.Make ("xvimagesink"); camerabin = Gst.ElementFactory.Make ("camerabin"); camerabin.Connect ("image-done", new Gst.SignalHandler (OnImageDone)); pipeline.SetState (Gst.State.Null); overlayAdapter = new Gst.Interfaces.XOverlayAdapter (drawSink.Handle); overlayAdapter.XwindowId = gdk_x11_drawable_get_xid (drawingArea.GdkWindow.Handle); pipeline.Add (camerabin); if (camerabin.HasProperty ("viewfinder-sink")) { camerabin ["viewfinder-sink"] = drawSink; } if (camerabin.HasProperty ("filename")) { camerabin ["filename"] = "snapshot.png"; } pipeline.SetState (Gst.State.Playing); this.ShowAll (); }
protected virtual bool OnReconfigureElement(Gst.Element element) { return(InternalReconfigureElement(element)); }