From 76fa1292f83a0cc328c5e0d32046612ef414dcaf Mon Sep 17 00:00:00 2001 From: Julien Isorce Date: Mon, 19 May 2008 16:57:39 +0000 Subject: [PATCH] [069/906] add gstreamer license git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@435 93df14bb-0f41-7a43-8087-d3e2a2f0e464 --- gst-libs/gst/gl/gstglbuffer.c | 20 ++++++++++++++++ gst-libs/gst/gl/gstglbuffer.h | 20 ++++++++++++++++ gst-libs/gst/gl/gstgldisplay.c | 42 +++++++++++++++++++++------------- gst-libs/gst/gl/gstgldisplay.h | 20 ++++++++++++++++ gst/gl/gstglgraphicmaker.c | 32 ++++++++++++++++++++------ gst/gl/gstglgraphicmaker.h | 20 ++++++++++++++++ gst/gl/gstglimagesink.c | 32 ++++++++++++++++++++------ gst/gl/gstglimagesink.h | 20 ++++++++++++++++ gst/gl/gstglvideomaker.c | 29 +++++++++++++++++++---- gst/gl/gstglvideomaker.h | 20 ++++++++++++++++ gst/gl/gstopengl.c | 22 ++++++++++++++++-- 11 files changed, 241 insertions(+), 36 deletions(-) diff --git a/gst-libs/gst/gl/gstglbuffer.c b/gst-libs/gst/gl/gstglbuffer.c index aaa39677e6..40eb4ddef0 100644 --- a/gst-libs/gst/gl/gstglbuffer.c +++ b/gst-libs/gst/gl/gstglbuffer.c @@ -1,3 +1,23 @@ +/* + * GStreamer + * Copyright (C) 2008 Julien Isorce + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + #ifdef HAVE_CONFIG_H #include "config.h" #endif diff --git a/gst-libs/gst/gl/gstglbuffer.h b/gst-libs/gst/gl/gstglbuffer.h index cfb3a4fd99..cf7aaaac8a 100644 --- a/gst-libs/gst/gl/gstglbuffer.h +++ b/gst-libs/gst/gl/gstglbuffer.h @@ -1,3 +1,23 @@ +/* + * GStreamer + * Copyright (C) 2008 Julien Isorce + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + #ifndef _GST_GL_BUFFER_H_ #define _GST_GL_BUFFER_H_ diff --git a/gst-libs/gst/gl/gstgldisplay.c b/gst-libs/gst/gl/gstgldisplay.c index 5b9cc9e22a..1f2604cad5 100644 --- a/gst-libs/gst/gl/gstgldisplay.c +++ b/gst-libs/gst/gl/gstgldisplay.c @@ -1,3 +1,23 @@ +/* + * GStreamer + * Copyright (C) 2008 Julien Isorce + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -379,11 +399,8 @@ gst_gl_display_glutCreateWindow (GstGLDisplay *display) glutInitWindowSize(display->glcontext_width, display->glcontext_height); //create opengl context -#if WIN32 - sprintf_s(buffer, 5, "%d", glutWinId); -#else sprintf(buffer, "%d", glutWinId); -#endif + display->title = g_string_append (display->title, buffer); glutWinId = glutCreateWindow (display->title->str, display->winId); @@ -563,18 +580,13 @@ gst_gl_display_glutCreateWindow (GstGLDisplay *display) g_print ("Context %d, ARB_fragment_program supported: yes\n", glutWinId); //from video to texture -#if WIN32 - sprintf_s (program, 2048, display->textFProgram_YUY2_UYVY, 'r', 'g', 'a'); -#else - sprintf (program, display->textFProgram_YUY2_UYVY, 'r', 'g', 'a'); -#endif + + sprintf (program, display->textFProgram_YUY2_UYVY, 'r', 'g', 'a'); + display->GLSLProgram_YUY2 = gst_gl_display_loadGLSLprogram (program); -#if WIN32 - sprintf_s (program, 2048, display->textFProgram_YUY2_UYVY, 'a', 'b', 'r'); -#else - sprintf (program, display->textFProgram_YUY2_UYVY, 'a', 'b', 'r'); -#endif + sprintf (program, display->textFProgram_YUY2_UYVY, 'a', 'b', 'r'); + display->GLSLProgram_UYVY = gst_gl_display_loadGLSLprogram (program); display->GLSLProgram_I420_YV12 = gst_gl_display_loadGLSLprogram (display->textFProgram_I420_YV12); @@ -1044,8 +1056,6 @@ void gst_gl_display_set_windowId (GstGLDisplay* display, gulong winId) { static gint glheight = 0; - - //g_print ("Display::gst_gl_display_set_windowId\n"); gst_gl_display_lock (display); gst_gl_display_postMessage (GST_GL_DISPLAY_ACTION_DESTROY, display); diff --git a/gst-libs/gst/gl/gstgldisplay.h b/gst-libs/gst/gl/gstgldisplay.h index abb4bcc63a..9130d300a4 100644 --- a/gst-libs/gst/gl/gstgldisplay.h +++ b/gst-libs/gst/gl/gstgldisplay.h @@ -1,3 +1,23 @@ +/* + * GStreamer + * Copyright (C) 2008 Julien Isorce + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + #ifndef __GST_GL_H__ #define __GST_GL_H__ diff --git a/gst/gl/gstglgraphicmaker.c b/gst/gl/gstglgraphicmaker.c index 899096d453..4b4015e305 100644 --- a/gst/gl/gstglgraphicmaker.c +++ b/gst/gl/gstglgraphicmaker.c @@ -1,3 +1,23 @@ +/* + * GStreamer + * Copyright (C) 2008 Julien Isorce + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -8,13 +28,11 @@ #define GST_CAT_DEFAULT gst_gl_graphicmaker_debug GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT); -/* inpect details */ -static const GstElementDetails element_details = { - "glgraphicmaker", - "Transform filter", - "output an opengl scene flux", - "Jhonny Bravo and Kelly" - }; +static const GstElementDetails element_details = + GST_ELEMENT_DETAILS ("OpenGL graphic maker", + "Filter/Effect", + "A from video to GL flow filter", + "Julien Isorce "); /* Source pad definition */ static GstStaticPadTemplate gst_gl_graphicmaker_src_pad_template = diff --git a/gst/gl/gstglgraphicmaker.h b/gst/gl/gstglgraphicmaker.h index 7c332a6ba5..7320d01eee 100644 --- a/gst/gl/gstglgraphicmaker.h +++ b/gst/gl/gstglgraphicmaker.h @@ -1,3 +1,23 @@ +/* + * GStreamer + * Copyright (C) 2008 Julien Isorce + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + #ifndef _GST_GLGRAPHICMAKER_H_ #define _GST_GLGRAPHICMAKER_H_ diff --git a/gst/gl/gstglimagesink.c b/gst/gl/gstglimagesink.c index 4a1e8418a2..6d2a4e3839 100644 --- a/gst/gl/gstglimagesink.c +++ b/gst/gl/gstglimagesink.c @@ -1,3 +1,23 @@ +/* + * GStreamer + * Copyright (C) 2008 Julien Isorce + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -22,7 +42,6 @@ gst_glimage_sink_change_state (GstElement * element, GstStateChange transition); static void gst_glimage_sink_get_times (GstBaseSink * bsink, GstBuffer * buf, GstClockTime * start, GstClockTime * end); -//static GstCaps *gst_glimage_sink_get_caps (GstBaseSink * bsink); static gboolean gst_glimage_sink_set_caps (GstBaseSink * bsink, GstCaps * caps); static GstFlowReturn gst_glimage_sink_render (GstBaseSink * bsink, GstBuffer * buf); @@ -40,10 +59,10 @@ static void gst_glimage_sink_implements_init (GstImplementsInterfaceClass * klass); static const GstElementDetails gst_glimage_sink_details = -GST_ELEMENT_DETAILS ("OpenGL video sink", - "Sink/Video", - "A videosink based on OpenGL", - "Julien Isorce "); + GST_ELEMENT_DETAILS ("OpenGL video sink", + "Sink/Video", + "A videosink based on OpenGL", + "Julien Isorce "); static GstStaticPadTemplate gst_glimage_sink_template = GST_STATIC_PAD_TEMPLATE ("sink", @@ -52,7 +71,7 @@ static GstStaticPadTemplate gst_glimage_sink_template = GST_STATIC_CAPS (GST_GL_VIDEO_CAPS ";" GST_VIDEO_CAPS_RGBx ";" GST_VIDEO_CAPS_BGRx ";" GST_VIDEO_CAPS_xRGB ";" GST_VIDEO_CAPS_xBGR ";" - GST_VIDEO_CAPS_YUV ("{ YUY2, UYVY, AYUV, YV12, I420 }")) + GST_VIDEO_CAPS_YUV ("{ I420, YV12, YUY2, UYVY, AYUV }")) ); enum @@ -483,7 +502,6 @@ gst_glimage_sink_set_xwindow_id (GstXOverlay* overlay, gulong window_id) //close internal window glimage_sink->window_id = window_id; - //gst_gl_display_set_windowId (glimage_sink->display, glimage_sink->window_id); } //Handle the case where window_id is 0 and we want the sink to diff --git a/gst/gl/gstglimagesink.h b/gst/gl/gstglimagesink.h index 0d393b9fd6..d151e48858 100644 --- a/gst/gl/gstglimagesink.h +++ b/gst/gl/gstglimagesink.h @@ -1,3 +1,23 @@ +/* + * GStreamer + * Copyright (C) 2008 Julien Isorce + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + #ifndef _GLIMAGESINK_H_ #define _GLIMAGESINK_H_ diff --git a/gst/gl/gstglvideomaker.c b/gst/gl/gstglvideomaker.c index 6acc2932f7..823edf221d 100644 --- a/gst/gl/gstglvideomaker.c +++ b/gst/gl/gstglvideomaker.c @@ -1,3 +1,23 @@ +/* + * GStreamer + * Copyright (C) 2008 Julien Isorce + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -7,10 +27,11 @@ #define GST_CAT_DEFAULT gst_gl_videomaker_debug GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT); -static const GstElementDetails element_details = GST_ELEMENT_DETAILS ("FIXME", - "Filter/Effect", - "FIXME example filter", - "FIXME "); +static const GstElementDetails element_details = + GST_ELEMENT_DETAILS ("OpenGL video maker", + "Filter/Effect", + "A from GL to video flow filter", + "Julien Isorce "); static GstStaticPadTemplate gst_gl_videomaker_src_pad_template = GST_STATIC_PAD_TEMPLATE ("src", diff --git a/gst/gl/gstglvideomaker.h b/gst/gl/gstglvideomaker.h index b9a6869f95..7457e22504 100644 --- a/gst/gl/gstglvideomaker.h +++ b/gst/gl/gstglvideomaker.h @@ -1,3 +1,23 @@ +/* + * GStreamer + * Copyright (C) 2008 Julien Isorce + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + #ifndef _GST_GLVIDEOMAKER_H_ #define _GST_GLVIDEOMAKER_H_ diff --git a/gst/gl/gstopengl.c b/gst/gl/gstopengl.c index 21f446108e..f19fb53650 100644 --- a/gst/gl/gstopengl.c +++ b/gst/gl/gstopengl.c @@ -1,11 +1,29 @@ +/* + * GStreamer + * Copyright (C) 2008 Julien Isorce + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + #ifdef HAVE_CONFIG_H #include "config.h" #endif -/* include gl filters headers */ #include "gstglgraphicmaker.h" #include "gstglvideomaker.h" - #include "gstglimagesink.h" #define GST_CAT_DEFAULT gst_gl_gstgl_debug