Commit 09116bf1 authored by Julien Isorce's avatar Julien Isorce

egl/eglglessink: remove since EGLImage and iOS support have been added in glimagesink

https://bugzilla.gnome.org/show_bug.cgi?id=703343
parent d93ed2b8
This diff is collapsed.
......@@ -72,7 +72,6 @@ EXTRA_HFILES = \
$(top_srcdir)/ext/dc1394/gstdc1394.h \
$(top_srcdir)/ext/directfb/dfbvideosink.h \
$(top_srcdir)/ext/dts/gstdtsdec.h \
$(top_srcdir)/ext/eglgles/gsteglglessink.h \
$(top_srcdir)/ext/faac/gstfaac.h \
$(top_srcdir)/ext/faad/gstfaad.h \
$(top_srcdir)/ext/kate/gstkateenc.h \
......
......@@ -76,12 +76,6 @@ else
DTS_DIR=
endif
if USE_EGLGLES
EGLGLES_DIR=eglgles
else
EGLGLES_DIR=
endif
if USE_GL
GL_DIR=gl
else
......@@ -416,7 +410,6 @@ SUBDIRS=\
$(DAALA_DIR) \
$(DTS_DIR) \
$(RESINDVD_DIR) \
$(EGLGLES_DIR) \
$(GL_DIR) \
$(FAAC_DIR) \
$(FAAD_DIR) \
......@@ -492,7 +485,6 @@ DIST_SUBDIRS = \
lv2 \
daala \
dts \
eglgles \
gl \
modplug \
mimic \
......
LOCAL_PATH := $(call my-dir)
# -------------------------------------
# gsteglglessink library
#
include $(CLEAR_VARS)
LOCAL_ARM_MODE := arm
gsteglglessink_FILES := gsteglglessink.c
LOCAL_SRC_FILES := $(gsteglglessink_FILES)
LOCAL_C_INCLUDES = $(LOCAL_PATH) \
$(LOCAL_PATH)/include
ifneq ($(NDK_BUILD), true)
LOCAL_C_INCLUDES += $(TOP)/frameworks/base
else
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../../android_headers
endif
LOCAL_CFLAGS += -DHAVE_CONFIG_H
LOCAL_CFLAGS += -Wall -Wdeclaration-after-statement -g -O2
LOCAL_CFLAGS += -DANDROID_USE_GSTREAMER \
$(shell $(PKG_CONFIG) gstreamer-plugins-bad-0.10 --cflags) \
$(shell $(PKG_CONFIG) gstreamer-audio-0.10 --cflags)
ifeq ($(USE_AUDIO_PURE_CODEC),true)
LOCAL_CFLAGS += -DAUDIO_PURE_CODEC
endif
LOCAL_SHARED_LIBRARIES += libdl
LOCAL_SHARED_LIBRARIES += \
libgstreamer-0.10 \
libgstbase-0.10 \
libglib-2.0 \
libgthread-2.0 \
libgmodule-2.0 \
libgobject-2.0 \
libgstvideo-0.10 \
libgstinterfaces-0.10
ifneq ($(NDK_BUILD), true)
LOCAL_LDFLAGS := -L$(SYSROOT)/usr/lib -llog
else
LOCAL_LDFLAGS := -L$(SYSROOT)/usr/lib -llog -lmedia -lutils
endif
LOCAL_LDFLAGS += -lEGL -lGLESv2
LOCAL_SHARED_LIBRARIES += \
libutils \
libcutils \
libui \
libhardware \
libandroid_runtime \
libmedia
LOCAL_MODULE:= libgsteglglessink
LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/gstreamer-0.10
#
# define LOCAL_PRELINK_MODULE to false to not use pre-link map
#
LOCAL_PRELINK_MODULE := false
LOCAL_MODULE_TAGS := eng debug
include $(BUILD_SHARED_LIBRARY)
#endif # USE_HARDWARE_MM == true
plugin_LTLIBRARIES = libgsteglglessink.la
if HAVE_IOS
DISTRO_SRC = gstegladaptation_eagl.m
else
DISTRO_SRC = gstegladaptation_egl.c video_platform_wrapper.c
GST_EGL_LIBS = $(top_builddir)/gst-libs/gst/egl/libgstegl-$(GST_API_VERSION).la
endif
libgsteglglessink_la_SOURCES = gsteglglessink.c gstegladaptation.c $(DISTRO_SRC)
libgsteglglessink_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) \
$(GST_PLUGINS_BASE_CFLAGS) \
$(GST_BASE_CFLAGS) \
$(GST_CFLAGS) \
$(EGL_CFLAGS) \
$(EGLGLES_CFLAGS)
libgsteglglessink_la_OBJCFLAGS = $(GST_PLUGINS_BAD_OBJCFLAGS) \
$(GST_PLUGINS_BASE_OBJCFLAGS) \
$(GST_BASE_OBJCFLAGS) \
$(GST_OBJCFLAGS) \
$(EGLGLES_OBJCFLAGS) \
-fobjc-abi-version=2 -fobjc-legacy-dispatch
libgsteglglessink_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS) \
$(GST_PLUGINS_BASE_LIBS) $(EGL_LIBS) $(EGLGLES_LIBS) \
-lgstvideo-$(GST_API_VERSION) $(GST_EGL_LIBS)
if HAVE_IOS
libgsteglglessink_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) -Wl,-framework,OpenGLES -Wl,-framework,QuartzCore -Wl,-framework,UIKit -Wl,-framework,CoreGraphics -Wl,-framework,CoreFoundation -Wl,-framework,Foundation -W
else
libgsteglglessink_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
endif
libgsteglglessink_la_LIBTOOLFLAGS = --tag=CC $(GST_PLUGIN_LIBTOOLFLAGS)
noinst_HEADERS = gsteglglessink.h gstegladaptation.h video_platform_wrapper.h
EXTRA_DIST = gsteglglessink.c gstegladaptation.c gstegladaptation_egl.c video_platform_wrapper.c gstegladaptation_eagl.m $(noinst_HEADERS)
- Correctly handle upstream surface region size changes. Test and debug
set_render_rect
- Make sure we are considering DAR on all scaling/rendering cases
- Test and debug caps renegotiation
- Drop android specifics like the default window h/w
- Move EGL/GLES context to it's own struct. Proly move GLSL stuff to it's
own header too
- Optimize shading routines if possible.
- Either finish implementing or drop fast rendering path logic
- Implement buffer pool
- Finish code documentation
This diff is collapsed.
/*
* GStreamer EGL/GLES Sink Adaptation
* Copyright (C) 2012-2013 Collabora Ltd.
* @author: Reynaldo H. Verdejo Pinochet <reynaldo@collabora.com>
* @author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
* @author: Thiago Santos <thiago.sousa.santos@collabora.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
* Alternatively, the contents of this file may be used under the
* GNU Lesser General Public License Version 2.1 (the "LGPL"), in
* which case the following provisions apply instead of the ones
* mentioned above:
*
* 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_EGL_ADAPTATION_H__
#define __GST_EGL_ADAPTATION_H__
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <gst/gst.h>
#include <gst/video/gstvideopool.h>
#if defined (USE_EGL_RPI) && defined(__GNUC__)
#ifndef __VCCOREVER__
#define __VCCOREVER__ 0x04000000
#endif
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wredundant-decls"
#pragma GCC optimize ("gnu89-inline")
#endif
#define EGL_EGLEXT_PROTOTYPES
#define GL_GLEXT_PROTOTYPES
#ifdef HAVE_IOS
#include <OpenGLES/ES2/gl.h>
#else
#include <gst/egl/egl.h>
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#endif
#if defined (USE_EGL_RPI) && defined(__GNUC__)
#pragma GCC reset_options
#pragma GCC diagnostic pop
#endif
G_BEGIN_DECLS
typedef struct _GstEglAdaptationContext GstEglAdaptationContext;
typedef struct _GstEglGlesImageFmt GstEglGlesImageFmt;
#ifdef HAVE_IOS
typedef struct _GstEaglContext GstEaglContext;
#else
typedef struct _GstEglGlesRenderContext GstEglGlesRenderContext;
#endif
typedef struct _coord5
{
float x;
float y;
float z;
float a; /* texpos x */
float b; /* texpos y */
} coord5;
typedef struct
{
GLuint texture;
} GstEGLGLESImageData;
/*
* GstEglAdaptationContext:
* @have_vbo: Set if the GLES VBO setup has been performed
* @have_texture: Set if the GLES texture setup has been performed
* @have_surface: Set if the EGL surface setup has been performed
*
* The #GstEglAdaptationContext data structure.
*/
struct _GstEglAdaptationContext
{
GstElement *element;
#ifdef HAVE_IOS
GstEaglContext *eaglctx;
void * window, *used_window;
#else
GstEglGlesRenderContext *eglglesctx;
GstEGLDisplay *display, *set_display;
EGLNativeWindowType window, used_window;
#endif
GLuint fragshader[2]; /* frame, border */
GLuint vertshader[2]; /* frame, border */
GLuint glslprogram[2]; /* frame, border */
GLuint texture[3]; /* RGB/Y, U/UV, V */
/* shader vars */
GLuint position_loc[2]; /* frame, border */
GLuint texpos_loc[1]; /* frame */
GLuint tex_scale_loc[1][3]; /* [frame] RGB/Y, U/UV, V */
GLuint tex_loc[1][3]; /* [frame] RGB/Y, U/UV, V */
coord5 position_array[16]; /* 4 x Frame x-normal,y-normal, 4x Frame x-normal,y-flip, 4 x Border1, 4 x Border2 */
unsigned short index_array[4];
unsigned int position_buffer, index_buffer;
gint n_textures;
gint surface_width;
gint surface_height;
gint pixel_aspect_ratio_n;
gint pixel_aspect_ratio_d;
gboolean have_vbo;
gboolean have_texture;
gboolean have_surface;
gboolean buffer_preserved;
};
GST_DEBUG_CATEGORY_EXTERN (egladaption_debug);
void gst_egl_adaption_init (void);
GstEglAdaptationContext * gst_egl_adaptation_context_new (GstElement * element);
void gst_egl_adaptation_context_free (GstEglAdaptationContext * ctx);
void gst_egl_adaptation_init (GstEglAdaptationContext * ctx);
void gst_egl_adaptation_deinit (GstEglAdaptationContext * ctx);
gboolean gst_egl_adaptation_create_surface (GstEglAdaptationContext * ctx);
void gst_egl_adaptation_query_buffer_preserved (GstEglAdaptationContext * ctx);
void gst_egl_adaptation_query_par (GstEglAdaptationContext * ctx);
void gst_egl_adaptation_destroy_surface (GstEglAdaptationContext * ctx);
void gst_egl_adaptation_destroy_context (GstEglAdaptationContext * ctx);
gboolean
gst_egl_adaptation_create_egl_context (GstEglAdaptationContext * ctx);
#ifndef HAVE_IOS
EGLContext gst_egl_adaptation_context_get_egl_context (GstEglAdaptationContext * ctx);
#endif
/* platform window */
gboolean gst_egl_adaptation_create_native_window (GstEglAdaptationContext
* ctx, gint width, gint height, gpointer * own_window_data);
void gst_egl_adaptation_destroy_native_window (GstEglAdaptationContext * ctx, gpointer * own_window_data);
GstCaps *gst_egl_adaptation_fill_supported_fbuffer_configs (GstEglAdaptationContext * ctx);
gboolean gst_egl_adaptation_init_display (GstEglAdaptationContext * ctx);
gboolean gst_egl_adaptation_choose_config (GstEglAdaptationContext * ctx);
gboolean gst_egl_adaptation_init_surface (GstEglAdaptationContext * ctx, GstVideoFormat format);
void gst_egl_adaptation_init_exts (GstEglAdaptationContext * ctx);
gboolean gst_egl_adaptation_update_surface_dimensions (GstEglAdaptationContext * ctx);
gboolean _gst_egl_choose_config (GstEglAdaptationContext * ctx, gboolean try_only, gint * num_configs);
gboolean got_gl_error (const char *wtf);
gboolean got_egl_error (const char *wtf);
void gst_egl_adaptation_set_window (GstEglAdaptationContext * ctx, guintptr window);
gboolean gst_egl_adaptation_context_make_current (GstEglAdaptationContext * ctx, gboolean bind);
void gst_egl_adaptation_cleanup (GstEglAdaptationContext * ctx);
void gst_egl_adaptation_bind_API (GstEglAdaptationContext * ctx);
gboolean gst_egl_adaptation_context_swap_buffers (GstEglAdaptationContext * ctx);
#ifndef HAVE_IOS
/* TODO: The goal is to move this function to gstegl lib (or
* splitted between gstegl lib and gstgl lib) in order to be used in
* webkitVideoSink
* So it has to be independent of GstEglAdaptationContext */
GstBuffer *
gst_egl_image_allocator_alloc_eglimage (GstAllocator * allocator,
GstEGLDisplay * display, EGLContext eglcontext, GstVideoFormat format,
gint width, gint height);
#endif
G_END_DECLS
#endif /* __GST_EGL_ADAPTATION_H__ */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
if HAVE_EGL
EGL_DIR = egl
endif
if USE_OPENGL
GL_DIR = gl
......@@ -10,8 +7,8 @@ GL_DIR = gl
endif
SUBDIRS = interfaces basecamerabinsrc codecparsers \
insertbin uridownloader mpegts $(EGL_DIR) $(GL_DIR)
insertbin uridownloader mpegts $(GL_DIR)
noinst_HEADERS = gst-i18n-plugin.h gettext.h glib-compat-private.h
DIST_SUBDIRS = interfaces egl gl basecamerabinsrc codecparsers \
DIST_SUBDIRS = interfaces gl basecamerabinsrc codecparsers \
insertbin uridownloader mpegts
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -12,11 +12,6 @@ pcverfiles_uninstalled = \
gstreamer-insertbin-@GST_API_VERSION@-uninstalled.pc \
gstreamer-mpegts-@GST_API_VERSION@-uninstalled.pc
if HAVE_EGL
pcverfiles += gstreamer-egl-@GST_API_VERSION@.pc
pcverfiles_uninstalled += gstreamer-egl-@GST_API_VERSION@-uninstalled.pc
endif
if HAVE_GST_GL
pcverfiles += gstreamer-gl-@GST_API_VERSION@.pc
pcverfiles_uninstalled += gstreamer-gl-@GST_API_VERSION@-uninstalled.pc
......@@ -43,7 +38,6 @@ pcinfiles = \
gstreamer-codecparsers.pc.in gstreamer-codecparsers-uninstalled.pc.in \
gstreamer-gl.pc.in gstreamer-gl-uninstalled.pc.in \
gstreamer-insertbin.pc.in gstreamer-insertbin-uninstalled.pc.in \
gstreamer-egl.pc.in gstreamer-egl-uninstalled.pc.in \
gstreamer-mpegts.pc.in gstreamer-mpegts-uninstalled.pc.in
DISTCLEANFILES = $(pcinfiles:.in=)
......
......@@ -205,9 +205,6 @@
/* Define to enable DVB Source (used by dvb). */
#undef HAVE_DVB
/* Define to enable eglgles sink (used by eglgles). */
#undef HAVE_EGLGLES
/* Define to enable building of experimental plug-ins. */
#undef HAVE_EXPERIMENTAL
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment