[gstreamermm/devel-other-plugins: 2/2] Gst::GLBaseFilter, Gst::GLFilter: wrap some classes from gst-plugins-bad
- From: Marcin Kolny <mkolny src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gstreamermm/devel-other-plugins: 2/2] Gst::GLBaseFilter, Gst::GLFilter: wrap some classes from gst-plugins-bad
- Date: Wed, 8 Jul 2015 09:47:18 +0000 (UTC)
commit 435661503ee938450f2f08020081a2df8eeb4e71
Author: Marcin Kolny <marcin kolny flytronic pl>
Date: Wed Jul 8 11:40:58 2015 +0200
Gst::GLBaseFilter, Gst::GLFilter: wrap some classes from gst-plugins-bad
* .gitignore: add autogenerated files to ignore list.
* gstreamer/src/glbasefilter.{ccg|hg}: add glbasefilter wrapper.
* gstreamer/src/glfilter.{ccg|hg}: add glfilter wrapper.
* gstreamer/src/basesink.hg:
* gstreamer/src/basesrc.hg:
* gstreamer/src/basetransform.hg: remove in-place conversions (move to
convert_gst.m4 file).
* gstreamer/src/filelist.am: add glbasefilter and glfilter to a build.
* gstreamer/src/gst_vfuncs.defs: add virtual functions definitions
from glbasefilter and glfilter classes.
* tools/m4/convert_gst.m4: move Buffer conversion from .hg files.
.gitignore | 4 ++
gstreamer/src/basesink.hg | 1 -
gstreamer/src/basesrc.hg | 1 -
gstreamer/src/basetransform.hg | 1 -
gstreamer/src/filelist.am | 2 +
gstreamer/src/glbasefilter.ccg | 20 +++++++++++
gstreamer/src/glbasefilter.hg | 38 ++++++++++++++++++++++
gstreamer/src/glfilter.ccg | 20 +++++++++++
gstreamer/src/glfilter.hg | 69 ++++++++++++++++++++++++++++++++++++++++
gstreamer/src/gst_vfuncs.defs | 46 ++++++++++++++++++++++++++
tools/m4/convert_gst.m4 | 1 +
11 files changed, 200 insertions(+), 3 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 57542dc..d81afb0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -111,6 +111,10 @@ gstreamer/gstreamermm/format.cc
gstreamer/gstreamermm/format.h
gstreamer/gstreamermm/ghostpad.cc
gstreamer/gstreamermm/ghostpad.h
+gstreamer/gstreamermm/glbasefilter.cc
+gstreamer/gstreamermm/glbasefilter.h
+gstreamer/gstreamermm/glfilter.cc
+gstreamer/gstreamermm/glfilter.h
gstreamer/gstreamermm/gst_wrap_init.cc
gstreamer/gstreamermm/index.cc
gstreamer/gstreamermm/index.h
diff --git a/gstreamer/src/basesink.hg b/gstreamer/src/basesink.hg
index 8d9a8a7..febc85a 100644
--- a/gstreamer/src/basesink.hg
+++ b/gstreamer/src/basesink.hg
@@ -241,7 +241,6 @@ public:
*/
_WRAP_VFUNC(bool set_caps(const Glib::RefPtr<Gst::Caps>& caps), "set_caps", return_value true)
-#m4 _CONVERSION(`GstBuffer*', `const Glib::RefPtr<Gst::Buffer>&', `Glib::wrap($3, true)')
#m4 _CONVERSION(`GstClockTime*', `ClockTime&', `*($3)')
/** Called to get the start and end times for synchronising the passed buffer
* to the clock.
diff --git a/gstreamer/src/basesrc.hg b/gstreamer/src/basesrc.hg
index 10d9fc6..b5e5f63 100644
--- a/gstreamer/src/basesrc.hg
+++ b/gstreamer/src/basesrc.hg
@@ -199,7 +199,6 @@ public:
*/
_WRAP_VFUNC(bool start(), "start", return_value true)
-#m4 _CONVERSION(`GstBuffer*', `const Glib::RefPtr<Gst::Buffer>&', `Glib::wrap($3, true)')
#m4 _CONVERSION(`GstClockTime*', `ClockTime&', `*($3)')
/** Given a buffer, return the start and stop time when it should be pushed
* out. The base class will sync on the clock using these times.
diff --git a/gstreamer/src/basetransform.hg b/gstreamer/src/basetransform.hg
index f9dc859..7a31f7f 100644
--- a/gstreamer/src/basetransform.hg
+++ b/gstreamer/src/basetransform.hg
@@ -195,7 +195,6 @@ public:
_WRAP_VFUNC(bool set_caps(const Glib::RefPtr<Gst::Caps>& incaps, const Glib::RefPtr<Gst::Caps>& outcaps),
"set_caps", return_value true)
#m4 _CONVERSION(`GstEvent*', `const Glib::RefPtr<Gst::Event>&', `Glib::wrap($3, true)')
-#m4 _CONVERSION(`GstBuffer*', `const Glib::RefPtr<Gst::Buffer>&', `Glib::wrap($3, true)')
/** Required if the element does not operate in-place. Transforms one
* incoming buffer to one outgoing buffer. The function is allowed to change
diff --git a/gstreamer/src/filelist.am b/gstreamer/src/filelist.am
index 7706607..2558df0 100644
--- a/gstreamer/src/filelist.am
+++ b/gstreamer/src/filelist.am
@@ -116,6 +116,8 @@ files_hg = \
event.hg \
format.hg \
ghostpad.hg \
+ glbasefilter.hg \
+ glfilter.hg \
iterator.hg \
mapinfo.hg \
message.hg \
diff --git a/gstreamer/src/glbasefilter.ccg b/gstreamer/src/glbasefilter.ccg
new file mode 100644
index 0000000..96989b1
--- /dev/null
+++ b/gstreamer/src/glbasefilter.ccg
@@ -0,0 +1,20 @@
+/* gstreamermm - a C++ wrapper for gstreamer
+ *
+ * Copyright 2008-2015 The gstreamermm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+_PINCLUDE(gstreamermm/private/basetransform_p.h)
diff --git a/gstreamer/src/glbasefilter.hg b/gstreamer/src/glbasefilter.hg
new file mode 100644
index 0000000..68e5a23
--- /dev/null
+++ b/gstreamer/src/glbasefilter.hg
@@ -0,0 +1,38 @@
+/* gstreamermm - a C++ wrapper for gstreamer
+ *
+ * Copyright 2008-2015 The gstreamermm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+_DEFS(gstreamermm,gst)
+
+#include <gst/gl/gl.h>
+#include <gstreamermm/basetransform.h>
+
+namespace Gst
+{
+class GLBaseFilter
+: public BaseTransform
+{
+ _CLASS_GOBJECT(GLBaseFilter, GstGLBaseFilter, GST_GL_BASE_FILTER, BaseTransform, GstBaseTransform)
+
+public:
+
+ _WRAP_VFUNC(bool gl_start(), "gl_start")
+ _WRAP_VFUNC(void gl_stop(), "gl_stop")
+};
+
+}
diff --git a/gstreamer/src/glfilter.ccg b/gstreamer/src/glfilter.ccg
new file mode 100644
index 0000000..88d0dfa
--- /dev/null
+++ b/gstreamer/src/glfilter.ccg
@@ -0,0 +1,20 @@
+/* gstreamermm - a C++ wrapper for gstreamer
+ *
+ * Copyright 2008-2015 The gstreamermm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+_PINCLUDE(gstreamermm/private/glbasefilter_p.h)
diff --git a/gstreamer/src/glfilter.hg b/gstreamer/src/glfilter.hg
new file mode 100644
index 0000000..3f01bed
--- /dev/null
+++ b/gstreamer/src/glfilter.hg
@@ -0,0 +1,69 @@
+/* gstreamermm - a C++ wrapper for gstreamer
+ *
+ * Copyright 2008-2015 The gstreamermm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+_DEFS(gstreamermm,gst)
+
+#include <gst/gl/gl.h>
+#include <gstreamermm/glbasefilter.h>
+#include <gstreamermm/videoinfo.h>
+#include <gstreamermm/buffer.h>
+
+namespace Gst
+{
+class GLFilter
+: public GLBaseFilter
+{
+ _CLASS_GOBJECT(GLFilter, GstGLFilter, GST_GL_FILTER, GLBaseFilter, GstGLBaseFilter)
+
+public:
+ _WRAP_VFUNC(bool set_caps(const Glib::RefPtr<Gst::Caps>& incaps, const Glib::RefPtr<Gst::Caps>& outcaps),
"set_caps")
+ _WRAP_VFUNC(bool filter(const Glib::RefPtr<Gst::Buffer>& inbuf, const Glib::RefPtr<Gst::Buffer>& outbuf),
"filter")
+ _WRAP_VFUNC(bool filter_texture(guint in_tex, guint out_tex), "filter_texture")
+ _WRAP_VFUNC(bool init_fbo(), "init_fbo")
+
+ _MEMBER_GET(in_info, in_info, VideoInfo, GstVideoInfo)
+ _MEMBER_SET(in_info, in_info, VideoInfo, GstVideoInfo)
+
+ _MEMBER_GET(out_caps, out_caps, Glib::RefPtr<Gst::Caps>, GstCaps*)
+ _MEMBER_SET(out_caps, out_caps, Glib::RefPtr<Gst::Caps>, GstCaps*)
+
+ _MEMBER_GET(fbo, fbo, GLuint, GLuint)
+ _MEMBER_SET(fbo, fbo, GLuint, GLuint)
+
+ _MEMBER_GET(depthbuffer, depthbuffer, GLuint, GLuint)
+ _MEMBER_SET(depthbuffer, depthbuffer, GLuint, GLuint)
+
+ _MEMBER_GET(vao, vao, GLuint, GLuint)
+ _MEMBER_SET(vao, vao, GLuint, GLuint)
+
+ _MEMBER_GET(vbo_indices, vbo_indices, GLuint, GLuint)
+ _MEMBER_SET(vbo_indices, vbo_indices, GLuint, GLuint)
+
+ _MEMBER_GET(vertex_buffer, vertex_buffer, GLuint, GLuint)
+ _MEMBER_SET(vertex_buffer, vertex_buffer, GLuint, GLuint)
+
+
+ _MEMBER_GET(draw_attr_position_loc, draw_attr_position_loc, GLint, GLint)
+ _MEMBER_SET(draw_attr_position_loc, draw_attr_position_loc, GLint, GLint)
+
+ _MEMBER_GET(draw_attr_texture_loc, draw_attr_texture_loc, GLint, GLint)
+ _MEMBER_SET(draw_attr_texture_loc, draw_attr_texture_loc, GLint, GLint)
+};
+
+}
diff --git a/gstreamer/src/gst_vfuncs.defs b/gstreamer/src/gst_vfuncs.defs
index d6ba88d..355bad8 100644
--- a/gstreamer/src/gst_vfuncs.defs
+++ b/gstreamer/src/gst_vfuncs.defs
@@ -757,6 +757,52 @@
)
)
+; GstGLBaseFilter
+
+(define-vfunc gl_start
+ (of-object "GstGLBaseFilter")
+ (return-type "gboolean")
+)
+
+(define-vfunc gl_stop
+ (of-object "GstGLBaseFilter")
+ (return-type "void")
+)
+
+; GstGLFilter
+
+(define-vfunc set_caps
+ (of-object "GstGLFilter")
+ (return-type "gboolean")
+ (parameters
+ '("GstCaps*" "incaps")
+ '("GstCaps*" "outcaps")
+ )
+)
+
+(define-vfunc filter
+ (of-object "GstGLFilter")
+ (return-type "gboolean")
+ (parameters
+ '("GstBuffer*" "inbuf")
+ '("GstBuffer*" "outbuf")
+ )
+)
+
+(define-vfunc filter_texture
+ (of-object "GstGLFilter")
+ (return-type "gboolean")
+ (parameters
+ '("guint" "in_tex")
+ '("guint" "out_tex")
+ )
+)
+
+(define-vfunc init_fbo
+ (of-object "GstGLFilter")
+ (return-type "gboolean")
+)
+
; GstImplementsInterface
(define-vfunc supported
diff --git a/tools/m4/convert_gst.m4 b/tools/m4/convert_gst.m4
index 0679869..f5d9843 100644
--- a/tools/m4/convert_gst.m4
+++ b/tools/m4/convert_gst.m4
@@ -89,6 +89,7 @@ _CONVERSION(`const Glib::RefPtr<Gst::Buffer>&',`GstBuffer*', `Glib::unwrap($3)')
_CONVERSION(`const Glib::RefPtr<const Gst::Buffer>&',`GstBuffer*',
`const_cast<GstBuffer*>(Glib::unwrap($3))')
_CONVERSION(`const Glib::RefPtr<Gst::Buffer>&',`const GstBuffer*', `Glib::unwrap($3)')
_CONVERSION(`Glib::RefPtr<Gst::Buffer>',`GstBuffer*', `Glib::unwrap($3)')
+_CONVERSION(`GstBuffer*', `const Glib::RefPtr<Gst::Buffer>&', `Glib::wrap($3, true)')
dnl BufferList
_CONVERSION(`Glib::RefPtr<Gst::BufferList>',`GstBufferList*', `Glib::unwrap($3)')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]