From 4d9415a751e7052d571658527ec3ad996aed798a Mon Sep 17 00:00:00 2001 From: Maarten Bosmans Date: Fri, 5 Jun 2009 21:26:46 +0200 Subject: [PATCH] Add bindings for libgstapp Fixes bug #584747. --- gstreamer-sharp/AppSink.custom | 14 ++ gstreamer-sharp/AppSrc.custom | 14 ++ gstreamer-sharp/Gstreamer.metadata | 49 +++++ gstreamer-sharp/Makefile.am | 2 + gstreamer-sharp/gstreamer-api.raw | 295 +++++++++++++++++++++++++++++ source/gstreamer-sharp-source.xml | 5 + 6 files changed, 379 insertions(+) create mode 100644 gstreamer-sharp/AppSink.custom create mode 100644 gstreamer-sharp/AppSrc.custom diff --git a/gstreamer-sharp/AppSink.custom b/gstreamer-sharp/AppSink.custom new file mode 100644 index 0000000000..df66327442 --- /dev/null +++ b/gstreamer-sharp/AppSink.custom @@ -0,0 +1,14 @@ + [DllImport("libgstreamer-0.10.dll") ] + static extern IntPtr gst_element_factory_make (IntPtr element, IntPtr name); + + public AppSink (string name) : base (IntPtr.Zero) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr native_element = GLib.Marshaller.StringToPtrGStrdup ("appsink"); + Raw = gst_element_factory_make (native_element, native_name); + GLib.Marshaller.Free (native_name); + GLib.Marshaller.Free (native_element); + if (Raw == IntPtr.Zero) + throw new Exception ("Failed to instantiate element \"appsink\""); + } + + public AppSink () : this ((string) null) { } diff --git a/gstreamer-sharp/AppSrc.custom b/gstreamer-sharp/AppSrc.custom new file mode 100644 index 0000000000..427252a43d --- /dev/null +++ b/gstreamer-sharp/AppSrc.custom @@ -0,0 +1,14 @@ + [DllImport("libgstreamer-0.10.dll") ] + static extern IntPtr gst_element_factory_make (IntPtr element, IntPtr name); + + public AppSrc (string name) : base (IntPtr.Zero) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr native_element = GLib.Marshaller.StringToPtrGStrdup ("appsrc"); + Raw = gst_element_factory_make (native_element, native_name); + GLib.Marshaller.Free (native_name); + GLib.Marshaller.Free (native_element); + if (Raw == IntPtr.Zero) + throw new Exception ("Failed to instantiate element \"appsrc\""); + } + + public AppSrc () : this ((string) null) { } diff --git a/gstreamer-sharp/Gstreamer.metadata b/gstreamer-sharp/Gstreamer.metadata index 844f07ddec..12eab8eb85 100644 --- a/gstreamer-sharp/Gstreamer.metadata +++ b/gstreamer-sharp/Gstreamer.metadata @@ -1102,6 +1102,55 @@ 4 + + 1 + 1 + 1 + + eos + + signal + LAST + eos + + new_preroll + + signal + LAST + new_preroll + + new_buffer + + signal + LAST + new_buffer + + + 1 + 1 + 1 + + + + + need_data + + signal + LAST + need_data + + enough_data + + signal + LAST + enough_data + + seek_data + + signal + LAST + seek_data + NavigationCommand diff --git a/gstreamer-sharp/Makefile.am b/gstreamer-sharp/Makefile.am index 8aa164bc0a..78f111f295 100644 --- a/gstreamer-sharp/Makefile.am +++ b/gstreamer-sharp/Makefile.am @@ -79,6 +79,8 @@ csc_build_sources = $(subst /,\\,$(build_sources)) endif customs = \ + AppSink.custom \ + AppSrc.custom \ Bin.custom \ Buffer.custom \ Bus.custom \ diff --git a/gstreamer-sharp/gstreamer-api.raw b/gstreamer-sharp/gstreamer-api.raw index 887ebfa293..720caf7b1c 100644 --- a/gstreamer-sharp/gstreamer-api.raw +++ b/gstreamer-sharp/gstreamer-api.raw @@ -7261,6 +7261,301 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source/gstreamer-sharp-source.xml b/source/gstreamer-sharp-source.xml index 57b418b5c2..3779c24b3b 100644 --- a/source/gstreamer-sharp-source.xml +++ b/source/gstreamer-sharp-source.xml @@ -53,6 +53,11 @@ ../../gst-plugins-base/gst-libs/gst/cdda + + + ../../gst-plugins-base/gst-libs/gst/app + + ../../gst-plugins-base/gst-libs/gst/interfaces