mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-01 21:18:52 +00:00
[069/906] add gstreamer license
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@435 93df14bb-0f41-7a43-8087-d3e2a2f0e464
This commit is contained in:
parent
9c306c1c40
commit
76fa1292f8
11 changed files with 241 additions and 36 deletions
|
@ -1,3 +1,23 @@
|
|||
/*
|
||||
* GStreamer
|
||||
* Copyright (C) 2008 Julien Isorce <julien.isorce@gmail.com>
|
||||
*
|
||||
* 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
|
||||
|
|
|
@ -1,3 +1,23 @@
|
|||
/*
|
||||
* GStreamer
|
||||
* Copyright (C) 2008 Julien Isorce <julien.isorce@gmail.com>
|
||||
*
|
||||
* 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_
|
||||
|
||||
|
|
|
@ -1,3 +1,23 @@
|
|||
/*
|
||||
* GStreamer
|
||||
* Copyright (C) 2008 Julien Isorce <julien.isorce@gmail.com>
|
||||
*
|
||||
* 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
|
||||
|
||||
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
|
||||
|
||||
display->GLSLProgram_UYVY = gst_gl_display_loadGLSLprogram (program);
|
||||
|
||||
display->GLSLProgram_I420_YV12 = gst_gl_display_loadGLSLprogram (display->textFProgram_I420_YV12);
|
||||
|
@ -1045,8 +1057,6 @@ 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);
|
||||
g_cond_wait (display->cond_destroy, display->mutex);
|
||||
|
|
|
@ -1,3 +1,23 @@
|
|||
/*
|
||||
* GStreamer
|
||||
* Copyright (C) 2008 Julien Isorce <julien.isorce@gmail.com>
|
||||
*
|
||||
* 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__
|
||||
|
||||
|
|
|
@ -1,3 +1,23 @@
|
|||
/*
|
||||
* GStreamer
|
||||
* Copyright (C) 2008 Julien Isorce <julien.isorce@gmail.com>
|
||||
*
|
||||
* 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 <julien.isorce@gmail.com>");
|
||||
|
||||
/* Source pad definition */
|
||||
static GstStaticPadTemplate gst_gl_graphicmaker_src_pad_template =
|
||||
|
|
|
@ -1,3 +1,23 @@
|
|||
/*
|
||||
* GStreamer
|
||||
* Copyright (C) 2008 Julien Isorce <julien.isorce@gmail.com>
|
||||
*
|
||||
* 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_
|
||||
|
||||
|
|
|
@ -1,3 +1,23 @@
|
|||
/*
|
||||
* GStreamer
|
||||
* Copyright (C) 2008 Julien Isorce <julien.isorce@gmail.com>
|
||||
*
|
||||
* 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,7 +59,7 @@ static void gst_glimage_sink_implements_init (GstImplementsInterfaceClass *
|
|||
klass);
|
||||
|
||||
static const GstElementDetails gst_glimage_sink_details =
|
||||
GST_ELEMENT_DETAILS ("OpenGL video sink",
|
||||
GST_ELEMENT_DETAILS ("OpenGL video sink",
|
||||
"Sink/Video",
|
||||
"A videosink based on OpenGL",
|
||||
"Julien Isorce <julien.isorce@gmail.com>");
|
||||
|
@ -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
|
||||
|
|
|
@ -1,3 +1,23 @@
|
|||
/*
|
||||
* GStreamer
|
||||
* Copyright (C) 2008 Julien Isorce <julien.isorce@gmail.com>
|
||||
*
|
||||
* 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_
|
||||
|
||||
|
|
|
@ -1,3 +1,23 @@
|
|||
/*
|
||||
* GStreamer
|
||||
* Copyright (C) 2008 Julien Isorce <julien.isorce@gmail.com>
|
||||
*
|
||||
* 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",
|
||||
static const GstElementDetails element_details =
|
||||
GST_ELEMENT_DETAILS ("OpenGL video maker",
|
||||
"Filter/Effect",
|
||||
"FIXME example filter",
|
||||
"FIXME <fixme@fixme.com>");
|
||||
"A from GL to video flow filter",
|
||||
"Julien Isorce <julien.isorce@gmail.com>");
|
||||
|
||||
static GstStaticPadTemplate gst_gl_videomaker_src_pad_template =
|
||||
GST_STATIC_PAD_TEMPLATE ("src",
|
||||
|
|
|
@ -1,3 +1,23 @@
|
|||
/*
|
||||
* GStreamer
|
||||
* Copyright (C) 2008 Julien Isorce <julien.isorce@gmail.com>
|
||||
*
|
||||
* 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_
|
||||
|
||||
|
|
|
@ -1,11 +1,29 @@
|
|||
/*
|
||||
* GStreamer
|
||||
* Copyright (C) 2008 Julien Isorce <julien.isorce@gmail.com>
|
||||
*
|
||||
* 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
|
||||
|
|
Loading…
Reference in a new issue