summaryrefslogtreecommitdiffstats
path: root/recipes-multimedia
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-multimedia')
-rw-r--r--recipes-multimedia/alsa/fsl-alsa-plugins_1.0.25.bb27
-rw-r--r--recipes-multimedia/gstreamer/gst-fsl-plugin.inc66
-rw-r--r--recipes-multimedia/gstreamer/gst-fsl-plugin/build-Fix-out-of-tree-build.patch617
-rw-r--r--recipes-multimedia/gstreamer/gst-fsl-plugin_3.0.11.bb11
-rw-r--r--recipes-multimedia/gstreamer/gst-plugins-base/gstplaybin2-rawvideo-support.patch28
-rw-r--r--recipes-multimedia/gstreamer/gst-plugins-base_%.bbappend11
-rw-r--r--recipes-multimedia/gstreamer/gst-plugins-gl/IMX_MMCODEC_3.0.35_4.0.0.patch2438
-rw-r--r--recipes-multimedia/gstreamer/gst-plugins-gl_%.bbappend11
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend7
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_0.9.6.bb33
-rw-r--r--recipes-multimedia/libfslcodec/libfslcodec.inc84
-rw-r--r--recipes-multimedia/libfslcodec/libfslcodec_3.0.11.bb9
-rw-r--r--recipes-multimedia/libfslparser/libfslparser.inc30
-rw-r--r--recipes-multimedia/libfslparser/libfslparser_3.0.11.bb9
-rw-r--r--recipes-multimedia/libfslvpuwrap/libfslvpuwrap/0001-vpu_wrapper-fix-tests-of-return-value-from-IOGetVirt.patch41
-rw-r--r--recipes-multimedia/libfslvpuwrap/libfslvpuwrap_1.0.46.bb23
16 files changed, 3445 insertions, 0 deletions
diff --git a/recipes-multimedia/alsa/fsl-alsa-plugins_1.0.25.bb b/recipes-multimedia/alsa/fsl-alsa-plugins_1.0.25.bb
new file mode 100644
index 0000000..331ccdb
--- /dev/null
+++ b/recipes-multimedia/alsa/fsl-alsa-plugins_1.0.25.bb
@@ -0,0 +1,27 @@
1# Copyright (C) 2013 Freescale Semiconductor
2# Released under the MIT license (see COPYING.MIT for the terms)
3
4DESCRIPTION = "Freescale alsa-lib plugins"
5LICENSE = "GPLv2"
6SECTION = "multimedia"
7DEPENDS = "alsa-lib virtual/kernel"
8
9LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=94d55d512a9ba36caa9b7df079bae19f"
10
11inherit autotools pkgconfig
12
13SRC_URI = "${FSL_MIRROR}/${PN}-${PV}.tar.gz"
14SRC_URI[md5sum] = "b1ca7a250a8cd5da07062081b30b4118"
15SRC_URI[sha256sum] = "902df92255d755e8eb08b3c3db0c7b9d70d26d9659b219373bee425ffdc34245"
16
17INCLUDE_DIR = "-I${STAGING_KERNEL_DIR}/include/uapi -I${STAGING_KERNEL_DIR}/include"
18
19EXTRA_OECONF = "CFLAGS="${INCLUDE_DIR}""
20
21INSANE_SKIP_${PN} = "dev-so"
22
23FILES_${PN} += "${libdir}/alsa-lib/libasound_*.so"
24FILES_${PN}-dbg += "${libdir}/alsa-lib/.debug"
25FILES_${PN}-dev += "${libdir}/alsa-lib/*.la"
26
27COMPATIBLE_MACHINE = "(mx6)"
diff --git a/recipes-multimedia/gstreamer/gst-fsl-plugin.inc b/recipes-multimedia/gstreamer/gst-fsl-plugin.inc
new file mode 100644
index 0000000..dca9209
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gst-fsl-plugin.inc
@@ -0,0 +1,66 @@
1# Copyright (C) 2011-2013 Freescale Semiconductor
2# Copytight (C) 2012-2014 O.S. Systems Software LTDA.
3# Released under the MIT license (see COPYING.MIT for the terms)
4
5DESCRIPTION = "Gstreamer freescale plugins"
6LICENSE = "GPLv2 & LGPLv2 & LGPLv2.1"
7SECTION = "multimedia"
8
9DEPENDS = "gstreamer gst-plugins-base libfslcodec libfslparser virtual/kernel"
10DEPENDS_append_mx5 = " imx-lib imx-vpu"
11DEPENDS_append_mx6q = " imx-lib imx-vpu libfslvpuwrap"
12DEPENDS_append_mx6dl = " imx-lib imx-vpu libfslvpuwrap"
13DEPENDS_append_mx6sl = " imx-lib"
14
15LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
16 file://COPYING-LGPL-2;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
17 file://COPYING-LGPL-2.1;md5=fbc093901857fcd118f065f900982c24"
18
19S = "${WORKDIR}/gst-fsl-plugins-${PV}"
20
21SRC_URI = "${FSL_MIRROR}/gst-fsl-plugins-${PV}.tar.gz \
22 file://build-Fix-out-of-tree-build.patch"
23
24inherit autotools pkgconfig
25
26PLATFORM_mx5 = "MX51"
27PLATFORM_mx6 = "MX6"
28PLATFORM_mx6sl = "MX6SL"
29PLATFORM_mx28 = "MX28"
30
31# Todo add a mechanism to map posible build targets
32EXTRA_OECONF = "PLATFORM=${PLATFORM} \
33 CPPFLAGS="-I${STAGING_KERNEL_DIR}/include/uapi -I${STAGING_KERNEL_DIR}/include""
34
35PACKAGES =+ "${PN}-libmfwsconf ${PN}-libgplaycore ${PN}-libgstfsl \
36 ${PN}-libme ${PN}-libgstbufmeta ${PN}-libmfwba \
37 ${PN}-libfwvss ${PN}-gplay"
38
39# FIXME: Add all features
40# feature from excluded mm packages
41PACKAGECONFIG[ac3] += "--enable-ac3dec,--disable-ac3dec,libfslac3codec,libfslac3codec"
42# feature from special mm packages
43PACKAGECONFIG[aacp] += "--enable-aacpdec,--disable-aacpdec,libfslaacpcodec,libfslaacpcodec"
44MSDEPENDS = "libfslmsparser libfslmscodec"
45PACKAGECONFIG[wma10dec] +="--enable-wma10dec,--disable-wma10dec,${MSDEPENDS},${MSDEPENDS}"
46PACKAGECONFIG[wma8enc] +="--enable-wma8enc,--disable-wma8enc,${MSDEPENDS},${MSDEPENDS}"
47PACKAGECONFIG[wmv9mpdec] +="--enable-wmv9mpdec,--disable-wmv9mpdec,${MSDEPENDS},${MSDEPENDS}"
48PACKAGECONFIG[wmv78dec] +="--enable-wmv78dec,--disable-wmv78dec,${MSDEPENDS},${MSDEPENDS}"
49
50FILES_${PN} = "${libdir}/gstreamer-0.10/*.so ${datadir}"
51# Add codec list that the beep plugin run-time depended
52BEEP_RDEPENDS = "libfslcodec-aac libfslcodec-mp3 libfslcodec-oggvorbis"
53RDEPENDS_${PN} += "gst-plugins-good-id3demux libfslparser ${BEEP_RDEPENDS}"
54
55FILES_${PN}-dbg += "${libdir}/gstreamer-0.10/.debug"
56FILES_${PN}-dev += "${libdir}/gstreamer-0.10/*.la ${libdir}/pkgconfig/*.pc"
57FILES_${PN}-staticdev += "${libdir}/gstreamer-0.10/*.a"
58
59FILES_${PN}-gplay = "${bindir}/gplay"
60FILES_${PN}-libmfwsconf = "${libdir}/libmfwsconf${SOLIBS}"
61FILES_${PN}-libgplaycore = "${libdir}/libgplaycore${SOLIBS}"
62FILES_${PN}-libgstfsl = "${libdir}/libgstfsl-0.10${SOLIBS}"
63FILES_${PN}-libme = "${libdir}/libme${SOLIBS}"
64FILES_${PN}-libgstbufmeta = "${libdir}/libgstbufmeta${SOLIBS}"
65FILES_${PN}-libmfwba = "${libdir}/libmfwba${SOLIBS}"
66FILES_${PN}-libfwvss = "${libdir}/libmfwvss${SOLIBS}"
diff --git a/recipes-multimedia/gstreamer/gst-fsl-plugin/build-Fix-out-of-tree-build.patch b/recipes-multimedia/gstreamer/gst-fsl-plugin/build-Fix-out-of-tree-build.patch
new file mode 100644
index 0000000..80b796d
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gst-fsl-plugin/build-Fix-out-of-tree-build.patch
@@ -0,0 +1,617 @@
1From 5b3b8e03df1fadb3ca37c9119cd0089c5171fb05 Mon Sep 17 00:00:00 2001
2From: Otavio Salvador <otavio@ossystems.com.br>
3Date: Thu, 1 May 2014 15:44:51 -0300
4Subject: [PATCH] build: Fix out of tree build
5Organization: O.S. Systems Software LTDA.
6
7The build system had relative include paths which didn't take into
8account the origial source path makes it impossible to do out of tree
9builds. To fix it, every relative include path was replaced with
10$(top_srcdir) so it works independetly of build diretory location.
11
12Upstream-Status: Pending
13
14Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
15---
16 libs/Makefile.am | 2 +-
17 src/audio/aac_dec/src/Makefile.am | 2 +-
18 src/audio/aacplus_dec/src/Makefile.am | 2 +-
19 src/audio/ac3_dec/src/Makefile.am | 2 +-
20 src/audio/amr_dec/src/Makefile.am | 2 +-
21 src/audio/amr_dec/src/Makefile.in | 2 +-
22 src/audio/amr_enc/src/Makefile.am | 2 +-
23 src/audio/amr_enc/src/Makefile.in | 2 +-
24 src/audio/audio_pp/src/Makefile.am | 2 +-
25 src/audio/beep/src/Makefile.am | 8 ++++----
26 src/audio/down_mix/src/Makefile.am | 2 +-
27 src/audio/mp3_dec/src/Makefile.am | 8 ++++----
28 src/audio/mp3_enc/src/Makefile.am | 8 ++++----
29 src/audio/spdif_rx/src/Makefile.am | 2 +-
30 src/audio/spdif_tx/src/Makefile.am | 2 +-
31 src/audio/vorbis_dec/src/Makefile.am | 2 +-
32 src/audio/wma10_dec/src/Makefile.am | 8 ++++----
33 src/audio/wma8_enc/src/Makefile.am | 2 +-
34 src/misc/i_sink/src/Makefile.am | 2 +-
35 src/misc/tvsrc/src/Makefile.am | 2 +-
36 src/misc/v4l_sink/src/Makefile.am | 16 ++++++++--------
37 src/misc/v4l_source/src/Makefile.am | 2 +-
38 src/parser/aiur/src/Makefile.am | 2 +-
39 src/video/deinterlace/src/Makefile.am | 2 +-
40 src/video/h264_dec/src/Makefile.am | 8 ++++----
41 src/video/ipu_csc/src/Makefile.am | 2 +-
42 src/video/mpeg2_dec/src/Makefile.am | 2 +-
43 src/video/mpeg4asp_dec/src/Makefile.am | 8 ++++----
44 src/video/vpu/src/Makefile.am | 2 +-
45 src/video/vpu_dec.full/src/Makefile.am | 2 +-
46 src/video/vpu_enc/src/Makefile.am | 2 +-
47 src/video/wmv9mp_dec/src/Makefile.am | 2 +-
48 src/video/wmv_dec/src/Makefile.am | 2 +-
49 33 files changed, 58 insertions(+), 58 deletions(-)
50
51diff --git a/libs/Makefile.am b/libs/Makefile.am
52index a9e5e0f..47d1e8b 100755
53--- a/libs/Makefile.am
54+++ b/libs/Makefile.am
55@@ -35,7 +35,7 @@ endif
56 endif
57
58
59-libgstfsl_@GST_MAJORMINOR@_la_CFLAGS = $(GST_BASE_CFLAGS) $(IPU_CFLAGS) -I../inc/common
60+libgstfsl_@GST_MAJORMINOR@_la_CFLAGS = $(GST_BASE_CFLAGS) $(IPU_CFLAGS) -I$(top_srcdir)/inc/common
61
62 if PLATFORM_IS_MX5X
63 libgstfsl_@GST_MAJORMINOR@_la_CFLAGS += -DIPULIB
64diff --git a/src/audio/aac_dec/src/Makefile.am b/src/audio/aac_dec/src/Makefile.am
65index 143f0b3..85a3b07 100755
66--- a/src/audio/aac_dec/src/Makefile.am
67+++ b/src/audio/aac_dec/src/Makefile.am
68@@ -22,7 +22,7 @@ libmfw_gst_aacdec_la_SOURCES = mfw_gst_aacdec.c
69 # flags used to compile this plugin
70 # we use the GST_LIBS flags because we might be using plug-in libs
71 libmfw_gst_aacdec_la_CFLAGS = $(GST_BASE_CFLAGS) -O2 -DMPEG4 -DARM_OPT_MACROS -DLC -DPUSH_MODE -fno-omit-frame-pointer -fPIC
72-libmfw_gst_aacdec_la_CPPFLAGS = $(GST_LIBS_CPPFLAGS) $(FSL_MM_CORE_CFLAGS) -I../../../../inc/plugin
73+libmfw_gst_aacdec_la_CPPFLAGS = $(GST_LIBS_CPPFLAGS) $(FSL_MM_CORE_CFLAGS) -I$(top_srcdir)/inc/plugin
74
75
76 if PLATFORM_IS_MX2X
77diff --git a/src/audio/aacplus_dec/src/Makefile.am b/src/audio/aacplus_dec/src/Makefile.am
78index a5453f9..9d8adfe 100755
79--- a/src/audio/aacplus_dec/src/Makefile.am
80+++ b/src/audio/aacplus_dec/src/Makefile.am
81@@ -35,7 +35,7 @@ libmfw_gst_aacplusdec_la_SOURCES = mfw_gst_aacplusdec.c
82 # flags used to compile this plugin
83 # we use the GST_LIBS flags because we might be using plug-in libs
84 libmfw_gst_aacplusdec_la_CFLAGS = $(GST_BASE_CFLAGS) -O2 -DMPEG4 -DARM_OPT_MACROS -DLC -DPUSH_MODE -fno-omit-frame-pointer -fPIC
85-libmfw_gst_aacplusdec_la_CPPFLAGS = $(GST_LIBS_CPPFLAGS) $(FSL_MM_CORE_CFLAGS) -I../../../../inc/plugin
86+libmfw_gst_aacplusdec_la_CPPFLAGS = $(GST_LIBS_CPPFLAGS) $(FSL_MM_CORE_CFLAGS) -I$(top_srcdir)/inc/plugin
87 if PLATFORM_IS_MX2X
88 libmfw_gst_aacplusdec_la_CFLAGS += -march=armv5te -mcpu=arm926ej-s
89 libmfw_gst_aacplusdec_la_CPPFLAGS += -march=armv5te -mcpu=arm926ej-s
90diff --git a/src/audio/ac3_dec/src/Makefile.am b/src/audio/ac3_dec/src/Makefile.am
91index 4916a32..0e2632d 100755
92--- a/src/audio/ac3_dec/src/Makefile.am
93+++ b/src/audio/ac3_dec/src/Makefile.am
94@@ -10,7 +10,7 @@ libmfw_gst_ac3dec_la_SOURCES = mfw_gst_ac3dec.c
95
96 # flags used to compile this plugin
97 # we use the GST_LIBS flags because we might be using plug-in libs
98-libmfw_gst_ac3dec_la_CFLAGS = $(GST_BASE_CFLAGS) $(GST_BASE_CFLAGS) -fno-omit-frame-pointer $(FSL_MM_CORE_CFLAGS) -I../../../../inc/plugin
99+libmfw_gst_ac3dec_la_CFLAGS = $(GST_BASE_CFLAGS) $(GST_BASE_CFLAGS) -fno-omit-frame-pointer $(FSL_MM_CORE_CFLAGS) -I$(top_srcdir)/inc/plugin
100 libmfw_gst_ac3dec_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GST_LIBS) -lgstaudio-$(GST_MAJORMINOR) -l_ac3_dec_arm11_elinux
101 libmfw_gst_ac3dec_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(FSL_MM_CORE_LIBS) -lgstriff-@GST_MAJORMINOR@
102 # headers we need but don't want installed
103diff --git a/src/audio/amr_dec/src/Makefile.am b/src/audio/amr_dec/src/Makefile.am
104index bf32d57..095a659 100755
105--- a/src/audio/amr_dec/src/Makefile.am
106+++ b/src/audio/amr_dec/src/Makefile.am
107@@ -19,7 +19,7 @@ libmfw_gst_amrdec_la_SOURCES = mfw_gst_amrdec.c
108 # flags used to compile this plugin
109 # we use the GST_LIBS flags because we might be using plug-in libs
110 libmfw_gst_amrdec_la_CFLAGS = $(GST_BASE_CFLAGS) -O2 -DMPEG4 -DARM_OPT_MACROS -DLC -fno-omit-frame-pointer -fPIC
111-libmfw_gst_amrdec_la_CPPFLAGS = $(GST_LIBS_CPPFLAGS) $(FSL_MM_CORE_CFLAGS) -I../../../../inc/plugin -I../../../../inc/core_lib
112+libmfw_gst_amrdec_la_CPPFLAGS = $(GST_LIBS_CPPFLAGS) $(FSL_MM_CORE_CFLAGS) -I$(top_srcdir)/inc/plugin -I$(top_srcdir)/inc/core_lib
113 libmfw_gst_amrdec_la_LIBADD = $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) $(CORELIB) -lgstaudio-$(GST_MAJORMINOR)
114 libmfw_gst_amrdec_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(FSL_MM_CORE_LIBS) -lgstriff-@GST_MAJORMINOR@
115
116diff --git a/src/audio/amr_dec/src/Makefile.in b/src/audio/amr_dec/src/Makefile.in
117index 7ae3497..f282ef9 100644
118--- a/src/audio/amr_dec/src/Makefile.in
119+++ b/src/audio/amr_dec/src/Makefile.in
120@@ -381,7 +381,7 @@ libmfw_gst_amrdec_la_SOURCES = mfw_gst_amrdec.c
121 # flags used to compile this plugin
122 # we use the GST_LIBS flags because we might be using plug-in libs
123 libmfw_gst_amrdec_la_CFLAGS = $(GST_BASE_CFLAGS) -O2 -DMPEG4 -DARM_OPT_MACROS -DLC -fno-omit-frame-pointer -fPIC
124-libmfw_gst_amrdec_la_CPPFLAGS = $(GST_LIBS_CPPFLAGS) $(FSL_MM_CORE_CFLAGS) -I../../../../inc/plugin -I../../../../inc/core_lib
125+libmfw_gst_amrdec_la_CPPFLAGS = $(GST_LIBS_CPPFLAGS) $(FSL_MM_CORE_CFLAGS) -I$(top_srcdir)/inc/plugin -I$(top_srcdir)/inc/core_lib
126 libmfw_gst_amrdec_la_LIBADD = $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) $(CORELIB) -lgstaudio-$(GST_MAJORMINOR)
127 libmfw_gst_amrdec_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(FSL_MM_CORE_LIBS) -lgstriff-@GST_MAJORMINOR@
128
129diff --git a/src/audio/amr_enc/src/Makefile.am b/src/audio/amr_enc/src/Makefile.am
130index 4dcc25e..a4d56c9 100755
131--- a/src/audio/amr_enc/src/Makefile.am
132+++ b/src/audio/amr_enc/src/Makefile.am
133@@ -19,7 +19,7 @@ libmfw_gst_amrenc_la_SOURCES = mfw_gst_amrenc.c
134 # flags used to compile this plugin
135 # we use the GST_LIBS flags because we might be using plug-in libs
136 libmfw_gst_amrenc_la_CFLAGS = $(GST_BASE_CFLAGS) -O2 -DMPEG4 -DARM_OPT_MACROS -DLC -fno-omit-frame-pointer -fPIC
137-libmfw_gst_amrenc_la_CPPFLAGS = $(GST_LIBS_CPPFLAGS) $(FSL_MM_CORE_CFLAGS) -I../../../../inc/plugin
138+libmfw_gst_amrenc_la_CPPFLAGS = $(GST_LIBS_CPPFLAGS) $(FSL_MM_CORE_CFLAGS) -I$(top_srcdir)/inc/plugin
139 libmfw_gst_amrenc_la_LIBADD = $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) $(CORELIB) -lgstaudio-$(GST_MAJORMINOR)
140 libmfw_gst_amrenc_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(FSL_MM_CORE_LIBS) -lgstriff-@GST_MAJORMINOR@
141
142diff --git a/src/audio/amr_enc/src/Makefile.in b/src/audio/amr_enc/src/Makefile.in
143index 3792973..575bb90 100644
144--- a/src/audio/amr_enc/src/Makefile.in
145+++ b/src/audio/amr_enc/src/Makefile.in
146@@ -381,7 +381,7 @@ libmfw_gst_amrenc_la_SOURCES = mfw_gst_amrenc.c
147 # flags used to compile this plugin
148 # we use the GST_LIBS flags because we might be using plug-in libs
149 libmfw_gst_amrenc_la_CFLAGS = $(GST_BASE_CFLAGS) -O2 -DMPEG4 -DARM_OPT_MACROS -DLC -fno-omit-frame-pointer -fPIC
150-libmfw_gst_amrenc_la_CPPFLAGS = $(GST_LIBS_CPPFLAGS) $(FSL_MM_CORE_CFLAGS) -I../../../../inc/plugin
151+libmfw_gst_amrenc_la_CPPFLAGS = $(GST_LIBS_CPPFLAGS) $(FSL_MM_CORE_CFLAGS) -I$(top_srcdir)/inc/plugin
152 libmfw_gst_amrenc_la_LIBADD = $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) $(CORELIB) -lgstaudio-$(GST_MAJORMINOR)
153 libmfw_gst_amrenc_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(FSL_MM_CORE_LIBS) -lgstriff-@GST_MAJORMINOR@
154
155diff --git a/src/audio/audio_pp/src/Makefile.am b/src/audio/audio_pp/src/Makefile.am
156index 42365a0..32569fe 100755
157--- a/src/audio/audio_pp/src/Makefile.am
158+++ b/src/audio/audio_pp/src/Makefile.am
159@@ -1,7 +1,7 @@
160 plugin_LTLIBRARIES = libmfw_gst_audio_pp.la
161
162 libmfw_gst_audio_pp_la_SOURCES = mfw_gst_audio_pp.c
163-libmfw_gst_audio_pp_la_CFLAGS = -O2 $(GST_BASE_CFLAGS) -fPIC -fno-omit-frame-pointer $(FSL_MM_CORE_CFLAGS) -I../../../../inc/plugin -I../../../../inc/core_lib
164+libmfw_gst_audio_pp_la_CFLAGS = -O2 $(GST_BASE_CFLAGS) -fPIC -fno-omit-frame-pointer $(FSL_MM_CORE_CFLAGS) -I$(top_srcdir)/inc/plugin -I$(top_srcdir)/inc/core_lib
165 libmfw_gst_audio_pp_la_LIBADD = $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) -l_peq_arm11_elinux
166 libmfw_gst_audio_pp_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(FSL_MM_CORE_LIBS)
167
168diff --git a/src/audio/beep/src/Makefile.am b/src/audio/beep/src/Makefile.am
169index fdd6669..4e92b92 100755
170--- a/src/audio/beep/src/Makefile.am
171+++ b/src/audio/beep/src/Makefile.am
172@@ -8,24 +8,24 @@ libmfw_gst_beep_la_SOURCES = beep.c beepregistry.c beepdec.c beeptypefind.c
173 # flags used to compile this plugin
174 # we use the GST_LIBS flags because we might be using plug-in libs
175 if PLATFORM_IS_MX2X
176-libmfw_gst_beep_la_CFLAGS = $(GST_BASE_CFLAGS) -O2 -fno-omit-frame-pointer $(FSL_MM_CORE_CFLAGS) -I../../../../inc/plugin -I../../../../libs -I../../../../inc/core_lib/uni_audio -D_ARM9 -march=armv5te -mcpu=arm926ej-s
177+libmfw_gst_beep_la_CFLAGS = $(GST_BASE_CFLAGS) -O2 -fno-omit-frame-pointer $(FSL_MM_CORE_CFLAGS) -I$(top_srcdir)/inc/plugin -I$(top_srcdir)/libs -I$(top_srcdir)/inc/core_lib/uni_audio -D_ARM9 -march=armv5te -mcpu=arm926ej-s
178 libmfw_gst_beep_la_LIBADD = $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) -lgstaudio-$(GST_MAJORMINOR) -lgstriff-@GST_MAJORMINOR@ -lgsttag-@GST_MAJORMINOR@ -ldl ../../../../libs/libgstfsl-@GST_MAJORMINOR@.la
179 endif
180
181
182 if PLATFORM_IS_MX3X
183-libmfw_gst_beep_la_CFLAGS = $(GST_BASE_CFLAGS) -O2 -fno-omit-frame-pointer $(FSL_MM_CORE_CFLAGS) -I../../../../inc/plugin -I../../../../libs -I../../../../inc/core_lib/uni_audio -D_ARM11
184+libmfw_gst_beep_la_CFLAGS = $(GST_BASE_CFLAGS) -O2 -fno-omit-frame-pointer $(FSL_MM_CORE_CFLAGS) -I$(top_srcdir)/inc/plugin -I$(top_srcdir)/libs -I$(top_srcdir)/inc/core_lib/uni_audio -D_ARM11
185 libmfw_gst_beep_la_LIBADD = $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) -lgstaudio-$(GST_MAJORMINOR) -lgstriff-@GST_MAJORMINOR@ -lgsttag-@GST_MAJORMINOR@ -ldl ../../../../libs/libgstfsl-@GST_MAJORMINOR@.la
186 endif
187
188
189 if PLATFORM_IS_MX5X
190-libmfw_gst_beep_la_CFLAGS = $(GST_BASE_CFLAGS) -O2 -fno-omit-frame-pointer $(FSL_MM_CORE_CFLAGS) -I../../../../inc/plugin -I../../../../libs -I../../../../inc/core_lib/uni_audio -D_ARM12
191+libmfw_gst_beep_la_CFLAGS = $(GST_BASE_CFLAGS) -O2 -fno-omit-frame-pointer $(FSL_MM_CORE_CFLAGS) -I$(top_srcdir)/inc/plugin -I$(top_srcdir)/libs -I$(top_srcdir)/inc/core_lib/uni_audio -D_ARM12
192 libmfw_gst_beep_la_LIBADD = $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) -lgstaudio-$(GST_MAJORMINOR) -lgstriff-@GST_MAJORMINOR@ -lgsttag-@GST_MAJORMINOR@ -ldl ../../../../libs/libgstfsl-@GST_MAJORMINOR@.la
193 endif
194
195 if PLATFORM_IS_MX6X
196-libmfw_gst_beep_la_CFLAGS = $(GST_BASE_CFLAGS) -O2 -fno-omit-frame-pointer $(FSL_MM_CORE_CFLAGS) -I../../../../inc/plugin -I../../../../libs -I../../../../inc/core_lib/uni_audio -D_ARM12
197+libmfw_gst_beep_la_CFLAGS = $(GST_BASE_CFLAGS) -O2 -fno-omit-frame-pointer $(FSL_MM_CORE_CFLAGS) -I$(top_srcdir)/inc/plugin -I$(top_srcdir)/libs -I$(top_srcdir)/inc/core_lib/uni_audio -D_ARM12
198 libmfw_gst_beep_la_LIBADD = $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) -lgstaudio-$(GST_MAJORMINOR) -lgstriff-@GST_MAJORMINOR@ -lgsttag-@GST_MAJORMINOR@ -ldl ../../../../libs/libgstfsl-@GST_MAJORMINOR@.la
199 endif
200
201diff --git a/src/audio/down_mix/src/Makefile.am b/src/audio/down_mix/src/Makefile.am
202index 9fa392c..ff7b589 100755
203--- a/src/audio/down_mix/src/Makefile.am
204+++ b/src/audio/down_mix/src/Makefile.am
205@@ -1,7 +1,7 @@
206 plugin_LTLIBRARIES = libmfw_gst_downmix.la
207
208 libmfw_gst_downmix_la_SOURCES = mfw_gst_downmix.c
209-libmfw_gst_downmix_la_CFLAGS = -O2 $(GST_BASE_CFLAGS) -fPIC -fno-omit-frame-pointer $(FSL_MM_CORE_CFLAGS) -I../../../../inc/plugin -I../../../../inc/core_lib
210+libmfw_gst_downmix_la_CFLAGS = -O2 $(GST_BASE_CFLAGS) -fPIC -fno-omit-frame-pointer $(FSL_MM_CORE_CFLAGS) -I$(top_srcdir)/inc/plugin -I$(top_srcdir)/inc/core_lib
211 libmfw_gst_downmix_la_LIBADD = $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) -l_downmix_arm11_elinux
212 libmfw_gst_downmix_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(FSL_MM_CORE_LIBS)
213
214diff --git a/src/audio/mp3_dec/src/Makefile.am b/src/audio/mp3_dec/src/Makefile.am
215index 9361da7..bd79288 100755
216--- a/src/audio/mp3_dec/src/Makefile.am
217+++ b/src/audio/mp3_dec/src/Makefile.am
218@@ -27,23 +27,23 @@ libmfw_gst_mp3dec_la_SOURCES = mfw_gst_mp3dec.c
219 # flags used to compile this plugin
220 # we use the GST_LIBS flags because we might be using plug-in libs
221 if PLATFORM_IS_MX2X
222-libmfw_gst_mp3dec_la_CFLAGS = $(GST_BASE_CFLAGS) $(GST_BASE_CFLAGS) -O2 -fno-omit-frame-pointer -DMP3D_HUF_DEQ_BYTEBUF_OPT_C -DMPEGLAYER2 -DPUSH_MODE $(FSL_MM_CORE_CFLAGS) -I../../../../inc/plugin -march=armv5te -mcpu=arm926ej-s
223+libmfw_gst_mp3dec_la_CFLAGS = $(GST_BASE_CFLAGS) $(GST_BASE_CFLAGS) -O2 -fno-omit-frame-pointer -DMP3D_HUF_DEQ_BYTEBUF_OPT_C -DMPEGLAYER2 -DPUSH_MODE $(FSL_MM_CORE_CFLAGS) -I$(top_srcdir)/inc/plugin -march=armv5te -mcpu=arm926ej-s
224 libmfw_gst_mp3dec_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GST_LIBS) -l$(CORELIB) -l_mp3_parser_arm9_elinux
225 endif
226
227
228
229 if PLATFORM_IS_MX3X
230-libmfw_gst_mp3dec_la_CFLAGS = $(GST_BASE_CFLAGS) $(GST_BASE_CFLAGS) -O2 -fno-omit-frame-pointer -DMP3D_HUF_DEQ_BYTEBUF_OPT_C -DMPEGLAYER2 -DPUSH_MODE $(FSL_MM_CORE_CFLAGS) -I../../../../inc/plugin
231+libmfw_gst_mp3dec_la_CFLAGS = $(GST_BASE_CFLAGS) $(GST_BASE_CFLAGS) -O2 -fno-omit-frame-pointer -DMP3D_HUF_DEQ_BYTEBUF_OPT_C -DMPEGLAYER2 -DPUSH_MODE $(FSL_MM_CORE_CFLAGS) -I$(top_srcdir)/inc/plugin
232 libmfw_gst_mp3dec_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GST_LIBS) -l$(CORELIB) -l_mp3_parser_arm11_elinux
233 endif
234
235 if PLATFORM_IS_MX5X
236-libmfw_gst_mp3dec_la_CFLAGS = $(GST_BASE_CFLAGS) $(GST_BASE_CFLAGS) -O2 -fno-omit-frame-pointer -DMP3D_HUF_DEQ_BYTEBUF_OPT_C -DMPEGLAYER2 -DPUSH_MODE $(FSL_MM_CORE_CFLAGS) -I../../../../inc/plugin
237+libmfw_gst_mp3dec_la_CFLAGS = $(GST_BASE_CFLAGS) $(GST_BASE_CFLAGS) -O2 -fno-omit-frame-pointer -DMP3D_HUF_DEQ_BYTEBUF_OPT_C -DMPEGLAYER2 -DPUSH_MODE $(FSL_MM_CORE_CFLAGS) -I$(top_srcdir)/inc/plugin
238 libmfw_gst_mp3dec_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GST_LIBS) -l$(CORELIB) -l_mp3_parser_arm11_elinux
239 endif
240 if PLATFORM_IS_MX6X
241-libmfw_gst_mp3dec_la_CFLAGS = $(GST_BASE_CFLAGS) $(GST_BASE_CFLAGS) -O2 -fno-omit-frame-pointer -DMP3D_HUF_DEQ_BYTEBUF_OPT_C -DMPEGLAYER2 -DPUSH_MODE $(FSL_MM_CORE_CFLAGS) -I../../../../inc/plugin
242+libmfw_gst_mp3dec_la_CFLAGS = $(GST_BASE_CFLAGS) $(GST_BASE_CFLAGS) -O2 -fno-omit-frame-pointer -DMP3D_HUF_DEQ_BYTEBUF_OPT_C -DMPEGLAYER2 -DPUSH_MODE $(FSL_MM_CORE_CFLAGS) -I$(top_srcdir)/inc/plugin
243 libmfw_gst_mp3dec_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GST_LIBS) -l$(CORELIB) -l_mp3_parser_arm11_elinux
244 endif
245
246diff --git a/src/audio/mp3_enc/src/Makefile.am b/src/audio/mp3_enc/src/Makefile.am
247index 0d9b79c..934fc80 100755
248--- a/src/audio/mp3_enc/src/Makefile.am
249+++ b/src/audio/mp3_enc/src/Makefile.am
250@@ -26,19 +26,19 @@ libmfw_gst_mp3enc_la_SOURCES = mfw_gst_mp3enc.c
251 # flags used to compile this plugin
252 # add other _CFLAGS and _LIBS as needed
253 if PLATFORM_IS_MX2X
254-libmfw_gst_mp3enc_la_CFLAGS = $(GST_CFLAGS) $(FSL_MM_CORE_CFLAGS) -I../../../../inc/plugin -I../../../../inc/core_lib -march=armv5te -mcpu=arm926ej-s
255+libmfw_gst_mp3enc_la_CFLAGS = $(GST_CFLAGS) $(FSL_MM_CORE_CFLAGS) -I$(top_srcdir)/inc/plugin -I$(top_srcdir)/inc/core_lib -march=armv5te -mcpu=arm926ej-s
256 endif
257
258
259 if PLATFORM_IS_MX3X
260-libmfw_gst_mp3enc_la_CFLAGS = $(GST_CFLAGS) $(FSL_MM_CORE_CFLAGS) -I../../../../inc/plugin -I../../../../inc/core_lib
261+libmfw_gst_mp3enc_la_CFLAGS = $(GST_CFLAGS) $(FSL_MM_CORE_CFLAGS) -I$(top_srcdir)/inc/plugin -I$(top_srcdir)/inc/core_lib
262 endif
263
264 if PLATFORM_IS_MX5X
265-libmfw_gst_mp3enc_la_CFLAGS = $(GST_CFLAGS) $(FSL_MM_CORE_CFLAGS) -I../../../../inc/plugin -I../../../../inc/core_lib
266+libmfw_gst_mp3enc_la_CFLAGS = $(GST_CFLAGS) $(FSL_MM_CORE_CFLAGS) -I$(top_srcdir)/inc/plugin -I$(top_srcdir)/inc/core_lib
267 endif
268 if PLATFORM_IS_MX6X
269-libmfw_gst_mp3enc_la_CFLAGS = $(GST_CFLAGS) $(FSL_MM_CORE_CFLAGS) -I../../../../inc/plugin -I../../../../inc/core_lib
270+libmfw_gst_mp3enc_la_CFLAGS = $(GST_CFLAGS) $(FSL_MM_CORE_CFLAGS) -I$(top_srcdir)/inc/plugin -I$(top_srcdir)/inc/core_lib
271 endif
272
273
274diff --git a/src/audio/spdif_rx/src/Makefile.am b/src/audio/spdif_rx/src/Makefile.am
275index 80dfb73..f22c6fb 100755
276--- a/src/audio/spdif_rx/src/Makefile.am
277+++ b/src/audio/spdif_rx/src/Makefile.am
278@@ -1,7 +1,7 @@
279 plugin_LTLIBRARIES = libmfw_gst_spdifrx.la
280
281 libmfw_gst_spdifrx_la_SOURCES = mfw_gst_spdifrx.c
282-libmfw_gst_spdifrx_la_CFLAGS = -O2 $(GST_BASE_CFLAGS) -fPIC -fno-omit-frame-pointer -I../../../../inc/plugin
283+libmfw_gst_spdifrx_la_CFLAGS = -O2 $(GST_BASE_CFLAGS) -fPIC -fno-omit-frame-pointer -I$(top_srcdir)/inc/plugin
284 libmfw_gst_spdifrx_la_LIBADD = $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS)
285 libmfw_gst_spdifrx_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) -lgstriff-@GST_MAJORMINOR@
286
287diff --git a/src/audio/spdif_tx/src/Makefile.am b/src/audio/spdif_tx/src/Makefile.am
288index 6b17886..a330e5d 100755
289--- a/src/audio/spdif_tx/src/Makefile.am
290+++ b/src/audio/spdif_tx/src/Makefile.am
291@@ -1,7 +1,7 @@
292 plugin_LTLIBRARIES = libmfw_gst_spdiftx.la
293
294 libmfw_gst_spdiftx_la_SOURCES = mfw_gst_spdiftx.c
295-libmfw_gst_spdiftx_la_CFLAGS = -O2 $(GST_BASE_CFLAGS) -fPIC -fno-omit-frame-pointer -I../../../../inc/plugin
296+libmfw_gst_spdiftx_la_CFLAGS = -O2 $(GST_BASE_CFLAGS) -fPIC -fno-omit-frame-pointer -I$(top_srcdir)/inc/plugin
297 libmfw_gst_spdiftx_la_LIBADD = $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS)
298 libmfw_gst_spdiftx_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) -lgstriff-@GST_MAJORMINOR@
299
300diff --git a/src/audio/vorbis_dec/src/Makefile.am b/src/audio/vorbis_dec/src/Makefile.am
301index f43751b..9fc922d 100755
302--- a/src/audio/vorbis_dec/src/Makefile.am
303+++ b/src/audio/vorbis_dec/src/Makefile.am
304@@ -10,7 +10,7 @@ libmfw_gst_vorbisdec_la_SOURCES = mfw_gst_vorbisdec.c
305 # flags used to compile this plugin
306 # we use the GST_LIBS flags because we might be using plug-in libs
307 libmfw_gst_vorbisdec_la_CFLAGS = $(GST_BASE_CFLAGS) -O2 -DMPEG4 -DARM_OPT_MACROS -DLC -DPUSH_MODE -fno-omit-frame-pointer -fPIC
308-libmfw_gst_vorbisdec_la_CPPFLAGS = $(GST_LIBS_CPPFLAGS) $(FSL_MM_CORE_CFLAGS) -I../../../../inc/plugin
309+libmfw_gst_vorbisdec_la_CPPFLAGS = $(GST_LIBS_CPPFLAGS) $(FSL_MM_CORE_CFLAGS) -I$(top_srcdir)/inc/plugin
310
311
312 libmfw_gst_vorbisdec_la_LIBADD = $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) -lgstaudio-$(GST_MAJORMINOR) -l$(CORELIB)
313diff --git a/src/audio/wma10_dec/src/Makefile.am b/src/audio/wma10_dec/src/Makefile.am
314index 50f5314..ab9147f 100755
315--- a/src/audio/wma10_dec/src/Makefile.am
316+++ b/src/audio/wma10_dec/src/Makefile.am
317@@ -26,21 +26,21 @@ libmfw_gst_wma10dec_la_SOURCES = mfw_gst_wma10dec.c
318 # flags used to compile this plugin
319 # we use the GST_LIBS flags because we might be using plug-in libs
320 if PLATFORM_IS_MX2X
321-libmfw_gst_wma10dec_la_CFLAGS = $(GST_BASE_CFLAGS) -O2 -fno-omit-frame-pointer -DGST_API -DGST_RAW_DECODER $(FSL_MM_CORE_CFLAGS) -I../../../../inc/plugin -march=armv5te -mcpu=arm926ej-s
322+libmfw_gst_wma10dec_la_CFLAGS = $(GST_BASE_CFLAGS) -O2 -fno-omit-frame-pointer -DGST_API -DGST_RAW_DECODER $(FSL_MM_CORE_CFLAGS) -I$(top_srcdir)/inc/plugin -march=armv5te -mcpu=arm926ej-s
323 endif
324
325
326 if PLATFORM_IS_MX3X
327-libmfw_gst_wma10dec_la_CFLAGS = $(GST_BASE_CFLAGS) -O2 -fno-omit-frame-pointer -DGST_API -DGST_RAW_DECODER $(FSL_MM_CORE_CFLAGS) -I../../../../inc/plugin
328+libmfw_gst_wma10dec_la_CFLAGS = $(GST_BASE_CFLAGS) -O2 -fno-omit-frame-pointer -DGST_API -DGST_RAW_DECODER $(FSL_MM_CORE_CFLAGS) -I$(top_srcdir)/inc/plugin
329 endif
330
331
332
333 if PLATFORM_IS_MX5X
334-libmfw_gst_wma10dec_la_CFLAGS = $(GST_BASE_CFLAGS) -O2 -fno-omit-frame-pointer -DGST_API -DGST_RAW_DECODER $(FSL_MM_CORE_CFLAGS) -I../../../../inc/plugin
335+libmfw_gst_wma10dec_la_CFLAGS = $(GST_BASE_CFLAGS) -O2 -fno-omit-frame-pointer -DGST_API -DGST_RAW_DECODER $(FSL_MM_CORE_CFLAGS) -I$(top_srcdir)/inc/plugin
336 endif
337 if PLATFORM_IS_MX6X
338-libmfw_gst_wma10dec_la_CFLAGS = $(GST_BASE_CFLAGS) -O2 -fno-omit-frame-pointer -DGST_API -DGST_RAW_DECODER $(FSL_MM_CORE_CFLAGS) -I../../../../inc/plugin
339+libmfw_gst_wma10dec_la_CFLAGS = $(GST_BASE_CFLAGS) -O2 -fno-omit-frame-pointer -DGST_API -DGST_RAW_DECODER $(FSL_MM_CORE_CFLAGS) -I$(top_srcdir)/inc/plugin
340 endif
341
342
343diff --git a/src/audio/wma8_enc/src/Makefile.am b/src/audio/wma8_enc/src/Makefile.am
344index 82ed82e..04c93bb 100755
345--- a/src/audio/wma8_enc/src/Makefile.am
346+++ b/src/audio/wma8_enc/src/Makefile.am
347@@ -11,7 +11,7 @@ libmfw_gst_wma8enc_la_SOURCES = mfw_gst_wma8enc.c
348
349 # flags used to compile this plugin
350 # add other _CFLAGS and _LIBS as needed
351-libmfw_gst_wma8enc_la_CFLAGS = $(GST_CFLAGS) $(FSL_MM_CORE_CFLAGS) -I../../../../inc/plugin -I../../../../inc/core_lib
352+libmfw_gst_wma8enc_la_CFLAGS = $(GST_CFLAGS) $(FSL_MM_CORE_CFLAGS) -I$(top_srcdir)/inc/plugin -I$(top_srcdir)/inc/core_lib
353 libmfw_gst_wma8enc_la_LIBADD = $(GST_LIBS) -l_wma_muxer_arm11_ELINUX -lgstbase-$(GST_MAJORMINOR) -l_wma8_enc_arm11_elinux
354 libmfw_gst_wma8enc_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(FSL_MM_CORE_LIBS)
355
356diff --git a/src/misc/i_sink/src/Makefile.am b/src/misc/i_sink/src/Makefile.am
357index 721d10c..a6dfaf5 100755
358--- a/src/misc/i_sink/src/Makefile.am
359+++ b/src/misc/i_sink/src/Makefile.am
360@@ -6,7 +6,7 @@ endif
361 plugin_LTLIBRARIES = libmfw_gst_isink.la
362
363 libmfw_gst_isink_la_SOURCES = mfw_gst_isink.c
364-libmfw_gst_isink_la_CFLAGS = -O2 $(GST_BASE_CFLAGS) -fPIC -fno-omit-frame-pointer $(IPU_CFLAGS) -D_$(PLATFORM) -I../../../../inc/plugin -I../../../../inc/common -I../../../../libs/vss -I../../../../libs/gstbufmeta -I../../../../libs/hbuf_alloc -I$(FBHEADER_PATH) -I. -I/usr/src/linux-headers-2.6.35-1000-linaro-imx5/include
365+libmfw_gst_isink_la_CFLAGS = -O2 $(GST_BASE_CFLAGS) -fPIC -fno-omit-frame-pointer $(IPU_CFLAGS) -D_$(PLATFORM) -I$(top_srcdir)/inc/plugin -I$(top_srcdir)/inc/common -I$(top_srcdir)/libs/vss -I$(top_srcdir)/libs/gstbufmeta -I$(top_srcdir)/libs/hbuf_alloc -I$(FBHEADER_PATH) -I. -I/usr/src/linux-headers-2.6.35-1000-linaro-imx5/include
366 libmfw_gst_isink_la_LIBADD = $(GST_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) -lgstinterfaces-$(GST_MAJORMINOR)
367 libmfw_gst_isink_la_LIBADD += ../../../../libs/libgstfsl-@GST_MAJORMINOR@.la
368 libmfw_gst_isink_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
369diff --git a/src/misc/tvsrc/src/Makefile.am b/src/misc/tvsrc/src/Makefile.am
370index dfe080b..a765e87 100755
371--- a/src/misc/tvsrc/src/Makefile.am
372+++ b/src/misc/tvsrc/src/Makefile.am
373@@ -7,7 +7,7 @@ endif
374 plugin_LTLIBRARIES = libmfw_gst_tvsrc.la
375
376 libmfw_gst_tvsrc_la_SOURCES = mfw_gst_tvsrc.c
377-libmfw_gst_tvsrc_la_CFLAGS = $(GST_BASE_CFLAGS) -fno-omit-frame-pointer $(IPU_CFLAGS) -D$(PLATFORM) -I$(FBHEADER_PATH) -I. -I../../../../inc/plugin -I../../../../libs/gstbufmeta
378+libmfw_gst_tvsrc_la_CFLAGS = $(GST_BASE_CFLAGS) -fno-omit-frame-pointer $(IPU_CFLAGS) -D$(PLATFORM) -I$(FBHEADER_PATH) -I. -I$(top_srcdir)/inc/plugin -I$(top_srcdir)/libs/gstbufmeta
379 libmfw_gst_tvsrc_la_LIBADD = $(GST_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) -lgstinterfaces-$(GST_MAJORMINOR) ../../../../libs/libgstfsl-@GST_MAJORMINOR@.la
380 libmfw_gst_tvsrc_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
381
382diff --git a/src/misc/v4l_sink/src/Makefile.am b/src/misc/v4l_sink/src/Makefile.am
383index 4489cc4..a1f6cb8 100755
384--- a/src/misc/v4l_sink/src/Makefile.am
385+++ b/src/misc/v4l_sink/src/Makefile.am
386@@ -3,32 +3,32 @@ plugin_LTLIBRARIES = libmfw_gst_v4lsink.la
387 libmfw_gst_v4lsink_la_SOURCES = mfw_gst_fb.c mfw_gst_v4l.c mfw_gst_v4l_buffer.c mfw_gst_v4lsink.c
388 libmfw_gst_v4lsink_la_CFLAGS = -I/usr/src/linux-headers-2.6.35-1000-linaro-imx5/include
389 if PLATFORM_IS_MX233
390-libmfw_gst_v4lsink_la_CFLAGS += -O2 $(GST_BASE_CFLAGS) -fPIC -fno-omit-frame-pointer -D_$(PLATFORM) -I../../../../inc/plugin -I../../../../inc/misc -march=armv5te
391+libmfw_gst_v4lsink_la_CFLAGS += -O2 $(GST_BASE_CFLAGS) -fPIC -fno-omit-frame-pointer -D_$(PLATFORM) -I$(top_srcdir)/inc/plugin -I$(top_srcdir)/inc/misc -march=armv5te
392 endif
393 if PLATFORM_IS_MX25
394-libmfw_gst_v4lsink_la_CFLAGS += -O2 $(GST_BASE_CFLAGS) -fPIC -fno-omit-frame-pointer -D_$(PLATFORM) -I../../../../inc/plugin -I../../../../inc/misc -march=armv5te
395+libmfw_gst_v4lsink_la_CFLAGS += -O2 $(GST_BASE_CFLAGS) -fPIC -fno-omit-frame-pointer -D_$(PLATFORM) -I$(top_srcdir)/inc/plugin -I$(top_srcdir)/inc/misc -march=armv5te
396 endif
397 if PLATFORM_IS_MX27
398-libmfw_gst_v4lsink_la_CFLAGS += -O2 $(GST_BASE_CFLAGS) -fPIC -fno-omit-frame-pointer -DENABLE_TVOUT -D_$(PLATFORM) -I../../../../inc/plugin -I../../../../inc/misc -march=armv5te
399+libmfw_gst_v4lsink_la_CFLAGS += -O2 $(GST_BASE_CFLAGS) -fPIC -fno-omit-frame-pointer -DENABLE_TVOUT -D_$(PLATFORM) -I$(top_srcdir)/inc/plugin -I$(top_srcdir)/inc/misc -march=armv5te
400 endif
401 if PLATFORM_IS_MX28
402-libmfw_gst_v4lsink_la_CFLAGS += -O2 $(GST_BASE_CFLAGS) -fPIC -fno-omit-frame-pointer -D_$(PLATFORM) -I../../../../inc/plugin -I../../../../inc/misc -march=armv5te
403+libmfw_gst_v4lsink_la_CFLAGS += -O2 $(GST_BASE_CFLAGS) -fPIC -fno-omit-frame-pointer -D_$(PLATFORM) -I$(top_srcdir)/inc/plugin -I$(top_srcdir)/inc/misc -march=armv5te
404 endif
405
406 if PLATFORM_IS_MX3X
407-libmfw_gst_v4lsink_la_CFLAGS += -O2 $(GST_BASE_CFLAGS) -fPIC -fno-omit-frame-pointer -DENABLE_TVOUT -D_$(PLATFORM) -I../../../../inc/plugin -I../../../../inc/misc
408+libmfw_gst_v4lsink_la_CFLAGS += -O2 $(GST_BASE_CFLAGS) -fPIC -fno-omit-frame-pointer -DENABLE_TVOUT -D_$(PLATFORM) -I$(top_srcdir)/inc/plugin -I$(top_srcdir)/inc/misc
409 endif
410 if PLATFORM_IS_MX5X
411-libmfw_gst_v4lsink_la_CFLAGS += -O2 $(GST_BASE_CFLAGS) -fPIC -fno-omit-frame-pointer -DENABLE_TVOUT -D_$(PLATFORM) -I../../../../inc/plugin -I../../../../inc/misc
412+libmfw_gst_v4lsink_la_CFLAGS += -O2 $(GST_BASE_CFLAGS) -fPIC -fno-omit-frame-pointer -DENABLE_TVOUT -D_$(PLATFORM) -I$(top_srcdir)/inc/plugin -I$(top_srcdir)/inc/misc
413 endif
414 if PLATFORM_IS_MX6X
415-libmfw_gst_v4lsink_la_CFLAGS += -O2 $(GST_BASE_CFLAGS) -fPIC -fno-omit-frame-pointer -DENABLE_TVOUT -D_$(PLATFORM) -I../../../../inc/plugin -I../../../../inc/misc
416+libmfw_gst_v4lsink_la_CFLAGS += -O2 $(GST_BASE_CFLAGS) -fPIC -fno-omit-frame-pointer -DENABLE_TVOUT -D_$(PLATFORM) -I$(top_srcdir)/inc/plugin -I$(top_srcdir)/inc/misc
417 endif
418
419 libmfw_gst_v4lsink_la_LIBADD = $(GST_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) -lgstinterfaces-$(GST_MAJORMINOR) ../../../../libs/libgstfsl-@GST_MAJORMINOR@.la
420
421
422-libmfw_gst_v4lsink_la_CFLAGS += $(IPU_CFLAGS) -I. -I../../../../libs/gstbufmeta
423+libmfw_gst_v4lsink_la_CFLAGS += $(IPU_CFLAGS) -I. -I$(top_srcdir)/libs/gstbufmeta
424
425 if USE_X11
426 libmfw_gst_v4lsink_la_SOURCES += mfw_gst_v4l_xlib.c mfw_gst_xlib.c mfw_gst_v4l_suspend.c
427diff --git a/src/misc/v4l_source/src/Makefile.am b/src/misc/v4l_source/src/Makefile.am
428index b80d27e..4ef1351 100755
429--- a/src/misc/v4l_source/src/Makefile.am
430+++ b/src/misc/v4l_source/src/Makefile.am
431@@ -7,7 +7,7 @@ endif
432 plugin_LTLIBRARIES = libmfw_gst_v4lsrc.la
433
434 libmfw_gst_v4lsrc_la_SOURCES = mfw_gst_v4lsrc.c
435-libmfw_gst_v4lsrc_la_CFLAGS = $(GST_BASE_CFLAGS) -fno-omit-frame-pointer $(IPU_CFLAGS) -D$(PLATFORM) -I$(FBHEADER_PATH) -I. -I../../../../inc/plugin -I../../../../libs/gstbufmeta
436+libmfw_gst_v4lsrc_la_CFLAGS = $(GST_BASE_CFLAGS) -fno-omit-frame-pointer $(IPU_CFLAGS) -D$(PLATFORM) -I$(FBHEADER_PATH) -I. -I$(top_srcdir)/inc/plugin -I$(top_srcdir)/libs/gstbufmeta
437 libmfw_gst_v4lsrc_la_LIBADD = $(GST_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) -lgstinterfaces-$(GST_MAJORMINOR) ../../../../libs/libgstfsl-@GST_MAJORMINOR@.la
438 libmfw_gst_v4lsrc_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
439
440diff --git a/src/parser/aiur/src/Makefile.am b/src/parser/aiur/src/Makefile.am
441index 24ac78e..752a155 100755
442--- a/src/parser/aiur/src/Makefile.am
443+++ b/src/parser/aiur/src/Makefile.am
444@@ -4,7 +4,7 @@ plugin_LTLIBRARIES = libmfw_gst_aiur_demux.la
445 # for the next set of variables, rename the prefix if you renamed the .la
446 # sources used to compile this plug-in
447 libmfw_gst_aiur_demux_la_SOURCES = aiur.c aiurregistry.c aiurstreamcache.c aiuridxtab.c aiurdemux.c aiurtypefind.c
448-libmfw_gst_aiur_demux_la_CFLAGS = $(GST_BASE_CFLAGS) -O2 -fno-omit-frame-pointer -DFSL_AVI_DRM_SUPPORT $(FSL_MM_CORE_CFLAGS) -I../../../../inc/plugin -I../../../../inc/core_lib/parser -I../../../../libs
449+libmfw_gst_aiur_demux_la_CFLAGS = $(GST_BASE_CFLAGS) -O2 -fno-omit-frame-pointer -DFSL_AVI_DRM_SUPPORT $(FSL_MM_CORE_CFLAGS) -I$(top_srcdir)/inc/plugin -I$(top_srcdir)/inc/core_lib/parser -I$(top_srcdir)/libs
450 libmfw_gst_aiur_demux_la_LIBADD = $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) -lgstriff-@GST_MAJORMINOR@ -lgsttag-@GST_MAJORMINOR@ -ldl ../../../../libs/libgstfsl-@GST_MAJORMINOR@.la
451 libmfw_gst_aiur_demux_la_CPPFLAGS = $(GST_LIBS_CPPFLAGS)
452 libmfw_gst_aiur_demux_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(FSL_MM_CORE_LIBS)
453diff --git a/src/video/deinterlace/src/Makefile.am b/src/video/deinterlace/src/Makefile.am
454index 08150f9..4f20d58 100755
455--- a/src/video/deinterlace/src/Makefile.am
456+++ b/src/video/deinterlace/src/Makefile.am
457@@ -1,7 +1,7 @@
458 plugin_LTLIBRARIES = libmfw_gst_deinterlace.la
459
460 libmfw_gst_deinterlace_la_SOURCES = mfw_gst_deinterlace.c
461-libmfw_gst_deinterlace_la_CFLAGS = -O2 $(GST_BASE_CFLAGS) -fPIC -fno-omit-frame-pointer -I../../../../inc/plugin -I../../../../inc/core_lib $(FSL_MM_CORE_CFLAGS)
462+libmfw_gst_deinterlace_la_CFLAGS = -O2 $(GST_BASE_CFLAGS) -fPIC -fno-omit-frame-pointer -I$(top_srcdir)/inc/plugin -I$(top_srcdir)/inc/core_lib $(FSL_MM_CORE_CFLAGS)
463 libmfw_gst_deinterlace_la_LIBADD = $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) -l_deinterlace_arm11_elinux
464 libmfw_gst_deinterlace_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(FSL_MM_CORE_LIBS)
465
466diff --git a/src/video/h264_dec/src/Makefile.am b/src/video/h264_dec/src/Makefile.am
467index af2b3ac..278f748 100755
468--- a/src/video/h264_dec/src/Makefile.am
469+++ b/src/video/h264_dec/src/Makefile.am
470@@ -28,21 +28,21 @@ libmfw_gst_h264dec_la_SOURCES = mfw_gst_h264dec.c
471 # flags used to compile this plugin
472 # we use the GST_LIBS flags because we might be using plug-in libs
473 if PLATFORM_IS_MX2X
474-libmfw_gst_h264dec_la_CFLAGS = $(GST_BASE_CFLAGS) -fno-omit-frame-pointer $(FSL_MM_CORE_CFLAGS) -I../../../../inc/plugin -O2 -DDPB_FIX -D_$(PLATFORM) -DDIRECT_RENDER_VERSION=2 -DFRAMEDROPING_ENALBED -march=armv5te -mcpu=arm926ej-s -I../../../../libs/me -I../../../../libs/gstbufmeta
475+libmfw_gst_h264dec_la_CFLAGS = $(GST_BASE_CFLAGS) -fno-omit-frame-pointer $(FSL_MM_CORE_CFLAGS) -I$(top_srcdir)/inc/plugin -O2 -DDPB_FIX -D_$(PLATFORM) -DDIRECT_RENDER_VERSION=2 -DFRAMEDROPING_ENALBED -march=armv5te -mcpu=arm926ej-s -I$(top_srcdir)/libs/me -I$(top_srcdir)/libs/gstbufmeta
476 endif
477
478
479 if PLATFORM_IS_MX3X
480-libmfw_gst_h264dec_la_CFLAGS = $(GST_BASE_CFLAGS) -fno-omit-frame-pointer $(FSL_MM_CORE_CFLAGS) -I../../../../inc/plugin -I../../../../inc/core_lib -O2 -DDPB_FIX -DDIRECT_RENDER_VERSION=2 -DFRAMEDROPING_ENALBED -I../../../../libs/me -I../../../../libs/gstbufmeta
481+libmfw_gst_h264dec_la_CFLAGS = $(GST_BASE_CFLAGS) -fno-omit-frame-pointer $(FSL_MM_CORE_CFLAGS) -I$(top_srcdir)/inc/plugin -I$(top_srcdir)/inc/core_lib -O2 -DDPB_FIX -DDIRECT_RENDER_VERSION=2 -DFRAMEDROPING_ENALBED -I$(top_srcdir)/libs/me -I$(top_srcdir)/libs/gstbufmeta
482 endif
483
484
485 if PLATFORM_IS_MX5X
486-libmfw_gst_h264dec_la_CFLAGS = $(GST_BASE_CFLAGS) -fno-omit-frame-pointer $(FSL_MM_CORE_CFLAGS) -I../../../../inc/plugin -I../../../../inc/core_lib -O2 -DDPB_FIX -DDIRECT_RENDER_VERSION=2 -DFRAMEDROPING_ENALBED -I../../../../libs/me -I../../../../libs/gstbufmeta
487+libmfw_gst_h264dec_la_CFLAGS = $(GST_BASE_CFLAGS) -fno-omit-frame-pointer $(FSL_MM_CORE_CFLAGS) -I$(top_srcdir)/inc/plugin -I$(top_srcdir)/inc/core_lib -O2 -DDPB_FIX -DDIRECT_RENDER_VERSION=2 -DFRAMEDROPING_ENALBED -I$(top_srcdir)/libs/me -I$(top_srcdir)/libs/gstbufmeta
488 endif
489
490 if PLATFORM_IS_MX6X
491-libmfw_gst_h264dec_la_CFLAGS = $(GST_BASE_CFLAGS) -fno-omit-frame-pointer $(FSL_MM_CORE_CFLAGS) -I../../../../inc/plugin -I../../../../inc/core_lib -O2 -DDPB_FIX -DDIRECT_RENDER_VERSION=2 -DFRAMEDROPING_ENALBED -I../../../../libs/me -I../../../../libs/gstbufmeta
492+libmfw_gst_h264dec_la_CFLAGS = $(GST_BASE_CFLAGS) -fno-omit-frame-pointer $(FSL_MM_CORE_CFLAGS) -I$(top_srcdir)/inc/plugin -I$(top_srcdir)/inc/core_lib -O2 -DDPB_FIX -DDIRECT_RENDER_VERSION=2 -DFRAMEDROPING_ENALBED -I$(top_srcdir)/libs/me -I$(top_srcdir)/libs/gstbufmeta
493 endif
494
495 libmfw_gst_h264dec_la_LIBADD = $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) -l$(CORELIB)
496diff --git a/src/video/ipu_csc/src/Makefile.am b/src/video/ipu_csc/src/Makefile.am
497index 8015448..12b44a1 100755
498--- a/src/video/ipu_csc/src/Makefile.am
499+++ b/src/video/ipu_csc/src/Makefile.am
500@@ -6,7 +6,7 @@ endif
501 plugin_LTLIBRARIES = libmfw_gst_ipu_csc.la
502
503 libmfw_gst_ipu_csc_la_SOURCES = mfw_gst_ipu_csc.c
504-libmfw_gst_ipu_csc_la_CFLAGS = -O2 $(GST_BASE_CFLAGS) -fPIC -fno-omit-frame-pointer -I../../../../inc/plugin -I../../../../
505+libmfw_gst_ipu_csc_la_CFLAGS = -O2 $(GST_BASE_CFLAGS) -fPIC -fno-omit-frame-pointer -I$(top_srcdir)/inc/plugin -I$(top_srcdir)
506 libmfw_gst_ipu_csc_la_LIBADD = $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) $(IPU_LIBS) ../../../../libs/libgstfsl-@GST_MAJORMINOR@.la
507 libmfw_gst_ipu_csc_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
508
509diff --git a/src/video/mpeg2_dec/src/Makefile.am b/src/video/mpeg2_dec/src/Makefile.am
510index 006f740..d44a9b0 100755
511--- a/src/video/mpeg2_dec/src/Makefile.am
512+++ b/src/video/mpeg2_dec/src/Makefile.am
513@@ -7,7 +7,7 @@ libmfw_gst_mpeg2dec_la_SOURCES = mfw_gst_mpeg2dec.c
514
515 # flags used to compile this plugin
516 # we use the GST_LIBS flags because we might be using plug-in libs
517-libmfw_gst_mpeg2dec_la_CFLAGS = $(GST_BASE_CFLAGS) -fno-omit-frame-pointer $(FSL_MM_CORE_CFLAGS) -I../../../../inc/plugin -I../../../../inc/core_lib -DDIRECT_RENDER_VERSION=2 -I../../../../libs/me -I../../../../libs/gstbufmeta
518+libmfw_gst_mpeg2dec_la_CFLAGS = $(GST_BASE_CFLAGS) -fno-omit-frame-pointer $(FSL_MM_CORE_CFLAGS) -I$(top_srcdir)/inc/plugin -I$(top_srcdir)/inc/core_lib -DDIRECT_RENDER_VERSION=2 -I$(top_srcdir)/libs/me -I$(top_srcdir)/libs/gstbufmeta
519 libmfw_gst_mpeg2dec_la_LIBADD = $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) -l_mpeg2_dec_arm11_elinux
520 libmfw_gst_mpeg2dec_la_LIBADD += ../../../../libs/libgstfsl-@GST_MAJORMINOR@.la
521 libmfw_gst_mpeg2dec_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(FSL_MM_CORE_LIBS)
522diff --git a/src/video/mpeg4asp_dec/src/Makefile.am b/src/video/mpeg4asp_dec/src/Makefile.am
523index 97dd578..394d42d 100755
524--- a/src/video/mpeg4asp_dec/src/Makefile.am
525+++ b/src/video/mpeg4asp_dec/src/Makefile.am
526@@ -28,19 +28,19 @@ libmfw_gst_mpeg4aspdec_la_SOURCES = mfw_gst_mpeg4asp_dec.c
527 # flags used to compile this plugin
528 # we use the GST_LIBS flags because we might be using plug-in libs
529 if PLATFORM_IS_MX2X
530-libmfw_gst_mpeg4aspdec_la_CFLAGS = $(GST_BASE_CFLAGS) -O2 -fno-omit-frame-pointer -fPIC -DPADDED_OUTPUT -DOUTPUT_BUFFER_CHANGES $(FSL_MM_CORE_CFLAGS) -I../../../../inc/plugin -I../../../../inc/core_lib -DDIRECT_RENDER_VERSION=2 -DFRAMEDROPING_ENALBED -march=armv5te -mcpu=arm926ej-s -I../../../../libs/me -I../../../../libs/gstbufmeta
531+libmfw_gst_mpeg4aspdec_la_CFLAGS = $(GST_BASE_CFLAGS) -O2 -fno-omit-frame-pointer -fPIC -DPADDED_OUTPUT -DOUTPUT_BUFFER_CHANGES $(FSL_MM_CORE_CFLAGS) -I$(top_srcdir)/inc/plugin -I$(top_srcdir)/inc/core_lib -DDIRECT_RENDER_VERSION=2 -DFRAMEDROPING_ENALBED -march=armv5te -mcpu=arm926ej-s -I$(top_srcdir)/libs/me -I$(top_srcdir)/libs/gstbufmeta
532 endif
533
534 if PLATFORM_IS_MX3X
535-libmfw_gst_mpeg4aspdec_la_CFLAGS = $(GST_BASE_CFLAGS) -O2 -fno-omit-frame-pointer -fPIC -DPADDED_OUTPUT -DOUTPUT_BUFFER_CHANGES $(FSL_MM_CORE_CFLAGS) -I../../../../inc/plugin -I../../../../inc/core_lib -DDIRECT_RENDER_VERSION=2 -DFRAMEDROPING_ENALBED -I../../../../libs/me -I../../../../libs/gstbufmeta
536+libmfw_gst_mpeg4aspdec_la_CFLAGS = $(GST_BASE_CFLAGS) -O2 -fno-omit-frame-pointer -fPIC -DPADDED_OUTPUT -DOUTPUT_BUFFER_CHANGES $(FSL_MM_CORE_CFLAGS) -I$(top_srcdir)/inc/plugin -I$(top_srcdir)/inc/core_lib -DDIRECT_RENDER_VERSION=2 -DFRAMEDROPING_ENALBED -I$(top_srcdir)/libs/me -I$(top_srcdir)/libs/gstbufmeta
537 endif
538
539 if PLATFORM_IS_MX5X
540-libmfw_gst_mpeg4aspdec_la_CFLAGS = $(GST_BASE_CFLAGS) -O2 -fno-omit-frame-pointer -fPIC -DPADDED_OUTPUT -DOUTPUT_BUFFER_CHANGES $(FSL_MM_CORE_CFLAGS) -I../../../../inc/plugin -I../../../../inc/core_lib -DDIRECT_RENDER_VERSION=2 -DFRAMEDROPING_ENALBED -I../../../../libs/me -I../../../../libs/gstbufmeta
541+libmfw_gst_mpeg4aspdec_la_CFLAGS = $(GST_BASE_CFLAGS) -O2 -fno-omit-frame-pointer -fPIC -DPADDED_OUTPUT -DOUTPUT_BUFFER_CHANGES $(FSL_MM_CORE_CFLAGS) -I$(top_srcdir)/inc/plugin -I$(top_srcdir)/inc/core_lib -DDIRECT_RENDER_VERSION=2 -DFRAMEDROPING_ENALBED -I$(top_srcdir)/libs/me -I$(top_srcdir)/libs/gstbufmeta
542 endif
543
544 if PLATFORM_IS_MX6X
545-libmfw_gst_mpeg4aspdec_la_CFLAGS = $(GST_BASE_CFLAGS) -O2 -fno-omit-frame-pointer -fPIC -DPADDED_OUTPUT -DOUTPUT_BUFFER_CHANGES $(FSL_MM_CORE_CFLAGS) -I../../../../inc/plugin -I../../../../inc/core_lib -DDIRECT_RENDER_VERSION=2 -DFRAMEDROPING_ENALBED -I../../../../libs/me -I../../../../libs/gstbufmeta
546+libmfw_gst_mpeg4aspdec_la_CFLAGS = $(GST_BASE_CFLAGS) -O2 -fno-omit-frame-pointer -fPIC -DPADDED_OUTPUT -DOUTPUT_BUFFER_CHANGES $(FSL_MM_CORE_CFLAGS) -I$(top_srcdir)/inc/plugin -I$(top_srcdir)/inc/core_lib -DDIRECT_RENDER_VERSION=2 -DFRAMEDROPING_ENALBED -I$(top_srcdir)/libs/me -I$(top_srcdir)/libs/gstbufmeta
547 endif
548
549
550diff --git a/src/video/vpu/src/Makefile.am b/src/video/vpu/src/Makefile.am
551index c8b64ea..cb66817 100755
552--- a/src/video/vpu/src/Makefile.am
553+++ b/src/video/vpu/src/Makefile.am
554@@ -8,7 +8,7 @@ libmfw_vpu_la_SOURCES = vpu.c vpudec.c vpuenc.c
555 # flags used to compile this plugin
556 # we use the GST_LIBS flags because we might be using plug-in libs
557
558-libmfw_vpu_la_CFLAGS = $(GST_BASE_CFLAGS) -O2 -fno-omit-frame-pointer $(FSL_MM_CORE_CFLAGS) -I../../../../inc/plugin -I../../../../libs/me -I../../../../libs/gstbufmeta -I../../../../libs/gstsutils -I../../../../libs/gstnext -I../../../../inc/core_lib
559+libmfw_vpu_la_CFLAGS = $(GST_BASE_CFLAGS) -O2 -fno-omit-frame-pointer $(FSL_MM_CORE_CFLAGS) -I$(top_srcdir)/inc/plugin -I$(top_srcdir)/libs/me -I$(top_srcdir)/libs/gstbufmeta -I$(top_srcdir)/libs/gstsutils -I$(top_srcdir)/libs/gstnext -I$(top_srcdir)/inc/core_lib
560 libmfw_vpu_la_LIBADD = $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) -lgstriff-@GST_MAJORMINOR@ -lgsttag-@GST_MAJORMINOR@
561
562 libmfw_vpu_la_LIBADD += ../../../../libs/libgstfsl-@GST_MAJORMINOR@.la
563diff --git a/src/video/vpu_dec.full/src/Makefile.am b/src/video/vpu_dec.full/src/Makefile.am
564index 7c878a8..be682fd 100755
565--- a/src/video/vpu_dec.full/src/Makefile.am
566+++ b/src/video/vpu_dec.full/src/Makefile.am
567@@ -27,7 +27,7 @@ libmfw_gst_vpu_dec_la_SOURCES = mfw_gst_vpu_decoder.c mfw_gst_vpu_thread.c
568
569 # flags used to compile this plugin
570 # we use the GST_LIBS flags because we might be using plug-in libs
571-libmfw_gst_vpu_dec_la_CFLAGS = $(GST_BASE_CFLAGS) -O2 $(VPU_CFLAGS) -I../../../../inc/plugin $(GST_PLATFORM_FLAGS) -DREALMEDIA -DDIVX -I../../../../libs/me -I../../../../libs/gstbufmeta
572+libmfw_gst_vpu_dec_la_CFLAGS = $(GST_BASE_CFLAGS) -O2 $(VPU_CFLAGS) -I$(top_srcdir)/inc/plugin $(GST_PLATFORM_FLAGS) -DREALMEDIA -DDIVX -I$(top_srcdir)/libs/me -I$(top_srcdir)/libs/gstbufmeta
573 libmfw_gst_vpu_dec_la_LIBADD = $(GST_BASE_LIBS) $(GST_LIBS) -lvpu -lgstvideo-0.10
574 libmfw_gst_vpu_dec_la_LIBADD += ../../../../libs/libgstfsl-@GST_MAJORMINOR@.la
575 libmfw_gst_vpu_dec_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(VPU_LIBS)
576diff --git a/src/video/vpu_enc/src/Makefile.am b/src/video/vpu_enc/src/Makefile.am
577index ac8f272..a1da20b 100755
578--- a/src/video/vpu_enc/src/Makefile.am
579+++ b/src/video/vpu_enc/src/Makefile.am
580@@ -10,7 +10,7 @@ libmfw_gst_vpu_enc_la_SOURCES = mfw_gst_vpu_encoder.c
581
582 # flags used to compile this plugin
583 # we use the GST_LIBS flags because we might be using plug-in libs
584-libmfw_gst_vpu_enc_la_CFLAGS = $(GST_BASE_CFLAGS) -O2 $(VPU_CFLAGS) -I../../../../inc/plugin -DVPU_$(PLATFORM) -I../../../../libs/gstbufmeta -I../../../../libs/vss -I../../../../libs/hbuf_alloc -I../../../../libs/me
585+libmfw_gst_vpu_enc_la_CFLAGS = $(GST_BASE_CFLAGS) -O2 $(VPU_CFLAGS) -I$(top_srcdir)/inc/plugin -DVPU_$(PLATFORM) -I$(top_srcdir)/libs/gstbufmeta -I$(top_srcdir)/libs/vss -I$(top_srcdir)/libs/hbuf_alloc -I$(top_srcdir)/libs/me
586
587 libmfw_gst_vpu_enc_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GST_LIBS) -lvpu
588 libmfw_gst_vpu_enc_la_LIBADD += ../../../../libs/libgstfsl-@GST_MAJORMINOR@.la
589diff --git a/src/video/wmv9mp_dec/src/Makefile.am b/src/video/wmv9mp_dec/src/Makefile.am
590index 49c0953..4bd7bda 100755
591--- a/src/video/wmv9mp_dec/src/Makefile.am
592+++ b/src/video/wmv9mp_dec/src/Makefile.am
593@@ -7,7 +7,7 @@ libmfw_gst_wmv9mpdec_la_SOURCES = mfw_gst_wmv9mpdec.c
594
595 # flags used to compile this plugin
596 # we use the GST_LIBS flags because we might be using plug-in libs
597-libmfw_gst_wmv9mpdec_la_CFLAGS = $(GST_BASE_CFLAGS) $(GST_BASE_CFLAGS) -O2 -fno-omit-frame-pointer -fPIC -DOUTPUT_BUFFER_CHANGES -DPADDED_OUTPUT $(FSL_MM_CORE_CFLAGS) -I../../../../inc/plugin -I../../../../inc/core_lib -DDIRECT_RENDER_VERSION=2 -DFRAMEDROPING_ENALBED -I../../../../libs/gstbufmeta
598+libmfw_gst_wmv9mpdec_la_CFLAGS = $(GST_BASE_CFLAGS) $(GST_BASE_CFLAGS) -O2 -fno-omit-frame-pointer -fPIC -DOUTPUT_BUFFER_CHANGES -DPADDED_OUTPUT $(FSL_MM_CORE_CFLAGS) -I$(top_srcdir)/inc/plugin -I$(top_srcdir)/inc/core_lib -DDIRECT_RENDER_VERSION=2 -DFRAMEDROPING_ENALBED -I$(top_srcdir)/libs/gstbufmeta
599 libmfw_gst_wmv9mpdec_la_LIBADD = $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GST_LIBS) -l_WMV9MP_dec_MP_arm11_elinux ../../../../libs/libgstfsl-@GST_MAJORMINOR@.la
600 libmfw_gst_wmv9mpdec_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(FSL_MM_CORE_LIBS) -lgstriff-@GST_MAJORMINOR@
601
602diff --git a/src/video/wmv_dec/src/Makefile.am b/src/video/wmv_dec/src/Makefile.am
603index 95d563a..3e87976 100755
604--- a/src/video/wmv_dec/src/Makefile.am
605+++ b/src/video/wmv_dec/src/Makefile.am
606@@ -7,7 +7,7 @@ libmfw_gst_wmvdec_la_SOURCES = mfw_gst_wmvdec.c
607
608 # flags used to compile this plugin
609 # we use the GST_LIBS flags because we might be using plug-in libs
610-libmfw_gst_wmvdec_la_CFLAGS = $(GST_BASE_CFLAGS) $(GST_BASE_CFLAGS) -O2 -fno-omit-frame-pointer -fPIC -DOUTPUT_BUFFER_CHANGES -DWMV9_SIMPLE_ONLY -DPADDED_OUTPUT $(FSL_MM_CORE_CFLAGS) -I../../../../inc/plugin -I../../../../inc/core_lib
611+libmfw_gst_wmvdec_la_CFLAGS = $(GST_BASE_CFLAGS) $(GST_BASE_CFLAGS) -O2 -fno-omit-frame-pointer -fPIC -DOUTPUT_BUFFER_CHANGES -DWMV9_SIMPLE_ONLY -DPADDED_OUTPUT $(FSL_MM_CORE_CFLAGS) -I$(top_srcdir)/inc/plugin -I$(top_srcdir)/inc/core_lib
612 libmfw_gst_wmvdec_la_LIBADD = $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GST_LIBS) -l_WMV789_dec_arm11_elinux
613 libmfw_gst_wmvdec_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(FSL_MM_CORE_LIBS) -lgstriff-@GST_MAJORMINOR@
614
615--
6162.0.0.rc0
617
diff --git a/recipes-multimedia/gstreamer/gst-fsl-plugin_3.0.11.bb b/recipes-multimedia/gstreamer/gst-fsl-plugin_3.0.11.bb
new file mode 100644
index 0000000..d0b0c9e
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gst-fsl-plugin_3.0.11.bb
@@ -0,0 +1,11 @@
1# Copyright (C) 2013-14 Freescale Semiconductor
2# Released under the MIT license (see COPYING.MIT for the terms)
3
4require gst-fsl-plugin.inc
5
6EXTRA_OECONF += " CROSS_ROOT=${PKG_CONFIG_SYSROOT_DIR}"
7
8SRC_URI[md5sum] = "0ed858681a74857034c006036023e6ce"
9SRC_URI[sha256sum] = "fbc6000b401ac2c8d67d1414372f4a929cf0a5808f6ed1640f1d2bfcce2f2a4f"
10
11COMPATIBLE_MACHINE = "(mx28|mx5|mx6)"
diff --git a/recipes-multimedia/gstreamer/gst-plugins-base/gstplaybin2-rawvideo-support.patch b/recipes-multimedia/gstreamer/gst-plugins-base/gstplaybin2-rawvideo-support.patch
new file mode 100644
index 0000000..16d89b3
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gst-plugins-base/gstplaybin2-rawvideo-support.patch
@@ -0,0 +1,28 @@
1From cecba1668bc8607112a6a2b802c82b6313a0d2b4 Mon Sep 17 00:00:00 2001
2From: Adrian Alonso <aalonso@freescale.com>
3Date: Tue, 19 Jun 2012 15:37:56 -0500
4Subject: [PATCH] gstplaybin2: rawvideo support
5
6* Enable support for rawvideo
7* Support direct rendering for mfw_v4lsink plugin
8
9Signed-off-by: Adrian Alonso <aalonso@freescale.com>
10---
11 gst/playback/gstplaybin2.c | 2 +-
12 1 file changed, 1 insertion(+), 1 deletion(-)
13
14diff --git a/gst/playback/gstplaybin2.c b/gst/playback/gstplaybin2.c
15index e01ff6c..9c638ae 100644
16--- a/gst/playback/gstplaybin2.c
17+++ b/gst/playback/gstplaybin2.c
18@@ -456,7 +456,7 @@ struct _GstPlayBinClass
19 #define DEFAULT_SUBURI NULL
20 #define DEFAULT_SOURCE NULL
21 #define DEFAULT_FLAGS GST_PLAY_FLAG_AUDIO | GST_PLAY_FLAG_VIDEO | GST_PLAY_FLAG_TEXT | \
22- GST_PLAY_FLAG_SOFT_VOLUME
23+ GST_PLAY_FLAG_SOFT_VOLUME | GST_PLAY_FLAG_NATIVE_VIDEO
24 #define DEFAULT_N_VIDEO 0
25 #define DEFAULT_CURRENT_VIDEO -1
26 #define DEFAULT_N_AUDIO 0
27--
281.7.10.2
diff --git a/recipes-multimedia/gstreamer/gst-plugins-base_%.bbappend b/recipes-multimedia/gstreamer/gst-plugins-base_%.bbappend
new file mode 100644
index 0000000..ecb2b54
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gst-plugins-base_%.bbappend
@@ -0,0 +1,11 @@
1# Freescale gstplaybin2 rawvideo support
2
3FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
4
5SRC_URI_append_mxs = " file://gstplaybin2-rawvideo-support.patch"
6SRC_URI_append_mx5 = " file://gstplaybin2-rawvideo-support.patch"
7SRC_URI_append_mx6 = " file://gstplaybin2-rawvideo-support.patch"
8
9PACKAGE_ARCH_mxs = "${MACHINE_SOCARCH}"
10PACKAGE_ARCH_mx5 = "${MACHINE_SOCARCH}"
11PACKAGE_ARCH_mx6 = "${MACHINE_SOCARCH}"
diff --git a/recipes-multimedia/gstreamer/gst-plugins-gl/IMX_MMCODEC_3.0.35_4.0.0.patch b/recipes-multimedia/gstreamer/gst-plugins-gl/IMX_MMCODEC_3.0.35_4.0.0.patch
new file mode 100644
index 0000000..d4f5576
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gst-plugins-gl/IMX_MMCODEC_3.0.35_4.0.0.patch
@@ -0,0 +1,2438 @@
1diff --git a/configure.ac b/configure.ac
2index 6a4efe0..fa277fa 100644
3--- a/configure.ac
4+++ b/configure.ac
5@@ -5,7 +5,7 @@ dnl please read gstreamer/docs/random/autotools before changing this file
6 dnl initialize autoconf
7 dnl releases only do -Wall, git and prerelease does -Werror too
8 dnl use a three digit version number for releases, and four for git/prerelease
9-AC_INIT(GStreamer OpenGL Plug-ins, 0.10.3,
10+AC_INIT(GStreamer OpenGL Plug-ins, 0.10.3.1,
11 http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer,
12 gst-plugins-gl)
13
14@@ -61,7 +61,7 @@ dnl AS_LIBTOOL_TAGS
15
16 AC_LIBTOOL_WIN32_DLL
17 AM_PROG_LIBTOOL
18-AS_PROG_OBJC
19+AC_PROG_OBJC
20
21 dnl *** required versions of GStreamer stuff ***
22 GST_REQ=0.10.35
23@@ -83,6 +83,8 @@ AG_GST_GETTEXT([gst-plugins-gl-$GST_MAJORMINOR])
24
25 dnl *** check for arguments to configure ***
26
27+AG_GST_ARG_DISABLE_FATAL_WARNINGS
28+
29 AG_GST_ARG_DEBUG
30 AG_GST_ARG_PROFILING
31 AG_GST_ARG_VALGRIND
32@@ -160,36 +162,48 @@ AG_GST_CHECK_FUNCTION
33 dnl *** checks for dependency libraries ***
34
35 dnl GLib is required
36-AG_GST_GLIB_CHECK([2.6])
37+AG_GST_GLIB_CHECK([2.22])
38
39 #dnl Check for OpenGL, GLU and GLEW
40 echo host is $host
41 case $host in
42 *-linux* | *-cygwin* | *-solaris* | *-netbsd* | *-freebsd* | *-openbsd* | *-kfreebsd* | *-dragonflybsd* | *-gnu* )
43- AG_GST_CHECK_X
44 save_CPPFLAGS="$CPPFLAGS"
45 save_LIBS="$LIBS"
46- CPPFLAGS="$CPPFLAGS $X_CFLAGS"
47- LIBS="$LIBS $X_LIBS"
48- #PKG_CHECK_MODULES(GL, gl, HAVE_GL=yes, HAVE_GL=no)
49- AC_CHECK_HEADERS([GL/gl.h], [HAVE_GL=yes], [HAVE_GL=no])
50- if test "x$HAVE_GL" = "xyes"; then
51- AG_GST_CHECK_LIBHEADER(GL, GL, glTexImage2D,, GL/gl.h,, AC_MSG_ERROR([OpenGL is required]))
52- AG_GST_CHECK_LIBHEADER(GLU, GLU, gluSphere,, GL/glu.h,, AC_MSG_ERROR([GLU is required]))
53- AG_GST_CHECK_LIBHEADER(GLEW, GLEW, glewInit,, GL/glew.h,, AC_MSG_ERROR([GLEW is required]))
54- GL_LIBS="$LIBS $X_LIBS -lGL -lGLU -lGLEW"
55- GL_BACKEND=x11
56- GL_TYPE=gl
57+ AC_CHECK_LIB(EGL, fbGetDisplay, HAVE_EGL_FB=yes, HAVE_EGL_FB=no)
58+ if test "x$HAVE_EGL_FB" = "xyes"; then
59+ GL_LIBS="$LIBS -lGLESv2 -lEGL"
60+ GL_BACKEND=fbES2
61+ GL_TYPE=gles
62+ save_CPPFLAGS="$save_CPPFLAGS -DLINUX -DEGL_API_FB"
63 else
64+ AG_GST_CHECK_X
65+ CPPFLAGS="$CPPFLAGS $X_CFLAGS -DLINUX"
66+ LIBS="$LIBS $X_LIBS"
67 AC_CHECK_HEADERS([EGL/egl.h], [HAVE_EGL=yes], [HAVE_EGL=no])
68 if test "x$HAVE_EGL" = "xyes"; then
69 AG_GST_CHECK_LIBHEADER(EGL, EGL, eglGetError,, EGL/egl.h,, AC_MSG_ERROR([EGL is required]))
70+ s_LIBS="$LIBS"
71+ LIBS="-lEGL $LIBS"
72 AG_GST_CHECK_LIBHEADER(GLES2, GLESv2, glTexImage2D,, GLES2/gl2.h,, AC_MSG_ERROR([OpenGLES2 is required]))
73- GL_LIBS="$LIBS $X_LIBS -lEGL -lGLESv2"
74+ LIBS="$s_LIBS"
75+ GL_LIBS="$LIBS -lGLESv2 -lEGL"
76 GL_BACKEND=x11ES2
77 GL_TYPE=gles
78+ save_CPPFLAGS="$save_CPPFLAGS -DLINUX"
79 else
80- AC_MSG_ERROR([GL or EGL is required, consider installing libgl1-mesa-dev])
81+ #PKG_CHECK_MODULES(GL, gl, HAVE_GL=yes, HAVE_GL=no)
82+ AC_CHECK_HEADERS([GL/gl.h], [HAVE_GL=yes], [HAVE_GL=no])
83+ if test "x$HAVE_GL" = "xyes"; then
84+ AG_GST_CHECK_LIBHEADER(GL, GL, glTexImage2D,, GL/gl.h,, AC_MSG_ERROR([OpenGL is required]))
85+ AG_GST_CHECK_LIBHEADER(GLU, GLU, gluSphere,, GL/glu.h,, AC_MSG_ERROR([GLU is required]))
86+ AG_GST_CHECK_LIBHEADER(GLEW, GLEW, glewInit,, GL/glew.h,, AC_MSG_ERROR([GLEW is required]))
87+ GL_LIBS="$LIBS $X_LIBS -lGL -lGLU -lGLEW"
88+ GL_BACKEND=x11
89+ GL_TYPE=gl
90+ else
91+ AC_MSG_ERROR([GL or EGL is required, consider installing libgl1-mesa-dev])
92+ fi
93 fi
94 fi
95 CPPFLAGS="$save_CPPFLAGS"
96@@ -230,6 +244,7 @@ AC_SUBST(GL_BACKEND)
97 AC_SUBST(OPENGL_ES2)
98 AM_CONDITIONAL(GL_BACKEND_X11, test "x$GL_BACKEND" = "xx11")
99 AM_CONDITIONAL(GL_BACKEND_X11ES2, test "x$GL_BACKEND" = "xx11ES2")
100+AM_CONDITIONAL(GL_BACKEND_FBES2, test "x$GL_BACKEND" = "xfbES2")
101 AM_CONDITIONAL(GL_BACKEND_COCOA, test "x$GL_BACKEND" = "xcocoa")
102 AM_CONDITIONAL(GL_BACKEND_WIN32, test "x$GL_BACKEND" = "xwin32")
103 AM_CONDITIONAL(GL_IS_OPENGL, test "x$GL_TYPE" = "xgl")
104@@ -251,6 +266,18 @@ AC_SUBST(GLIB_PREFIX)
105 AC_SUBST(GST_PREFIX)
106 AC_SUBST(GSTPB_PREFIX)
107
108+GST_FSL_CFLAGS="`$PKG_CONFIG --cflags gstreamer-fsl-$GST_MAJORMINOR`"
109+GST_FSL_LIBS="`$PKG_CONFIG --libs gstreamer-fsl-$GST_MAJORMINOR`"
110+AC_CHECK_HEADERS([EGL/eglvivante.h], HAVE_VIVANTE=[yes], HAVE_VIVANTE=[no])
111+if test "x$HAVE_VIVANTE" = "xyes"; then
112+ if test "x$GST_FSL_CFLAGS" = "x"; then
113+ AC_MSG_ERROR([gstreamer-fsl is required])
114+ fi
115+ AC_DEFINE(GPU_VIVANTE, [1], [Use Vivante GPU])
116+fi
117+AM_CONDITIONAL(USE_VIVANTE, test "x$HAVE_VIVANTE" = "xyes")
118+AC_SUBST(GST_FSL_CFLAGS)
119+AC_SUBST(GST_FSL_LIBS)
120
121 dnl libpng is optional
122 PKG_CHECK_MODULES(LIBPNG, libpng >= 1.0, HAVE_PNG=yes, HAVE_PNG=no)
123@@ -269,12 +296,15 @@ if test x$with_jpeg_mmx != x; then
124 LIBS="$LIBS -L$with_jpeg_mmx"
125 fi
126 AC_CHECK_LIB(jpeg-mmx, jpeg_set_defaults, HAVE_JPEG="yes", HAVE_JPEG="no")
127-JPEG_LIBS="$LIBS -ljpeg-mmx"
128-LIBS="$OLD_LIBS"
129 if test x$HAVE_JPEG != xyes; then
130 AC_CHECK_LIB(jpeg, jpeg_set_defaults, HAVE_JPEG="yes", HAVE_JPEG="no")
131- JPEG_LIBS="-ljpeg"
132- AC_DEFINE(HAVE_JPEG, [1] , [Use libjpeg])
133+ if test x$HAVE_JPEG = xyes; then
134+ JPEG_LIBS="-ljpeg"
135+ AC_DEFINE(HAVE_JPEG, [1] , [Use libjpeg])
136+ fi
137+else
138+ JPEG_LIBS="$LIBS -ljpeg-mmx"
139+ LIBS="$OLD_LIBS"
140 fi
141 AC_SUBST(HAVE_JPEG)
142 AC_SUBST(JPEG_LIBS)
143@@ -383,8 +413,14 @@ AG_GST_SET_PACKAGE_RELEASE_DATETIME_WITH_NANO([$PACKAGE_VERSION_NANO],
144 [$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR.$PACKAGE_VERSION_MICRO])
145
146 dnl define an ERROR_CFLAGS Makefile variable
147-AG_GST_SET_ERROR_CFLAGS($GST_GIT)
148-AG_GST_SET_ERROR_CXXFLAGS($GST_GIT)
149+AG_GST_SET_ERROR_CFLAGS($FATAL_WARNINGS)
150+AG_GST_SET_ERROR_CXXFLAGS($FATAL_WARNINGS)
151+dnl define an ERROR_OBJCFLAGS Makefile variable
152+AG_GST_SET_ERROR_OBJCFLAGS($FATAL_WARNINGS, [
153+ -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls
154+ -Wwrite-strings -Wold-style-definition
155+ -Winit-self -Wmissing-include-dirs -Wno-multichar
156+ -Wnested-externs $NO_WARNINGS])
157
158 dnl define correct level for debugging messages
159 AG_GST_SET_LEVEL_DEFAULT($GST_GIT)
160@@ -460,8 +496,10 @@ AC_SUBST(DEPRECATED_CFLAGS)
161 dnl every flag in GST_OPTION_CFLAGS can be overridden at make time
162 GST_OPTION_CFLAGS="\$(WARNING_CFLAGS) \$(ERROR_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
163 GST_OPTION_CXXFLAGS="\$(WARNING_CXXFLAGS) \$(ERROR_CXXFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
164+GST_OPTION_OBJCFLAGS="\$(WARNING_OBJCFLAGS) \$(ERROR_OBJCFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
165 AC_SUBST(GST_OPTION_CFLAGS)
166 AC_SUBST(GST_OPTION_CXXFLAGS)
167+AC_SUBST(GST_OPTION_OBJCFLAGS)
168
169 dnl our libraries need to be versioned correctly
170 AC_SUBST(GST_LT_LDFLAGS)
171@@ -474,10 +512,12 @@ AC_SUBST(GST_PLUGINS_GL_CFLAGS)
172
173 dnl FIXME: do we want to rename to GST_ALL_* ?
174 dnl add GST_OPTION_CFLAGS, but overridable
175+GST_OBJCFLAGS="-I\$(top_srcdir)/gst-libs $GST_CFLAGS $GLIB_EXTRA_CFLAGS \$(GST_OPTION_OBJCFLAGS)"
176 GST_CXXFLAGS="-I\$(top_srcdir)/gst-libs -I\$(top_builddir)/gst-libs $GST_CFLAGS $GST_CXXFLAGS $GLIB_EXTRA_CFLAGS \$(GST_OPTION_CXXFLAGS)"
177 GST_CFLAGS="-I\$(top_srcdir)/gst-libs -I\$(top_builddir)/gst-libs $GST_CFLAGS $GLIB_EXTRA_CFLAGS \$(GST_OPTION_CFLAGS)"
178 AC_SUBST(GST_CFLAGS)
179 AC_SUBST(GST_CXXFLAGS)
180+AC_SUBST(GST_OBJCFLAGS)
181
182 dnl add GCOV libs because libtool strips -fprofile-arcs -ftest-coverage
183 GST_LIBS="$GST_LIBS \$(GCOV_LIBS)"
184diff --git a/docs/libs/Makefile.am b/docs/libs/Makefile.am
185index defa340..18016cf 100644
186--- a/docs/libs/Makefile.am
187+++ b/docs/libs/Makefile.am
188@@ -50,7 +50,7 @@ extra_files =
189 # CFLAGS and LDFLAGS for compiling scan program. Only needed if your app/lib
190 # contains GtkObjects/GObjects and you want to document signals and properties.
191 GTKDOC_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) \
192- -I$(top_srcdir)/gst-libs/gst/gl
193+ -I$(top_srcdir)/gst-libs/gst/gl -I$(top_srcdir) -DHAVE_CONFIG_H -DLINUX
194 GTKDOC_LIBS = \
195 $(top_builddir)/gst-libs/gst/gl/libgstgl-@GST_MAJORMINOR@.la \
196 $(GST_BASE_LIBS)
197diff --git a/docs/plugins/inspect/plugin-libvisual-gl.xml b/docs/plugins/inspect/plugin-libvisual-gl.xml
198index da5a3d5..477c811 100644
199--- a/docs/plugins/inspect/plugin-libvisual-gl.xml
200+++ b/docs/plugins/inspect/plugin-libvisual-gl.xml
201@@ -3,10 +3,10 @@
202 <description>libvisual-gl visualization plugins</description>
203 <filename>../../ext/libvisual/.libs/libgstlibvisualgl.so</filename>
204 <basename>libgstlibvisualgl.so</basename>
205- <version>0.10.3</version>
206+ <version>0.10.3.1</version>
207 <license>LGPL</license>
208 <source>gst-plugins-gl</source>
209- <package>GStreamer OpenGL Plug-ins source release</package>
210+ <package>GStreamer OpenGL Plug-ins git</package>
211 <origin>Unknown package origin</origin>
212 <elements>
213 <element>
214diff --git a/docs/plugins/inspect/plugin-opengl.xml b/docs/plugins/inspect/plugin-opengl.xml
215index dbfa9fb..9b7b663 100644
216--- a/docs/plugins/inspect/plugin-opengl.xml
217+++ b/docs/plugins/inspect/plugin-opengl.xml
218@@ -3,10 +3,10 @@
219 <description>OpenGL plugin</description>
220 <filename>../../gst/gl/.libs/libgstopengl.so</filename>
221 <basename>libgstopengl.so</basename>
222- <version>0.10.3</version>
223+ <version>0.10.3.1</version>
224 <license>LGPL</license>
225 <source>gst-plugins-gl</source>
226- <package>GStreamer OpenGL Plug-ins source release</package>
227+ <package>GStreamer OpenGL Plug-ins git</package>
228 <origin>Unknown package origin</origin>
229 <elements>
230 <element>
231diff --git a/gst-libs/gst/gl/Makefile.am b/gst-libs/gst/gl/Makefile.am
232index 2ef7afc..d55a513 100644
233--- a/gst-libs/gst/gl/Makefile.am
234+++ b/gst-libs/gst/gl/Makefile.am
235@@ -4,6 +4,7 @@ lib_LTLIBRARIES = libgstgl-@GST_MAJORMINOR@.la
236 EXTRA_DIST = \
237 gstglwindow_x11.c \
238 gstglwindow_x11ES2.c \
239+ gstglwindow_fbES2.c \
240 gstglwindow_win32.c \
241 gstglwindow_winCE.c \
242 gstglwindow_cocoa.m
243@@ -28,6 +29,13 @@ endif
244 if GL_BACKEND_X11ES2
245 libgstgl_@GST_MAJORMINOR@_la_SOURCES += gstglwindow_x11ES2.c
246 endif
247+if GL_BACKEND_FBES2
248+libgstgl_@GST_MAJORMINOR@_la_SOURCES += gstglwindow_fbES2.c
249+endif
250+
251+if USE_VIVANTE
252+libgstgl_@GST_MAJORMINOR@_la_SOURCES += gstglvivante.c
253+endif
254
255 libgstgl_@GST_MAJORMINOR@includedir = $(includedir)/gstreamer-@GST_MAJORMINOR@/gst/gl
256 libgstgl_@GST_MAJORMINOR@include_HEADERS = \
257@@ -41,13 +49,19 @@ libgstgl_@GST_MAJORMINOR@include_HEADERS = \
258 gstglshadervariables.h \
259 gstglshader.h
260
261+if USE_VIVANTE
262+libgstgl_@GST_MAJORMINOR@include_HEADERS += gstglvivante.h
263+endif
264+
265 libgstgl_@GST_MAJORMINOR@_la_LIBADD = \
266 $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) -lgstcontroller-$(GST_MAJORMINOR) \
267+ $(GST_FSL_LIBS) \
268 $(GST_BASE_LIBS) $(GST_LIBS) \
269 $(GL_LIBS)
270
271 libgstgl_@GST_MAJORMINOR@_la_CFLAGS = \
272 $(GL_CFLAGS) $(X_CFLAGS) \
273+ $(GST_FSL_CFLAGS) \
274 $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS)
275 libgstgl_@GST_MAJORMINOR@_la_OBJCFLAGS = \
276 $(GL_CFLAGS) $(X_CFLAGS) \
277diff --git a/gst-libs/gst/gl/gstgldisplay.c b/gst-libs/gst/gl/gstgldisplay.c
278index 64c6c2c..da2e602 100644
279--- a/gst-libs/gst/gl/gstgldisplay.c
280+++ b/gst-libs/gst/gl/gstgldisplay.c
281@@ -28,6 +28,9 @@
282
283 #include <gst/video/gstvideosink.h>
284 #include "gstgldisplay.h"
285+#ifdef GPU_VIVANTE
286+#include "gstglvivante.h"
287+#endif
288
289 #ifndef GLEW_VERSION_MAJOR
290 #define GLEW_VERSION_MAJOR 4
291@@ -468,6 +471,10 @@ gst_gl_display_init (GstGLDisplay * display, GstGLDisplayClass * klass)
292 #endif
293
294 display->error_message = NULL;
295+
296+#ifdef GPU_VIVANTE
297+ display->gpu_priv = gst_gl_vivante_new ();
298+#endif
299 }
300
301 static void
302@@ -539,6 +546,12 @@ gst_gl_display_finalize (GObject * object)
303 g_free (display->error_message);
304 display->error_message = NULL;
305 }
306+#ifdef GPU_VIVANTE
307+ if (display->gpu_priv) {
308+ gst_gl_vivante_delete (display->gpu_priv);
309+ display->gpu_priv = NULL;
310+ }
311+#endif
312 }
313
314
315@@ -1135,6 +1148,17 @@ gst_gl_display_thread_init_upload (GstGLDisplay * display)
316 void
317 gst_gl_display_thread_do_upload (GstGLDisplay * display)
318 {
319+ if (display->gpu_priv &&
320+ display->upload_width == display->upload_data_width &&
321+ display->upload_height == display->upload_data_height) {
322+#ifdef GPU_VIVANTE
323+ if (gst_gl_vivante_tex_upload (display->gpu_priv, display))
324+ return;
325+#endif
326+ }
327+
328+ GST_WARNING ("%s: Fall into non direct uploading", __func__);
329+
330 gst_gl_display_thread_do_upload_fill (display);
331
332 switch (display->upload_video_format) {
333@@ -1950,14 +1974,13 @@ gst_gl_display_on_draw (GstGLDisplay * display)
334
335 glBegin (GL_QUADS);
336 /* gst images are top-down while opengl plane is bottom-up */
337- glTexCoord2i (display->redisplay_texture_width, 0);
338+ glTexCoord2i (1, 0);
339 glVertex2f (1.0f, 1.0f);
340 glTexCoord2i (0, 0);
341 glVertex2f (-1.0f, 1.0f);
342- glTexCoord2i (0, display->redisplay_texture_height);
343+ glTexCoord2i (0, 1);
344 glVertex2f (-1.0f, -1.0f);
345- glTexCoord2i (display->redisplay_texture_width,
346- display->redisplay_texture_height);
347+ glTexCoord2i (1, 1);
348 glVertex2f (1.0f, -1.0f);
349 /*glTexCoord2i (display->redisplay_texture_width, 0);
350 glVertex2i (1, -1);
351@@ -1974,7 +1997,8 @@ gst_gl_display_on_draw (GstGLDisplay * display)
352
353 #else //OPENGL_ES2
354
355- const GLfloat vVertices[] = { 1.0f, 1.0f, 0.0f,
356+ GLfloat left, right, top, bottom;
357+ GLfloat vVertices[] = { 1.0f, 1.0f, 0.0f,
358 1.0f, 0.0f,
359 -1.0f, 1.0f, 0.0f,
360 0.0f, 0.0f,
361@@ -1986,6 +2010,17 @@ gst_gl_display_on_draw (GstGLDisplay * display)
362
363 GLushort indices[] = { 0, 1, 2, 0, 2, 3 };
364
365+#ifdef GPU_VIVANTE
366+ if (display->gpu_priv) {
367+ gst_gl_vivante_get_sampler_rect (display->gpu_priv, &left, &right, &top,
368+ &bottom);
369+ vVertices[3] = vVertices[18] = right;
370+ vVertices[4] = vVertices[9] = bottom;
371+ vVertices[8] = vVertices[13] = left;
372+ vVertices[14] = vVertices[19] = top;
373+ }
374+#endif
375+
376 glClear (GL_COLOR_BUFFER_BIT);
377
378 gst_gl_shader_use (display->redisplay_shader);
379@@ -2067,6 +2102,9 @@ gst_gl_display_glgen_texture (GstGLDisplay * display, GLuint * pTexture,
380 case GST_VIDEO_FORMAT_I420:
381 case GST_VIDEO_FORMAT_YV12:
382 case GST_VIDEO_FORMAT_AYUV:
383+#ifdef GPU_VIVANTE
384+ case GST_VIDEO_FORMAT_NV12:
385+#endif
386 glTexImage2D (GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA8,
387 width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
388 break;
389@@ -2177,11 +2215,11 @@ gst_gl_display_check_framebuffer_status (void)
390 GST_ERROR ("GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS");
391 break;
392
393-#if defined(GL_ARB_framebuffer_object)
394+/*
395 case GL_FRAMEBUFFER_UNDEFINED:
396 GST_ERROR ("GL_FRAMEBUFFER_UNDEFINED");
397 break;
398-#endif
399+*/
400
401 default:
402 GST_ERROR ("General FBO error");
403@@ -2350,8 +2388,13 @@ gst_gl_display_init_upload (GstGLDisplay * display, GstVideoFormat video_format,
404 display->upload_height = gl_height;
405 display->upload_data_width = video_width;
406 display->upload_data_height = video_height;
407- gst_gl_window_send_message (display->gl_window,
408- GST_GL_WINDOW_CB (gst_gl_display_thread_init_upload), display);
409+
410+#ifdef GPU_VIVANTE
411+ if (!gst_gl_vivante_check_format (display->gpu_priv, video_format,
412+ video_width, video_height))
413+#endif
414+ gst_gl_window_send_message (display->gl_window,
415+ GST_GL_WINDOW_CB (gst_gl_display_thread_init_upload), display);
416 isAlive = display->isAlive;
417 gst_gl_display_unlock (display);
418
419@@ -2364,6 +2407,14 @@ gboolean
420 gst_gl_display_do_upload (GstGLDisplay * display, GLuint texture,
421 gint data_width, gint data_height, gpointer data)
422 {
423+ return gst_gl_display_do_upload_with_meta (display, texture, data_width,
424+ data_height, data, NULL);
425+}
426+
427+gboolean
428+gst_gl_display_do_upload_with_meta (GstGLDisplay * display, GLuint texture,
429+ gint data_width, gint data_height, gpointer data, gpointer meta)
430+{
431 gboolean isAlive = TRUE;
432
433 gst_gl_display_lock (display);
434@@ -2373,6 +2424,7 @@ gst_gl_display_do_upload (GstGLDisplay * display, GLuint texture,
435 display->upload_data_width = data_width;
436 display->upload_data_height = data_height;
437 display->upload_data = data;
438+ display->upload_meta = meta;
439 gst_gl_window_send_message (display->gl_window,
440 GST_GL_WINDOW_CB (gst_gl_display_thread_do_upload), display);
441 isAlive = display->isAlive;
442@@ -2975,11 +3027,11 @@ gst_gl_display_thread_do_upload_draw (GstGLDisplay * display)
443
444 #ifdef OPENGL_ES2
445 GLint viewport_dim[4];
446-
447- const GLfloat vVertices[] = { 1.0f, -1.0f, 0.0f,
448+ GLfloat left, right, top, bottom;
449+ GLfloat vVertices[] = { 1.0f, -1.0f, 0.0f,
450 1.0f, 0.0f,
451 -1.0f, -1.0f, 0.0f,
452- 0.0f, .0f,
453+ 0.0f, 0.0f,
454 -1.0f, 1.0f, 0.0f,
455 0.0f, 1.0f,
456 1.0f, 1.0f, 0.0f,
457@@ -2987,6 +3039,18 @@ gst_gl_display_thread_do_upload_draw (GstGLDisplay * display)
458 };
459
460 GLushort indices[] = { 0, 1, 2, 0, 2, 3 };
461+
462+#ifdef GPU_VIVANTE
463+ if (display->gpu_priv) {
464+ gst_gl_vivante_get_sampler_rect (display->gpu_priv, &left, &right, &top,
465+ &bottom);
466+ vVertices[3] = vVertices[18] = right;
467+ vVertices[4] = vVertices[9] = bottom;
468+ vVertices[8] = vVertices[13] = left;
469+ vVertices[14] = vVertices[19] = top;
470+ }
471+#endif
472+
473 #endif
474
475 glBindFramebufferEXT (GL_FRAMEBUFFER_EXT, display->upload_fbo);
476@@ -3260,13 +3324,13 @@ gst_gl_display_thread_do_upload_draw (GstGLDisplay * display)
477
478 #ifndef OPENGL_ES2
479 glBegin (GL_QUADS);
480- glTexCoord2i (display->upload_data_width, 0);
481+ glTexCoord2i (1, 0);
482 glVertex2f (1.0f, -1.0f);
483 glTexCoord2i (0, 0);
484 glVertex2f (-1.0f, -1.0f);
485- glTexCoord2i (0, display->upload_data_height);
486+ glTexCoord2i (0, 1);
487 glVertex2f (-1.0f, 1.0f);
488- glTexCoord2i (display->upload_data_width, display->upload_data_height);
489+ glTexCoord2i (1, 1);
490 glVertex2f (1.0f, 1.0f);
491 glEnd ();
492
493@@ -3554,11 +3618,11 @@ gst_gl_display_thread_do_download_draw_yuv (GstGLDisplay * display)
494 glBegin (GL_QUADS);
495 glTexCoord2i (0, 0);
496 glVertex2f (-1.0f, -1.0f);
497- glTexCoord2i (width, 0);
498+ glTexCoord2i (1, 0);
499 glVertex2f (1.0f, -1.0f);
500- glTexCoord2i (width, height);
501+ glTexCoord2i (1, 1);
502 glVertex2f (1.0f, 1.0f);
503- glTexCoord2i (0, height);
504+ glTexCoord2i (0, 1);
505 glVertex2f (-1.0f, 1.0f);
506 glEnd ();
507
508diff --git a/gst-libs/gst/gl/gstgldisplay.h b/gst-libs/gst/gl/gstgldisplay.h
509index f657e1e..31dfe26 100644
510--- a/gst-libs/gst/gl/gstgldisplay.h
511+++ b/gst-libs/gst/gl/gstgldisplay.h
512@@ -229,6 +229,9 @@ struct _GstGLDisplay
513
514 gchar *error_message;
515
516+ gpointer gpu_priv;
517+ gpointer upload_meta;
518+ gboolean upload_buf_mapped;
519 };
520
521
522@@ -264,6 +267,8 @@ gboolean gst_gl_display_init_upload (GstGLDisplay * display,
523 gint video_width, gint video_height);
524 gboolean gst_gl_display_do_upload (GstGLDisplay * display, GLuint texture,
525 gint data_width, gint data_height, gpointer data);
526+gboolean gst_gl_display_do_upload_with_meta (GstGLDisplay * display, GLuint texture,
527+ gint data_width, gint data_height, gpointer data, gpointer meta);
528 gboolean gst_gl_display_init_download (GstGLDisplay * display,
529 GstVideoFormat video_format, gint width, gint height);
530 gboolean gst_gl_display_do_download (GstGLDisplay * display, GLuint texture,
531diff --git a/gst-libs/gst/gl/gstglshader.h b/gst-libs/gst/gl/gstglshader.h
532index ddeb99c..aec69f1 100644
533--- a/gst-libs/gst/gl/gstglshader.h
534+++ b/gst-libs/gst/gl/gstglshader.h
535@@ -21,6 +21,10 @@
536 #ifndef __GST_GL_SHADER_H__
537 #define __GST_GL_SHADER_H__
538
539+#ifdef HAVE_CONFIG_H
540+#include "config.h"
541+#endif
542+
543 /* OpenGL 2.0 for Embedded Systems */
544 #ifdef OPENGL_ES2
545 #include <GLES2/gl2.h>
546diff --git a/gst-libs/gst/gl/gstglshadervariables.c b/gst-libs/gst/gl/gstglshadervariables.c
547index 69d5b75..be6e58c 100644
548--- a/gst-libs/gst/gl/gstglshadervariables.c
549+++ b/gst-libs/gst/gl/gstglshadervariables.c
550@@ -550,6 +550,7 @@ gst_gl_shadervariable_set (GstGLShader * shader,
551 (float *) ret->value);
552 break;
553
554+#ifndef OPENGL_ES2
555 case _mat2x3:
556 gst_gl_shader_set_uniform_matrix_2x3fv (shader, ret->name, ret->count, 0,
557 (float *) ret->value);
558@@ -569,6 +570,7 @@ gst_gl_shadervariable_set (GstGLShader * shader,
559 gst_gl_shader_set_uniform_matrix_4x2fv (shader, ret->name, ret->count, 0,
560 (float *) ret->value);
561 break;
562+#endif
563
564 case _mat3:
565 case _mat3x3:
566@@ -576,6 +578,7 @@ gst_gl_shadervariable_set (GstGLShader * shader,
567 (float *) ret->value);
568 break;
569
570+#ifndef OPENGL_ES2
571 case _mat3x4:
572 gst_gl_shader_set_uniform_matrix_3x4fv (shader, ret->name, ret->count, 0,
573 (float *) ret->value);
574@@ -585,6 +588,7 @@ gst_gl_shadervariable_set (GstGLShader * shader,
575 gst_gl_shader_set_uniform_matrix_4x3fv (shader, ret->name, ret->count, 0,
576 (float *) ret->value);
577 break;
578+#endif
579
580 case _mat4:
581 case _mat4x4:
582diff --git a/gst-libs/gst/gl/gstglvivante.c b/gst-libs/gst/gl/gstglvivante.c
583new file mode 100644
584index 0000000..2b8c9ae
585--- /dev/null
586+++ b/gst-libs/gst/gl/gstglvivante.c
587@@ -0,0 +1,218 @@
588+/*
589+ * Copyright (c) 2012, Freescale Semiconductor, Inc. All rights reserved.
590+ *
591+ * This library is free software; you can redistribute it and/or
592+ * modify it under the terms of the GNU Lesser General Public
593+ * License as published by the Free Software Foundation; either
594+ * version 2.1 of the License, or (at your option) any later version.
595+ *
596+ * This library is distributed in the hope that it will be useful,
597+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
598+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
599+ * Lesser General Public License for more details.
600+ *
601+ * You should have received a copy of the GNU Lesser General Public
602+ * License along with this library; if not, write to the Free Software
603+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
604+ */
605+
606+#ifdef HAVE_CONFIG_H
607+#include "config.h"
608+#endif
609+
610+#include <string.h>
611+
612+#include "gstglvivante.h"
613+#include <gstbufmeta.h>
614+
615+#define GL_GLEXT_PROTOTYPES
616+#include <GLES2/gl2ext.h>
617+
618+typedef struct
619+{
620+ gfloat sampler_left;
621+ gfloat sampler_right;
622+ gfloat sampler_top;
623+ gfloat sampler_bottom;
624+} GstGLVivante;
625+
626+gpointer
627+gst_gl_vivante_new ()
628+{
629+ GstGLVivante *viv = g_new (GstGLVivante, 1);
630+
631+ viv->sampler_left = 0.0f;
632+ viv->sampler_right = 1.0f;
633+ viv->sampler_top = 1.0f;
634+ viv->sampler_bottom = 0.0f;
635+
636+ return viv;
637+}
638+
639+void
640+gst_gl_vivante_delete (gpointer gpu)
641+{
642+ g_free (gpu);
643+}
644+
645+gboolean
646+gst_gl_vivante_check_format (gpointer gpu, GstVideoFormat format, gint width,
647+ gint height)
648+{
649+ switch (format) {
650+ case GST_VIDEO_FORMAT_YV12:
651+ case GST_VIDEO_FORMAT_NV12:
652+ if ((width & 15) == 0)
653+ return TRUE;
654+ break;
655+ default:
656+ GST_WARNING ("GstVideoFormat %d not supported by vivante", format);
657+ }
658+ GST_WARNING
659+ ("Check format %d, width,height [%d, %d] failed, can't direct render",
660+ format, width, height);
661+ return FALSE;
662+}
663+
664+GLenum
665+gst_gl_vivante_get_gl_format (gpointer gpu, GstVideoFormat format)
666+{
667+ switch (format) {
668+ case GST_VIDEO_FORMAT_YV12:
669+ return GL_VIV_YV12;
670+ case GST_VIDEO_FORMAT_NV12:
671+ return GL_VIV_NV12;
672+ default:
673+ GST_WARNING ("GstVideoFormat %d not supported by vivante", format);
674+ }
675+ return GL_NONE;
676+}
677+
678+static gboolean
679+format_is_yuv (GstVideoFormat format)
680+{
681+ switch (format) {
682+ case GST_VIDEO_FORMAT_YV12:
683+ case GST_VIDEO_FORMAT_NV12:
684+ return TRUE;
685+ default:
686+ return FALSE;
687+ }
688+}
689+
690+static void
691+copy_data_to_gpu (gpointer gpu, GstVideoFormat format, gpointer data,
692+ gpointer planes[], gint width, gint height)
693+{
694+ gint src_height;
695+ gint src_y_size, src_uv_size;
696+ gint dst_y_size, dst_uv_size;
697+
698+ /* width is already 16 aligned */
699+ switch (format) {
700+ case GST_VIDEO_FORMAT_YV12:
701+ src_height = GST_ROUND_UP_2 (height);
702+ src_y_size = width * src_height;
703+ src_uv_size = src_y_size / 4;
704+ dst_y_size = width * height;
705+ dst_uv_size = dst_y_size / 4;
706+ memcpy (planes[0], data, dst_y_size);
707+ memcpy (planes[1], (gchar *) data + src_y_size, dst_uv_size);
708+ memcpy (planes[2], (gchar *) data + src_y_size + src_uv_size,
709+ dst_uv_size);
710+ break;
711+ case GST_VIDEO_FORMAT_NV12:
712+ src_height = GST_ROUND_UP_2 (height);
713+ src_y_size = width * src_height;
714+ dst_y_size = width * height;
715+ dst_uv_size = dst_y_size / 2;
716+ memcpy (planes[0], data, dst_y_size);
717+ memcpy (planes[1], (gchar *) data + src_y_size, dst_uv_size);
718+ break;
719+ default:
720+ return;
721+ }
722+}
723+
724+gboolean
725+gst_gl_vivante_tex_upload (gpointer gpu, GstGLDisplay * display)
726+{
727+ GstVideoFormat format = display->upload_video_format;
728+ gint width = display->upload_data_width;
729+ gint height = display->upload_data_height;
730+ gpointer data = display->upload_data;
731+ GstBufferMeta *meta = GST_BUFFER_META (display->upload_meta);
732+ gpointer planes[3];
733+ GLuint physical = meta ? (GLuint) (meta->physical_data) : ~0U;
734+
735+ GST_INFO ("gst_gl_vivante_tex_upload physical address 0x%x, data %p, tex %d",
736+ physical, data, display->upload_outtex);
737+
738+ if (!gst_gl_vivante_check_format (gpu, format, width, height))
739+ return FALSE;
740+
741+ glBindTexture (GL_TEXTURE_2D, display->upload_outtex);
742+
743+ if (((guint) data & 0x3F) != 0) { /* not aligned, need additional copy */
744+ if (!format_is_yuv (format)) { /* rgb is left to default handler */
745+ GST_WARNING ("Format %d unaligned data is not supported for"
746+ " direct rendering", format);
747+ return FALSE;
748+ }
749+
750+ GST_WARNING ("Data not aligned, need additional copy");
751+
752+ glTexDirectVIV (GL_TEXTURE_2D, width, height,
753+ gst_gl_vivante_get_gl_format (gpu, format), (GLvoid **) & planes);
754+ if (glGetError () != GL_NO_ERROR)
755+ return FALSE;
756+
757+ copy_data_to_gpu (gpu, format, data, planes, width, height);
758+ } else {
759+ glTexDirectVIVMap (GL_TEXTURE_2D, width, height,
760+ gst_gl_vivante_get_gl_format (gpu, format), &data, &physical);
761+ if (glGetError () != GL_NO_ERROR)
762+ return FALSE;
763+ display->upload_buf_mapped = TRUE;
764+ }
765+
766+ glTexDirectInvalidateVIV (GL_TEXTURE_2D);
767+
768+ return TRUE;
769+}
770+
771+void
772+gst_gl_vivante_set_caps (gpointer gpu, GstCaps * caps)
773+{
774+ GstVideoFormat format;
775+ gint width;
776+ gint height;
777+ GstStructure *s;
778+ gint left = 0, right = 0, top = 0, bottom = 0;
779+ GstGLVivante *viv = (GstGLVivante *) gpu;
780+
781+ s = gst_caps_get_structure (caps, 0);
782+ gst_structure_get_int (s, "crop-left", &left);
783+ gst_structure_get_int (s, "crop-top", &top);
784+ gst_structure_get_int (s, "crop-right", &right);
785+ gst_structure_get_int (s, "crop-bottom", &bottom);
786+
787+ gst_video_format_parse_caps (caps, &format, &width, &height);
788+
789+ viv->sampler_left = ((gfloat) left) / width;
790+ viv->sampler_right = ((gfloat) (width - right)) / width;
791+ viv->sampler_top = ((gfloat) (height - bottom)) / height;
792+ viv->sampler_bottom = ((gfloat) top) / height;
793+}
794+
795+void
796+gst_gl_vivante_get_sampler_rect (gpointer gpu, gfloat * left, gfloat * right,
797+ gfloat * top, gfloat * bottom)
798+{
799+ GstGLVivante *viv = (GstGLVivante *) gpu;
800+
801+ *left = viv->sampler_left;
802+ *right = viv->sampler_right;
803+ *top = viv->sampler_top;
804+ *bottom = viv->sampler_bottom;
805+}
806diff --git a/gst-libs/gst/gl/gstglvivante.h b/gst-libs/gst/gl/gstglvivante.h
807new file mode 100644
808index 0000000..f763f80
809--- /dev/null
810+++ b/gst-libs/gst/gl/gstglvivante.h
811@@ -0,0 +1,41 @@
812+/*
813+ * Copyright (c) 2012, Freescale Semiconductor, Inc. All rights reserved.
814+ *
815+ * This library is free software; you can redistribute it and/or
816+ * modify it under the terms of the GNU Library General Public
817+ * License as published by the Free Software Foundation; either
818+ * version 2 of the License, or (at your option) any later version.
819+ *
820+ * This library is distributed in the hope that it will be useful,
821+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
822+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
823+ * Library General Public License for more details.
824+ *
825+ * You should have received a copy of the GNU Library General Public
826+ * License along with this library; if not, write to the
827+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
828+ * Boston, MA 02111-1307, USA.
829+ */
830+
831+#ifndef __GST_GL_VIVANTE_H__
832+#define __GST_GL_VIVANTE_H__
833+
834+#include "gstgldisplay.h"
835+#include <GLES2/gl2.h>
836+
837+G_BEGIN_DECLS
838+
839+gpointer gst_gl_vivante_new();
840+void gst_gl_vivante_delete(gpointer gpu);
841+
842+gboolean gst_gl_vivante_check_format(gpointer gpu, GstVideoFormat format, gint width, gint height);
843+GLenum gst_gl_vivante_get_gl_format(gpointer gpu, GstVideoFormat format);
844+
845+gboolean gst_gl_vivante_tex_upload (gpointer gpu, GstGLDisplay * display);
846+void gst_gl_vivante_set_caps (gpointer gpu, GstCaps * caps);
847+
848+void gst_gl_vivante_get_sampler_rect (gpointer gpu, gfloat *left, gfloat *right, gfloat *top, gfloat *bottom);
849+
850+G_END_DECLS
851+
852+#endif /* __GST_GL_VIVANTE_H__ */
853diff --git a/gst-libs/gst/gl/gstglwindow.h b/gst-libs/gst/gl/gstglwindow.h
854index 499d47a..c3cafb2 100644
855--- a/gst-libs/gst/gl/gstglwindow.h
856+++ b/gst-libs/gst/gl/gstglwindow.h
857@@ -21,6 +21,10 @@
858 #ifndef __GST_GL_WINDOW_H__
859 #define __GST_GL_WINDOW_H__
860
861+#ifdef HAVE_CONFIG_H
862+#include "config.h"
863+#endif
864+
865 /* OpenGL 2.0 for Embedded Systems */
866 #ifdef OPENGL_ES2
867 #undef UNICODE
868diff --git a/gst-libs/gst/gl/gstglwindow_fbES2.c b/gst-libs/gst/gl/gstglwindow_fbES2.c
869new file mode 100644
870index 0000000..57c02e1
871--- /dev/null
872+++ b/gst-libs/gst/gl/gstglwindow_fbES2.c
873@@ -0,0 +1,709 @@
874+/*
875+ * GStreamer
876+ * Copyright (C) 2008 Julien Isorce <julien.isorce@gmail.com>
877+ *
878+ * This library is free software; you can redistribute it and/or
879+ * modify it under the terms of the GNU Library General Public
880+ * License as published by the Free Software Foundation; either
881+ * version 2 of the License, or (at your option) any later version.
882+ *
883+ * This library is distributed in the hope that it will be useful,
884+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
885+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
886+ * Library General Public License for more details.
887+ *
888+ * You should have received a copy of the GNU Library General Public
889+ * License along with this library; if not, write to the
890+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
891+ * Boston, MA 02111-1307, USA.
892+ */
893+
894+#ifdef HAVE_CONFIG_H
895+#include "config.h"
896+#endif
897+
898+#include "gstglwindow.h"
899+#include "EGL/eglvivante.h"
900+
901+#include <locale.h>
902+#include <stdio.h>
903+#include <stdlib.h>
904+
905+#define GST_GL_WINDOW_GET_PRIVATE(o) \
906+ (G_TYPE_INSTANCE_GET_PRIVATE((o), GST_GL_TYPE_WINDOW, GstGLWindowPrivate))
907+
908+/* A gl window is created and deleted in a thread dedicated to opengl calls
909+ The name contains "window" because an opengl context is used in cooperation
910+ with a window */
911+
912+const gchar *EGLErrorString ();
913+
914+enum
915+{
916+ ARG_0,
917+ ARG_DISPLAY
918+};
919+
920+enum GstGLFbEventType
921+{
922+ FB_EVENT_DRAW,
923+ FB_EVENT_CALLBACK,
924+ FB_EVENT_QUIT,
925+};
926+
927+typedef struct _GstGLFbEvent
928+{
929+ enum GstGLFbEventType type;
930+ GstGLWindowCB callback;
931+ gpointer data;
932+} GstGLFbEvent;
933+
934+struct _GstGLWindowPrivate
935+{
936+ /* X is not thread safe */
937+ GMutex *lock;
938+ GCond *cond_send_message;
939+ GCond *cond_queue_message;
940+ gboolean running;
941+ gboolean allow_extra_expose_events;
942+
943+ /* fb queue */
944+ GList *queue;
945+
946+ /* X context */
947+ gchar *display_name;
948+ gint device_width;
949+ gint device_height;
950+
951+ EGLNativeWindowType internal_win_id;
952+ EGLNativeDisplayType device;
953+
954+ /* EGL */
955+ EGLContext gl_context;
956+ EGLDisplay gl_display;
957+ EGLSurface gl_surface;
958+
959+ /* frozen callbacks */
960+ GstGLWindowCB draw_cb;
961+ gpointer draw_data;
962+ GstGLWindowCB2 resize_cb;
963+ gpointer resize_data;
964+ GstGLWindowCB close_cb;
965+ gpointer close_data;
966+};
967+
968+G_DEFINE_TYPE (GstGLWindow, gst_gl_window, G_TYPE_OBJECT);
969+
970+#undef G_LOG_DOMAIN
971+#define G_LOG_DOMAIN "GstGLWindow"
972+
973+gboolean _gst_gl_window_debug = FALSE;
974+
975+void
976+gst_gl_window_init_platform ()
977+{
978+}
979+
980+static void
981+free_event (gpointer event, gpointer data)
982+{
983+ g_slice_free (GstGLFbEvent, event);
984+}
985+
986+/* Must be called in the gl thread */
987+static void
988+gst_gl_window_finalize (GObject * object)
989+{
990+ GstGLWindow *window = GST_GL_WINDOW (object);
991+ GstGLWindowPrivate *priv = window->priv;
992+ gboolean ret = TRUE;
993+
994+ g_mutex_lock (priv->lock);
995+
996+ g_debug ("about to finalize gl window\n");
997+
998+ if (priv->gl_context) {
999+ ret =
1000+ eglMakeCurrent (priv->gl_display, EGL_NO_SURFACE, EGL_NO_SURFACE,
1001+ EGL_NO_CONTEXT);
1002+ if (!ret)
1003+ g_debug ("failed to release opengl context\n");
1004+
1005+ eglDestroyContext (priv->gl_display, priv->gl_context);
1006+ }
1007+
1008+ if (priv->gl_display)
1009+ eglTerminate (priv->gl_display);
1010+
1011+ if (priv->device)
1012+ fbDestroyDisplay (priv->device);
1013+
1014+ g_list_foreach (priv->queue, free_event, NULL);
1015+ g_list_free (priv->queue);
1016+ priv->queue = NULL;
1017+
1018+ if (priv->cond_send_message) {
1019+ g_cond_free (priv->cond_send_message);
1020+ priv->cond_send_message = NULL;
1021+ }
1022+
1023+ if (priv->cond_queue_message) {
1024+ g_cond_free (priv->cond_queue_message);
1025+ priv->cond_queue_message = NULL;
1026+ }
1027+
1028+ g_mutex_unlock (priv->lock);
1029+
1030+ if (priv->lock) {
1031+ g_mutex_free (priv->lock);
1032+ priv->lock = NULL;
1033+ }
1034+
1035+ G_OBJECT_CLASS (gst_gl_window_parent_class)->finalize (object);
1036+}
1037+
1038+static void
1039+gst_gl_window_set_property (GObject * object, guint prop_id,
1040+ const GValue * value, GParamSpec * pspec)
1041+{
1042+ GstGLWindow *window;
1043+ GstGLWindowPrivate *priv;
1044+
1045+ g_return_if_fail (GST_GL_IS_WINDOW (object));
1046+
1047+ window = GST_GL_WINDOW (object);
1048+
1049+ priv = window->priv;
1050+
1051+ switch (prop_id) {
1052+ case ARG_DISPLAY:
1053+ priv->display_name = g_strdup (g_value_get_string (value));
1054+ break;
1055+ default:
1056+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
1057+ break;
1058+ }
1059+}
1060+
1061+static void
1062+gst_gl_window_get_property (GObject * object, guint prop_id,
1063+ GValue * value, GParamSpec * pspec)
1064+{
1065+ GstGLWindow *window;
1066+ GstGLWindowPrivate *priv;
1067+
1068+ g_return_if_fail (GST_GL_IS_WINDOW (object));
1069+
1070+ window = GST_GL_WINDOW (object);
1071+
1072+ priv = window->priv;
1073+
1074+ switch (prop_id) {
1075+ case ARG_DISPLAY:
1076+ g_value_set_string (value, priv->display_name);
1077+ break;
1078+ default:
1079+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
1080+ break;
1081+ }
1082+}
1083+
1084+static void
1085+gst_gl_window_log_handler (const gchar * domain, GLogLevelFlags flags,
1086+ const gchar * message, gpointer user_data)
1087+{
1088+ if (_gst_gl_window_debug) {
1089+ g_log_default_handler (domain, flags, message, user_data);
1090+ }
1091+}
1092+
1093+static void
1094+gst_gl_window_class_init (GstGLWindowClass * klass)
1095+{
1096+ GObjectClass *obj_class = G_OBJECT_CLASS (klass);
1097+
1098+ g_type_class_add_private (klass, sizeof (GstGLWindowPrivate));
1099+
1100+ obj_class->finalize = gst_gl_window_finalize;
1101+ obj_class->set_property = gst_gl_window_set_property;
1102+ obj_class->get_property = gst_gl_window_get_property;
1103+
1104+ g_object_class_install_property (obj_class, ARG_DISPLAY,
1105+ g_param_spec_string ("display", "Display", "X Display name", NULL,
1106+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
1107+}
1108+
1109+static void
1110+gst_gl_window_init (GstGLWindow * window)
1111+{
1112+ GstGLWindowPrivate *priv = NULL;
1113+ window->priv = GST_GL_WINDOW_GET_PRIVATE (window);
1114+ priv = window->priv;
1115+
1116+ if (g_getenv ("GST_GL_WINDOW_DEBUG") != NULL)
1117+ _gst_gl_window_debug = TRUE;
1118+
1119+ g_log_set_handler ("GstGLWindow", G_LOG_LEVEL_DEBUG,
1120+ gst_gl_window_log_handler, NULL);
1121+
1122+ priv->lock = NULL;
1123+ priv->cond_send_message = NULL;
1124+ priv->running = FALSE;
1125+ priv->allow_extra_expose_events = FALSE;
1126+
1127+ priv->queue = NULL;
1128+
1129+ /* X context */
1130+ priv->display_name = NULL;
1131+ priv->device_width = 0;
1132+ priv->device_height = 0;
1133+
1134+ /* EGL */
1135+ priv->gl_context = EGL_NO_CONTEXT;
1136+ priv->gl_display = 0;
1137+ priv->gl_surface = EGL_NO_SURFACE;
1138+
1139+ /* frozen callbacks */
1140+ priv->draw_cb = NULL;
1141+ priv->draw_data = NULL;
1142+ priv->resize_cb = NULL;
1143+ priv->resize_data = NULL;
1144+ priv->close_cb = NULL;
1145+ priv->close_data = NULL;
1146+}
1147+
1148+/* Must be called in the gl thread */
1149+GstGLWindow *
1150+gst_gl_window_new (gulong external_gl_context)
1151+{
1152+ GstGLWindow *window = g_object_new (GST_GL_TYPE_WINDOW, NULL);
1153+ GstGLWindowPrivate *priv = window->priv;
1154+
1155+ EGLint config_attrib[] = {
1156+ EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
1157+ EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
1158+ EGL_DEPTH_SIZE, 16,
1159+ EGL_NONE
1160+ };
1161+
1162+ EGLint context_attrib[] = {
1163+ EGL_CONTEXT_CLIENT_VERSION, 2,
1164+ EGL_NONE
1165+ };
1166+
1167+ EGLint majorVersion;
1168+ EGLint minorVersion;
1169+ EGLint numConfigs;
1170+ EGLConfig config;
1171+
1172+ int index = 0;
1173+
1174+ setlocale (LC_NUMERIC, "C");
1175+
1176+ priv->lock = g_mutex_new ();
1177+ priv->cond_send_message = g_cond_new ();
1178+ priv->cond_queue_message = g_cond_new ();
1179+ priv->running = TRUE;
1180+ priv->allow_extra_expose_events = TRUE;
1181+
1182+ g_mutex_lock (priv->lock);
1183+
1184+ if (priv->display_name)
1185+ index = strtol (priv->display_name, NULL, 0);
1186+
1187+ priv->device = fbGetDisplayByIndex (index);
1188+
1189+ if (!priv->device) {
1190+ g_debug ("failed to get fb display by index %d\n", index);
1191+ goto failure;
1192+ }
1193+
1194+ priv->internal_win_id = fbCreateWindow (priv->device, -1, -1, 0, 0);
1195+
1196+ fbGetDisplayGeometry (priv->device, &priv->device_width,
1197+ &priv->device_height);
1198+
1199+ priv->gl_display = eglGetDisplay (priv->device);
1200+
1201+ if (eglInitialize (priv->gl_display, &majorVersion, &minorVersion))
1202+ g_debug ("egl initialized: %d.%d\n", majorVersion, minorVersion);
1203+ else {
1204+ g_debug ("failed to initialize egl %ld, %s\n", (gulong) priv->gl_display,
1205+ EGLErrorString ());
1206+ goto failure;
1207+ }
1208+
1209+ if (eglChooseConfig (priv->gl_display, config_attrib, &config, 1,
1210+ &numConfigs))
1211+ g_debug ("config set: %ld, %ld\n", (gulong) config, (gulong) numConfigs);
1212+ else {
1213+ g_debug ("failed to set config %ld, %s\n", (gulong) priv->gl_display,
1214+ EGLErrorString ());
1215+ goto failure;
1216+ }
1217+
1218+ priv->gl_surface =
1219+ eglCreateWindowSurface (priv->gl_display, config, priv->internal_win_id,
1220+ NULL);
1221+ if (priv->gl_surface != EGL_NO_SURFACE)
1222+ g_debug ("surface created: %ld\n", (gulong) priv->gl_surface);
1223+ else {
1224+ g_debug ("failed to create surface %ld, %ld, %ld, %s\n",
1225+ (gulong) priv->gl_display, (gulong) priv->gl_surface,
1226+ (gulong) priv->gl_display, EGLErrorString ());
1227+ goto failure;
1228+ }
1229+
1230+ g_debug ("about to create gl context\n");
1231+
1232+ priv->gl_context =
1233+ eglCreateContext (priv->gl_display, config,
1234+ (EGLContext) (guint) external_gl_context, context_attrib);
1235+
1236+ if (priv->gl_context != EGL_NO_CONTEXT)
1237+ g_debug ("gl context created: %ld\n", (gulong) priv->gl_context);
1238+ else {
1239+ g_debug ("failed to create glcontext %ld, %ld, %s\n",
1240+ (gulong) priv->gl_context, (gulong) priv->gl_display,
1241+ EGLErrorString ());
1242+ goto failure;
1243+ }
1244+
1245+ if (!eglMakeCurrent (priv->gl_display, priv->gl_surface, priv->gl_surface,
1246+ priv->gl_context)) {
1247+ g_debug ("failed to make opengl context current %ld, %s\n",
1248+ (gulong) priv->gl_display, EGLErrorString ());
1249+ goto failure;
1250+ }
1251+
1252+ g_mutex_unlock (priv->lock);
1253+ printf ("device WxH:%dx%d\n", priv->device_width, priv->device_height);
1254+ return window;
1255+
1256+failure:
1257+ g_mutex_unlock (priv->lock);
1258+ g_object_unref (G_OBJECT (window));
1259+ return NULL;
1260+}
1261+
1262+GQuark
1263+gst_gl_window_error_quark (void)
1264+{
1265+ return g_quark_from_static_string ("gst-gl-window-error");
1266+}
1267+
1268+gulong
1269+gst_gl_window_get_internal_gl_context (GstGLWindow * window)
1270+{
1271+ GstGLWindowPrivate *priv = window->priv;
1272+ return (gulong) priv->gl_context;
1273+}
1274+
1275+void
1276+callback_activate_gl_context (GstGLWindowPrivate * priv)
1277+{
1278+ if (!eglMakeCurrent (priv->gl_display, priv->gl_surface, priv->gl_surface,
1279+ priv->gl_context))
1280+ g_debug ("failed to activate opengl context %lud\n",
1281+ (gulong) priv->gl_context);
1282+}
1283+
1284+void
1285+callback_inactivate_gl_context (GstGLWindowPrivate * priv)
1286+{
1287+ if (!eglMakeCurrent (priv->device, EGL_NO_SURFACE, EGL_NO_SURFACE,
1288+ EGL_NO_CONTEXT))
1289+ g_debug ("failed to inactivate opengl context %lud\n",
1290+ (gulong) priv->gl_context);
1291+}
1292+
1293+void
1294+gst_gl_window_activate_gl_context (GstGLWindow * window, gboolean activate)
1295+{
1296+ GstGLWindowPrivate *priv = window->priv;
1297+ if (activate)
1298+ gst_gl_window_send_message (window,
1299+ GST_GL_WINDOW_CB (callback_activate_gl_context), priv);
1300+ else
1301+ gst_gl_window_send_message (window,
1302+ GST_GL_WINDOW_CB (callback_inactivate_gl_context), priv);
1303+}
1304+
1305+/* Not called by the gl thread */
1306+void
1307+gst_gl_window_set_external_window_id (GstGLWindow * window, gulong id)
1308+{
1309+}
1310+
1311+void
1312+gst_gl_window_set_draw_callback (GstGLWindow * window, GstGLWindowCB callback,
1313+ gpointer data)
1314+{
1315+ GstGLWindowPrivate *priv = window->priv;
1316+
1317+ g_mutex_lock (priv->lock);
1318+
1319+ priv->draw_cb = callback;
1320+ priv->draw_data = data;
1321+
1322+ g_mutex_unlock (priv->lock);
1323+}
1324+
1325+void
1326+gst_gl_window_set_resize_callback (GstGLWindow * window,
1327+ GstGLWindowCB2 callback, gpointer data)
1328+{
1329+ GstGLWindowPrivate *priv = window->priv;
1330+
1331+ g_mutex_lock (priv->lock);
1332+
1333+ priv->resize_cb = callback;
1334+ priv->resize_data = data;
1335+
1336+ g_mutex_unlock (priv->lock);
1337+}
1338+
1339+void
1340+gst_gl_window_set_close_callback (GstGLWindow * window, GstGLWindowCB callback,
1341+ gpointer data)
1342+{
1343+ GstGLWindowPrivate *priv = window->priv;
1344+
1345+ g_mutex_lock (priv->lock);
1346+
1347+ priv->close_cb = callback;
1348+ priv->close_data = data;
1349+
1350+ g_mutex_unlock (priv->lock);
1351+}
1352+
1353+/* Called in the gl thread */
1354+void
1355+gst_gl_window_draw_unlocked (GstGLWindow * window, gint width, gint height)
1356+{
1357+ GstGLWindowPrivate *priv = window->priv;
1358+
1359+ if (priv->running && priv->allow_extra_expose_events) {
1360+ GstGLFbEvent *event = g_slice_new0 (GstGLFbEvent);
1361+ event->type = FB_EVENT_DRAW;
1362+ priv->queue = g_list_append (priv->queue, event);
1363+ g_cond_signal (priv->cond_queue_message);
1364+ /* block until opengl calls have been executed in the gl thread */
1365+ g_cond_wait (priv->cond_send_message, priv->lock);
1366+ }
1367+}
1368+
1369+/* Not called by the gl thread */
1370+void
1371+gst_gl_window_draw (GstGLWindow * window, gint width, gint height)
1372+{
1373+ if (window) {
1374+ GstGLWindowPrivate *priv = window->priv;
1375+
1376+ g_mutex_lock (priv->lock);
1377+
1378+ if (priv->running) {
1379+ GstGLFbEvent *event = g_slice_new0 (GstGLFbEvent);
1380+ event->type = FB_EVENT_DRAW;
1381+ priv->queue = g_list_append (priv->queue, event);
1382+ g_cond_signal (priv->cond_queue_message);
1383+ /* block until opengl calls have been executed in the gl thread */
1384+ g_cond_wait (priv->cond_send_message, priv->lock);
1385+ }
1386+
1387+ g_mutex_unlock (priv->lock);
1388+ }
1389+}
1390+
1391+static void
1392+gst_gl_fb_queue_flush (GList * queue, GCond * cond)
1393+{
1394+ GstGLFbEvent *event;
1395+ GList *first;
1396+
1397+ while ((first = g_list_first (queue))) {
1398+ event = first->data;
1399+ queue = g_list_delete_link (queue, first);
1400+
1401+ if (event->type == FB_EVENT_CALLBACK) {
1402+ g_debug ("execute last pending custom x events\n");
1403+
1404+ if (!event->callback || !event->data)
1405+ g_debug ("custom cb not initialized\n");
1406+
1407+ event->callback (event->data);
1408+
1409+ g_cond_signal (cond);
1410+ }
1411+
1412+ g_slice_free (GstGLFbEvent, event);
1413+ }
1414+}
1415+
1416+/* Called in the gl thread */
1417+void
1418+gst_gl_window_run_loop (GstGLWindow * window)
1419+{
1420+ GstGLWindowPrivate *priv = window->priv;
1421+ GstGLFbEvent *event;
1422+ GList *first;
1423+
1424+ g_debug ("begin loop\n");
1425+
1426+ g_mutex_lock (priv->lock);
1427+
1428+ while (priv->running) {
1429+
1430+ if (!priv->queue)
1431+ g_cond_wait (priv->cond_queue_message, priv->lock);
1432+
1433+ first = g_list_first (priv->queue);
1434+ event = first->data;
1435+ priv->queue = g_list_delete_link (priv->queue, first);
1436+
1437+ // use in generic/cube and other related uses
1438+ priv->allow_extra_expose_events = g_list_length (priv->queue) <= 2;
1439+
1440+ switch (event->type) {
1441+ case FB_EVENT_CALLBACK:
1442+ {
1443+ if (priv->running) {
1444+ if (!event->callback || !event->data)
1445+ g_debug ("custom cb not initialized\n");
1446+ event->callback (event->data);
1447+ g_cond_signal (priv->cond_send_message);
1448+ }
1449+ break;
1450+ }
1451+
1452+ case FB_EVENT_QUIT:
1453+ {
1454+ g_debug ("Quit loop message %lud\n", (gulong) priv->internal_win_id);
1455+
1456+ /* exit loop */
1457+ priv->running = FALSE;
1458+
1459+ /* make sure last pendings send message calls are executed */
1460+ gst_gl_fb_queue_flush (priv->queue, priv->cond_send_message);
1461+ priv->queue = NULL;
1462+
1463+ /* Finally we can destroy opengl ressources (texture/shaders/fbo) */
1464+ if (!event->callback || !event->data)
1465+ g_debug ("destroy cb not correclty set\n");
1466+
1467+ event->callback (event->data);
1468+ g_cond_signal (priv->cond_send_message);
1469+ break;
1470+ }
1471+
1472+ case FB_EVENT_DRAW:
1473+ if (priv->draw_cb) {
1474+ priv->draw_cb (priv->draw_data);
1475+ glFlush ();
1476+ eglSwapBuffers (priv->gl_display, priv->gl_surface);
1477+ g_cond_signal (priv->cond_send_message);
1478+ }
1479+ break;
1480+
1481+ default:
1482+ g_debug ("unknown GstGLFbEvent type: %ud\n", event->type);
1483+ break;
1484+ } // switch
1485+
1486+ g_slice_free (GstGLFbEvent, event);
1487+
1488+ } // while running
1489+
1490+ g_mutex_unlock (priv->lock);
1491+
1492+ g_debug ("end loop\n");
1493+}
1494+
1495+/* Not called by the gl thread */
1496+void
1497+gst_gl_window_quit_loop (GstGLWindow * window, GstGLWindowCB callback,
1498+ gpointer data)
1499+{
1500+ if (window) {
1501+ GstGLWindowPrivate *priv = window->priv;
1502+
1503+ g_mutex_lock (priv->lock);
1504+
1505+ if (priv->running) {
1506+ GstGLFbEvent *event = g_slice_new0 (GstGLFbEvent);
1507+ event->type = FB_EVENT_QUIT;
1508+ event->callback = callback;
1509+ event->data = data;
1510+ priv->queue = g_list_append (priv->queue, event);
1511+
1512+ g_cond_signal (priv->cond_queue_message);
1513+ g_cond_wait (priv->cond_send_message, priv->lock);
1514+ }
1515+
1516+ g_mutex_unlock (priv->lock);
1517+ }
1518+}
1519+
1520+/* Not called by the gl thread */
1521+void
1522+gst_gl_window_send_message (GstGLWindow * window, GstGLWindowCB callback,
1523+ gpointer data)
1524+{
1525+ if (window) {
1526+ GstGLWindowPrivate *priv = window->priv;
1527+
1528+ g_mutex_lock (priv->lock);
1529+
1530+ if (priv->running) {
1531+ GstGLFbEvent *event = g_slice_new0 (GstGLFbEvent);
1532+ event->type = FB_EVENT_CALLBACK;
1533+ event->callback = callback;
1534+ event->data = data;
1535+ priv->queue = g_list_append (priv->queue, event);
1536+ g_cond_signal (priv->cond_queue_message);
1537+
1538+ /* block until opengl calls have been executed in the gl thread */
1539+ g_cond_wait (priv->cond_send_message, priv->lock);
1540+ }
1541+
1542+ g_mutex_unlock (priv->lock);
1543+ }
1544+}
1545+
1546+const gchar *
1547+EGLErrorString ()
1548+{
1549+ EGLint nErr = eglGetError ();
1550+ switch (nErr) {
1551+ case EGL_SUCCESS:
1552+ return "EGL_SUCCESS";
1553+ case EGL_BAD_DISPLAY:
1554+ return "EGL_BAD_DISPLAY";
1555+ case EGL_NOT_INITIALIZED:
1556+ return "EGL_NOT_INITIALIZED";
1557+ case EGL_BAD_ACCESS:
1558+ return "EGL_BAD_ACCESS";
1559+ case EGL_BAD_ALLOC:
1560+ return "EGL_BAD_ALLOC";
1561+ case EGL_BAD_ATTRIBUTE:
1562+ return "EGL_BAD_ATTRIBUTE";
1563+ case EGL_BAD_CONFIG:
1564+ return "EGL_BAD_CONFIG";
1565+ case EGL_BAD_CONTEXT:
1566+ return "EGL_BAD_CONTEXT";
1567+ case EGL_BAD_CURRENT_SURFACE:
1568+ return "EGL_BAD_CURRENT_SURFACE";
1569+ case EGL_BAD_MATCH:
1570+ return "EGL_BAD_MATCH";
1571+ case EGL_BAD_NATIVE_PIXMAP:
1572+ return "EGL_BAD_NATIVE_PIXMAP";
1573+ case EGL_BAD_NATIVE_WINDOW:
1574+ return "EGL_BAD_NATIVE_WINDOW";
1575+ case EGL_BAD_PARAMETER:
1576+ return "EGL_BAD_PARAMETER";
1577+ case EGL_BAD_SURFACE:
1578+ return "EGL_BAD_SURFACE";
1579+ default:
1580+ return "unknown";
1581+ }
1582+}
1583diff --git a/gst-libs/gst/gl/gstglwindow_x11ES2.c b/gst-libs/gst/gl/gstglwindow_x11ES2.c
1584index 260fd2e..65afb50 100644
1585--- a/gst-libs/gst/gl/gstglwindow_x11ES2.c
1586+++ b/gst-libs/gst/gl/gstglwindow_x11ES2.c
1587@@ -116,16 +116,16 @@ gst_gl_window_finalize (GObject * object)
1588
1589 if (priv->gl_context) {
1590 ret =
1591- eglMakeCurrent (priv->device, EGL_NO_SURFACE, EGL_NO_SURFACE,
1592+ eglMakeCurrent (priv->gl_display, EGL_NO_SURFACE, EGL_NO_SURFACE,
1593 EGL_NO_CONTEXT);
1594 if (!ret)
1595 g_debug ("failed to release opengl context\n");
1596
1597- eglDestroyContext (priv->device, priv->gl_context);
1598+ eglDestroyContext (priv->gl_display, priv->gl_context);
1599 }
1600
1601- if (priv->device)
1602- eglTerminate (priv->device);
1603+ if (priv->gl_display)
1604+ eglTerminate (priv->gl_display);
1605
1606 XFree (priv->visual_info);
1607
1608@@ -510,7 +510,7 @@ callback_activate_gl_context (GstGLWindowPrivate * priv)
1609 void
1610 callback_inactivate_gl_context (GstGLWindowPrivate * priv)
1611 {
1612- if (!eglMakeCurrent (priv->device, EGL_NO_SURFACE, EGL_NO_SURFACE,
1613+ if (!eglMakeCurrent (priv->gl_display, EGL_NO_SURFACE, EGL_NO_SURFACE,
1614 EGL_NO_CONTEXT))
1615 g_debug ("failed to inactivate opengl context %lud\n",
1616 (gulong) priv->gl_context);
1617@@ -622,7 +622,7 @@ gst_gl_window_draw_unlocked (GstGLWindow * window, gint width, gint height)
1618
1619 XSendEvent (priv->device, priv->internal_win_id, FALSE, ExposureMask,
1620 &event);
1621- XSync (priv->disp_send, FALSE);
1622+ XSync (priv->device, FALSE);
1623 }
1624 }
1625
1626diff --git a/gst/gl/gstglbumper.c b/gst/gl/gstglbumper.c
1627index 12efe7d..2daec5b 100644
1628--- a/gst/gl/gstglbumper.c
1629+++ b/gst/gl/gstglbumper.c
1630@@ -157,7 +157,6 @@ gst_gl_bumper_init_resources (GstGLFilter * filter)
1631
1632 png_structp png_ptr;
1633 png_infop info_ptr;
1634- guint sig_read = 0;
1635 png_uint_32 width = 0;
1636 png_uint_32 height = 0;
1637 gint bit_depth = 0;
1638@@ -209,7 +208,7 @@ gst_gl_bumper_init_resources (GstGLFilter * filter)
1639
1640 png_init_io (png_ptr, fp);
1641
1642- png_set_sig_bytes (png_ptr, sig_read);
1643+ png_set_sig_bytes (png_ptr, sizeof (magic));
1644
1645 png_read_info (png_ptr, info_ptr);
1646
1647diff --git a/gst/gl/gstglimagesink.c b/gst/gl/gstglimagesink.c
1648index d57f5b5..369d7f1 100644
1649--- a/gst/gl/gstglimagesink.c
1650+++ b/gst/gl/gstglimagesink.c
1651@@ -1,6 +1,6 @@
1652 /*
1653- * GStreamer
1654- * Copyright (C) 2003 Julien Moutte <julien@moutte.net>
1655+ * GStreamerfor
1656+ * Copyright (C) 2003 Julien Moutte <julien@moutte.net>for
1657 * Copyright (C) 2005,2006,2007 David A. Schleef <ds@schleef.org>
1658 * Copyright (C) 2008 Julien Isorce <julien.isorce@gmail.com>
1659 *
1660@@ -86,6 +86,9 @@
1661 #include <gst/interfaces/xoverlay.h>
1662
1663 #include "gstglimagesink.h"
1664+#ifdef GPU_VIVANTE
1665+#include "gstglvivante.h"
1666+#endif
1667
1668 GST_DEBUG_CATEGORY (gst_debug_glimage_sink);
1669 #define GST_CAT_DEFAULT gst_debug_glimage_sink
1670@@ -137,11 +140,13 @@ static GstStaticPadTemplate gst_glimage_sink_template =
1671 GST_PAD_SINK,
1672 GST_PAD_ALWAYS,
1673 GST_STATIC_CAPS (GST_GL_VIDEO_CAPS ";"
1674- GST_VIDEO_CAPS_RGB ";"
1675- GST_VIDEO_CAPS_RGBx ";"
1676- GST_VIDEO_CAPS_RGBA ";"
1677- GST_VIDEO_CAPS_YUV ("{ I420, YV12, YUY2, UYVY, AYUV }"))
1678- );
1679+ GST_VIDEO_CAPS_RGB ";" GST_VIDEO_CAPS_RGBx ";" GST_VIDEO_CAPS_RGBA ";"
1680+#ifdef GPU_VIVANTE
1681+ GST_VIDEO_CAPS_YUV ("{ NV12, I420, YV12, YUY2, UYVY, AYUV }")
1682+#else
1683+ GST_VIDEO_CAPS_YUV ("{ I420, YV12, YUY2, UYVY, AYUV }")
1684+#endif
1685+ ));
1686 #endif
1687
1688 enum
1689@@ -152,7 +157,8 @@ enum
1690 PROP_CLIENT_DRAW_CALLBACK,
1691 PROP_CLIENT_DATA,
1692 PROP_FORCE_ASPECT_RATIO,
1693- PROP_PIXEL_ASPECT_RATIO
1694+ PROP_PIXEL_ASPECT_RATIO,
1695+ PROP_RENDERED_FRAMES
1696 };
1697
1698 GST_BOILERPLATE_FULL (GstGLImageSink, gst_glimage_sink, GstVideoSink,
1699@@ -241,6 +247,10 @@ gst_glimage_sink_class_init (GstGLImageSinkClass * klass)
1700 "The pixel aspect ratio of the device", "1/1",
1701 G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
1702
1703+ g_object_class_install_property (gobject_class, PROP_RENDERED_FRAMES,
1704+ g_param_spec_int ("rendered", "rendered",
1705+ "Get the total rendered frames", 0, G_MAXINT, 0, G_PARAM_READABLE));
1706+
1707 gobject_class->finalize = gst_glimage_sink_finalize;
1708
1709 gstelement_class->change_state = gst_glimage_sink_change_state;
1710@@ -261,6 +271,7 @@ gst_glimage_sink_init (GstGLImageSink * glimage_sink,
1711 glimage_sink->new_window_id = 0;
1712 glimage_sink->display = NULL;
1713 glimage_sink->stored_buffer = NULL;
1714+ glimage_sink->stored_input_buffer = NULL;
1715 glimage_sink->clientReshapeCallback = NULL;
1716 glimage_sink->clientDrawCallback = NULL;
1717 glimage_sink->client_data = NULL;
1718@@ -370,6 +381,9 @@ gst_glimage_sink_get_property (GObject * object, guint prop_id,
1719 if (!g_value_transform (glimage_sink->par, value))
1720 g_warning ("Could not transform string to aspect ratio");
1721 break;
1722+ case PROP_RENDERED_FRAMES:
1723+ g_value_set_int (value, glimage_sink->rendered);
1724+ break;
1725 default:
1726 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
1727 break;
1728@@ -435,6 +449,7 @@ gst_glimage_sink_change_state (GstElement * element, GstStateChange transition)
1729
1730 return GST_STATE_CHANGE_FAILURE;
1731 }
1732+ glimage_sink->rendered = 0;
1733 }
1734 break;
1735 case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
1736@@ -456,6 +471,10 @@ gst_glimage_sink_change_state (GstElement * element, GstStateChange transition)
1737 gst_buffer_unref (GST_BUFFER_CAST (glimage_sink->stored_buffer));
1738 glimage_sink->stored_buffer = NULL;
1739 }
1740+ if (glimage_sink->stored_input_buffer) {
1741+ gst_buffer_unref (glimage_sink->stored_input_buffer);
1742+ glimage_sink->stored_input_buffer = NULL;
1743+ }
1744 if (glimage_sink->display) {
1745 g_object_unref (glimage_sink->display);
1746 glimage_sink->display = NULL;
1747@@ -533,6 +552,14 @@ gst_glimage_sink_set_caps (GstBaseSink * bsink, GstCaps * caps)
1748 if (!ok)
1749 return FALSE;
1750
1751+#ifdef GPU_VIVANTE
1752+ /* special case for format that vivante can't handle */
1753+ if (format == GST_VIDEO_FORMAT_NV12 &&
1754+ !gst_gl_vivante_check_format (glimage_sink->display->gpu_priv, format,
1755+ width, height))
1756+ return FALSE;
1757+#endif
1758+
1759 /* init colorspace conversion if needed */
1760 ok = gst_gl_display_init_upload (glimage_sink->display, format,
1761 width, height, width, height);
1762@@ -609,6 +636,11 @@ gst_glimage_sink_set_caps (GstBaseSink * bsink, GstCaps * caps)
1763 if (!glimage_sink->window_id && !glimage_sink->new_window_id)
1764 gst_x_overlay_prepare_xwindow_id (GST_X_OVERLAY (glimage_sink));
1765
1766+#ifdef GPU_VIVANTE
1767+ if (glimage_sink->display->gpu_priv)
1768+ gst_gl_vivante_set_caps (glimage_sink->display->gpu_priv, caps);
1769+#endif
1770+
1771 return TRUE;
1772 }
1773
1774@@ -617,11 +649,18 @@ gst_glimage_sink_render (GstBaseSink * bsink, GstBuffer * buf)
1775 {
1776 GstGLImageSink *glimage_sink = NULL;
1777 GstGLBuffer *gl_buffer = NULL;
1778+ gint index;
1779+ GstFlowReturn res;
1780
1781 glimage_sink = GST_GLIMAGE_SINK (bsink);
1782
1783 GST_INFO ("buffer size: %d", GST_BUFFER_SIZE (buf));
1784
1785+ if (buf == glimage_sink->stored_input_buffer)
1786+ return GST_FLOW_OK;
1787+
1788+ glimage_sink->display->upload_buf_mapped = FALSE;
1789+
1790 //is gl
1791 if (glimage_sink->is_gl) {
1792 //increment gl buffer ref before storage
1793@@ -633,9 +672,16 @@ gst_glimage_sink_render (GstBaseSink * bsink, GstBuffer * buf)
1794 gl_buffer = gst_gl_buffer_new (glimage_sink->display,
1795 glimage_sink->width, glimage_sink->height);
1796
1797- //blocking call
1798- gst_gl_display_do_upload (glimage_sink->display, gl_buffer->texture,
1799- glimage_sink->width, glimage_sink->height, GST_BUFFER_DATA (buf));
1800+ index = G_N_ELEMENTS (buf->_gst_reserved) - 1;
1801+
1802+ if (index >= 0)
1803+ //blocking call
1804+ gst_gl_display_do_upload_with_meta (glimage_sink->display,
1805+ gl_buffer->texture, glimage_sink->width, glimage_sink->height,
1806+ GST_BUFFER_DATA (buf), buf->_gst_reserved[index]);
1807+ else
1808+ gst_gl_display_do_upload (glimage_sink->display, gl_buffer->texture,
1809+ glimage_sink->width, glimage_sink->height, GST_BUFFER_DATA (buf));
1810
1811 //gl_buffer is created in this block, so the gl buffer is already referenced
1812 }
1813@@ -645,26 +691,36 @@ gst_glimage_sink_render (GstBaseSink * bsink, GstBuffer * buf)
1814 gst_gl_display_set_window_id (glimage_sink->display,
1815 glimage_sink->window_id);
1816 }
1817- //the buffer is cleared when an other comes in
1818- if (glimage_sink->stored_buffer) {
1819- gst_buffer_unref (GST_BUFFER_CAST (glimage_sink->stored_buffer));
1820- glimage_sink->stored_buffer = NULL;
1821- }
1822- //store current buffer
1823- glimage_sink->stored_buffer = gl_buffer;
1824-
1825 //redisplay opengl scene
1826 if (gl_buffer->texture &&
1827 gst_gl_display_redisplay (glimage_sink->display,
1828 gl_buffer->texture, gl_buffer->width, gl_buffer->height,
1829 glimage_sink->window_width, glimage_sink->window_height,
1830 glimage_sink->keep_aspect_ratio))
1831- return GST_FLOW_OK;
1832+ res = GST_FLOW_OK;
1833 else {
1834 GST_ELEMENT_ERROR (glimage_sink, RESOURCE, NOT_FOUND,
1835 GST_GL_DISPLAY_ERR_MSG (glimage_sink->display), (NULL));
1836- return GST_FLOW_ERROR;
1837+ res = GST_FLOW_ERROR;
1838 }
1839+
1840+ //the buffer is cleared when an other comes in
1841+ if (glimage_sink->stored_buffer) {
1842+ gst_buffer_unref (GST_BUFFER_CAST (glimage_sink->stored_buffer));
1843+ glimage_sink->stored_buffer = NULL;
1844+ }
1845+ if (glimage_sink->stored_input_buffer) {
1846+ gst_buffer_unref (glimage_sink->stored_input_buffer);
1847+ glimage_sink->stored_input_buffer = NULL;
1848+ }
1849+ //store current buffer
1850+ glimage_sink->stored_buffer = gl_buffer;
1851+ if (glimage_sink->display->upload_buf_mapped)
1852+ glimage_sink->stored_input_buffer = gst_buffer_ref (buf);
1853+
1854+ glimage_sink->rendered++;
1855+
1856+ return res;
1857 }
1858
1859
1860diff --git a/gst/gl/gstglimagesink.h b/gst/gl/gstglimagesink.h
1861index c61b5c5..bd40bc4 100644
1862--- a/gst/gl/gstglimagesink.h
1863+++ b/gst/gl/gstglimagesink.h
1864@@ -51,6 +51,7 @@ struct _GstGLImageSink
1865
1866 //properties
1867 gchar *display_name;
1868+ gint rendered;
1869
1870 gulong window_id;
1871 gulong new_window_id;
1872@@ -67,6 +68,7 @@ struct _GstGLImageSink
1873
1874 GstGLDisplay *display;
1875 GstGLBuffer *stored_buffer;
1876+ GstBuffer *stored_input_buffer;
1877
1878 CRCB clientReshapeCallback;
1879 CDCB clientDrawCallback;
1880diff --git a/gst/gl/gstglupload.c b/gst/gl/gstglupload.c
1881index 09bc96d..8e12532 100644
1882--- a/gst/gl/gstglupload.c
1883+++ b/gst/gl/gstglupload.c
1884@@ -70,6 +70,9 @@
1885
1886 #include "gstglupload.h"
1887
1888+#ifdef GPU_VIVANTE
1889+#include "gstglvivante.h"
1890+#endif
1891
1892 #define GST_CAT_DEFAULT gst_gl_upload_debug
1893 GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
1894@@ -106,10 +109,13 @@ static GstStaticPadTemplate gst_gl_upload_sink_pad_template =
1895 GST_PAD_SINK,
1896 GST_PAD_ALWAYS,
1897 GST_STATIC_CAPS (GST_VIDEO_CAPS_RGB ";"
1898- GST_VIDEO_CAPS_RGBx ";"
1899- GST_VIDEO_CAPS_RGBA ";"
1900- GST_VIDEO_CAPS_YUV ("{ I420, YV12, YUY2, UYVY, AYUV }"))
1901- );
1902+ GST_VIDEO_CAPS_RGBx ";" GST_VIDEO_CAPS_RGBA ";"
1903+#ifdef GPU_VIVANTE
1904+ GST_VIDEO_CAPS_YUV ("{ NV12, I420, YV12, YUY2, UYVY, AYUV }")
1905+#else
1906+ GST_VIDEO_CAPS_YUV ("{ I420, YV12, YUY2, UYVY, AYUV }")
1907+#endif
1908+ ));
1909 #endif
1910
1911 /* Properties */
1912@@ -504,6 +510,14 @@ gst_gl_upload_set_caps (GstBaseTransform * bt, GstCaps * incaps,
1913 GST_DEBUG ("caps connot be parsed");
1914 return FALSE;
1915 }
1916+#ifdef GPU_VIVANTE
1917+ /* special case for format that vivante can't handle */
1918+ if (upload->video_format == GST_VIDEO_FORMAT_NV12 &&
1919+ !gst_gl_vivante_check_format (upload->display->gpu_priv,
1920+ upload->video_format, upload->video_width, upload->video_height))
1921+ return FALSE;
1922+#endif
1923+
1924 //init colorspace conversion if needed
1925 ret = gst_gl_display_init_upload (upload->display, upload->video_format,
1926 upload->gl_width, upload->gl_height,
1927diff --git a/tests/examples/cocoa/videoxoverlay/Makefile.am b/tests/examples/cocoa/videoxoverlay/Makefile.am
1928index 5a85bb4..b4a4932 100755
1929--- a/tests/examples/cocoa/videoxoverlay/Makefile.am
1930+++ b/tests/examples/cocoa/videoxoverlay/Makefile.am
1931@@ -4,7 +4,7 @@ noinst_PROGRAMS = videoxoverlay
1932
1933 videoxoverlay_SOURCES = main.m
1934
1935-videoxoverlay_OBJCFLAGS=$(GST_PLUGINS_GL_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \
1936+videoxoverlay_OBJCFLAGS=$(GST_PLUGINS_GL_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_OBJCFLAGS) \
1937 $(GL_CFLAGS) -I/usr/local/include/gstreamer-0.10
1938 videoxoverlay_LDADD=$(GST_PLUGINS_GL_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) \
1939 $(GL_LIBS) -lgstinterfaces-$(GST_MAJORMINOR)
1940diff --git a/common/check.mak b/common/check.mak
1941index 30487f1..bc44620 100644
1942--- a/common/check.mak
1943+++ b/common/check.mak
1944@@ -24,6 +24,12 @@ LOOPS = 10
1945 CK_DEFAULT_TIMEOUT=20 \
1946 $*
1947
1948+# just like 'check', but don't run it again if it fails (useful for debugging)
1949+%.check-norepeat: %
1950+ @$(TESTS_ENVIRONMENT) \
1951+ CK_DEFAULT_TIMEOUT=20 \
1952+ $*
1953+
1954 # run any given test in a loop
1955 %.torture: %
1956 @for i in `seq 1 $(LOOPS)`; do \
1957@@ -152,7 +158,8 @@ help:
1958 @echo
1959 @echo "make check -- run all checks"
1960 @echo "make torture -- run all checks $(LOOPS) times"
1961- @echo "make (dir)/(test).check -- run the given check once"
1962+ @echo "make (dir)/(test).check -- run the given check once, repeat with GST_DEBUG=*:2 if it fails"
1963+ @echo "make (dir)/(test).check-norepeat -- run the given check once, but don't run it again if it fails"
1964 @echo "make (dir)/(test).forever -- run the given check forever"
1965 @echo "make (dir)/(test).torture -- run the given check $(LOOPS) times"
1966 @echo
1967diff --git a/common/gtk-doc-plugins.mak b/common/gtk-doc-plugins.mak
1968index 8cc42e7..084f9ae 100644
1969--- a/common/gtk-doc-plugins.mak
1970+++ b/common/gtk-doc-plugins.mak
1971@@ -13,8 +13,7 @@ help:
1972 @echo
1973
1974 # update the stuff maintained by doc maintainers
1975-update:
1976- $(MAKE) scanobj-update
1977+update: scanobj-update
1978 $(MAKE) check-outdated-docs
1979
1980 # We set GPATH here; this gives us semantics for GNU make
1981@@ -130,7 +129,7 @@ scanobj-build.stamp: $(SCANOBJ_DEPS) $(basefiles)
1982 --module=$(DOC_MODULE) --source=$(PACKAGE) --inspect-dir=$(INSPECT_DIR) && \
1983 echo " DOC Merging introspection data" && \
1984 $(PYTHON) \
1985- $(top_srcdir)/common/scangobj-merge.py $(DOC_MODULE); \
1986+ $(top_srcdir)/common/scangobj-merge.py $(DOC_MODULE) || exit 1; \
1987 if test x"$(srcdir)" != x. ; then \
1988 for f in $(SCANOBJ_FILES); \
1989 do \
1990diff --git a/common/m4/Makefile.am b/common/m4/Makefile.am
1991index 2ddb8a7..856d6e3 100644
1992--- a/common/m4/Makefile.am
1993+++ b/common/m4/Makefile.am
1994@@ -8,7 +8,6 @@ EXTRA_DIST = \
1995 as-gcc-inline-assembly.m4 \
1996 as-libtool.m4 \
1997 as-libtool-tags.m4 \
1998- as-objc.m4 \
1999 as-python.m4 \
2000 as-scrub-include.m4 \
2001 as-version.m4 \
2002diff --git a/common/m4/as-compiler-flag.m4 b/common/m4/as-compiler-flag.m4
2003index 882a4c7..8bb853a 100644
2004--- a/common/m4/as-compiler-flag.m4
2005+++ b/common/m4/as-compiler-flag.m4
2006@@ -62,3 +62,35 @@ AC_DEFUN([AS_CXX_COMPILER_FLAG],
2007 AC_MSG_RESULT([$flag_ok])
2008 ])
2009
2010+dnl AS_OBJC_COMPILER_FLAG(CPPFLAGS, ACTION-IF-ACCEPTED, [ACTION-IF-NOT-ACCEPTED])
2011+dnl Tries to compile with the given CPPFLAGS.
2012+dnl Runs ACTION-IF-ACCEPTED if the compiler can compile with the flags,
2013+dnl and ACTION-IF-NOT-ACCEPTED otherwise.
2014+
2015+AC_DEFUN([AS_OBJC_COMPILER_FLAG],
2016+[
2017+ AC_REQUIRE([AC_PROG_OBJC])
2018+
2019+ AC_MSG_CHECKING([to see if Objective C compiler understands $1])
2020+
2021+ save_CPPFLAGS="$CPPFLAGS"
2022+ CPPFLAGS="$CPPFLAGS $1"
2023+
2024+ AC_LANG_PUSH([Objective C])
2025+
2026+ AC_TRY_COMPILE([ ], [], [flag_ok=yes], [flag_ok=no])
2027+ CPPFLAGS="$save_CPPFLAGS"
2028+
2029+ if test "X$flag_ok" = Xyes ; then
2030+ $2
2031+ true
2032+ else
2033+ $3
2034+ true
2035+ fi
2036+
2037+ AC_LANG_POP([Objective C])
2038+
2039+ AC_MSG_RESULT([$flag_ok])
2040+])
2041+
2042diff --git a/common/m4/as-objc.m4 b/common/m4/as-objc.m4
2043deleted file mode 100644
2044index 1e7066a..0000000
2045--- a/common/m4/as-objc.m4
2046+++ /dev/null
2047@@ -1,56 +0,0 @@
2048-
2049-
2050-# AC_PROG_OBJC([LIST-OF-COMPILERS])
2051-#
2052-AC_DEFUN([AS_PROG_OBJC],
2053-[
2054-AC_CHECK_TOOLS(OBJC,
2055- [m4_default([$1], [objcc objc gcc cc CC])],
2056- none)
2057-AC_SUBST(OBJC)
2058-OBJC_LDFLAGS="-lobjc"
2059-AC_SUBST(OBJC_LDFLAGS)
2060-if test "x$OBJC" != xnone ; then
2061- _AM_DEPENDENCIES(OBJC)
2062- AC_MSG_CHECKING([if Objective C compiler works])
2063- cat >>conftest.m <<EOF
2064-#include <objc/Object.h>
2065-@interface Moo:Object
2066-{
2067-}
2068-- moo;
2069-int main();
2070-@end
2071-
2072-@implementation Moo
2073-- moo
2074-{
2075- exit(0);
2076-}
2077-
2078-int main()
2079-{
2080- id moo;
2081- moo = [[Moo new]];
2082- [[moo moo]];
2083- return 1;
2084-}
2085-@end
2086-EOF
2087- ${OBJC} conftest.m ${OBJC_LDFLAGS} >&5 2>&5
2088- if test -f a.out -o -f a.exe ; then
2089- result=yes
2090- else
2091- result=no
2092- echo failed program is: >&5
2093- cat conftest.m >&5
2094- fi
2095- rm -f conftest.m a.out a.exe
2096- AC_MSG_RESULT([$result])
2097-else
2098- _AM_DEPENDENCIES(OBJC)
2099-fi
2100-
2101-])
2102-
2103-
2104diff --git a/common/m4/gst-arch.m4 b/common/m4/gst-arch.m4
2105index 2e935d2..077a20b 100644
2106--- a/common/m4/gst-arch.m4
2107+++ b/common/m4/gst-arch.m4
2108@@ -5,32 +5,30 @@ dnl defines HOST_CPU
2109
2110 AC_DEFUN([AG_GST_ARCH],
2111 [
2112- AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use host_ variables
2113-
2114 dnl Determine CPU
2115- case "x${host_cpu}" in
2116+ case "x${target_cpu}" in
2117 xi?86 | xk? | xi?86_64)
2118- case $host_os in
2119+ case $target_os in
2120 solaris*)
2121 AC_CHECK_DECL([__i386], [I386_ABI="yes"], [I386_ABI="no"])
2122 AC_CHECK_DECL([__amd64], [AMD64_ABI="yes"], [AMD64_ABI="no"])
2123
2124 if test "x$I386_ABI" = "xyes" ; then
2125 HAVE_CPU_I386=yes
2126- AC_DEFINE(HAVE_CPU_I386, 1, [Define if the host CPU is an x86])
2127+ AC_DEFINE(HAVE_CPU_I386, 1, [Define if the target CPU is an x86])
2128 fi
2129 if test "x$AMD64_ABI" = "xyes" ; then
2130 HAVE_CPU_X86_64=yes
2131- AC_DEFINE(HAVE_CPU_X86_64, 1, [Define if the host CPU is a x86_64])
2132+ AC_DEFINE(HAVE_CPU_X86_64, 1, [Define if the target CPU is a x86_64])
2133 fi
2134 ;;
2135 *)
2136 HAVE_CPU_I386=yes
2137- AC_DEFINE(HAVE_CPU_I386, 1, [Define if the host CPU is an x86])
2138+ AC_DEFINE(HAVE_CPU_I386, 1, [Define if the target CPU is an x86])
2139
2140 dnl FIXME could use some better detection
2141 dnl (ie CPUID)
2142- case "x${host_cpu}" in
2143+ case "x${target_cpu}" in
2144 xi386 | xi486) ;;
2145 *)
2146 AC_DEFINE(HAVE_RDTSC, 1, [Define if RDTSC is available]) ;;
2147@@ -40,43 +38,43 @@ AC_DEFUN([AG_GST_ARCH],
2148 ;;
2149 xpowerpc)
2150 HAVE_CPU_PPC=yes
2151- AC_DEFINE(HAVE_CPU_PPC, 1, [Define if the host CPU is a PowerPC]) ;;
2152+ AC_DEFINE(HAVE_CPU_PPC, 1, [Define if the target CPU is a PowerPC]) ;;
2153 xpowerpc64)
2154 HAVE_CPU_PPC64=yes
2155- AC_DEFINE(HAVE_CPU_PPC64, 1, [Define if the host CPU is a 64 bit PowerPC]) ;;
2156+ AC_DEFINE(HAVE_CPU_PPC64, 1, [Define if the target CPU is a 64 bit PowerPC]) ;;
2157 xalpha*)
2158 HAVE_CPU_ALPHA=yes
2159- AC_DEFINE(HAVE_CPU_ALPHA, 1, [Define if the host CPU is an Alpha]) ;;
2160+ AC_DEFINE(HAVE_CPU_ALPHA, 1, [Define if the target CPU is an Alpha]) ;;
2161 xarm*)
2162 HAVE_CPU_ARM=yes
2163- AC_DEFINE(HAVE_CPU_ARM, 1, [Define if the host CPU is an ARM]) ;;
2164+ AC_DEFINE(HAVE_CPU_ARM, 1, [Define if the target CPU is an ARM]) ;;
2165 xsparc*)
2166 HAVE_CPU_SPARC=yes
2167- AC_DEFINE(HAVE_CPU_SPARC, 1, [Define if the host CPU is a SPARC]) ;;
2168+ AC_DEFINE(HAVE_CPU_SPARC, 1, [Define if the target CPU is a SPARC]) ;;
2169 xmips*)
2170 HAVE_CPU_MIPS=yes
2171- AC_DEFINE(HAVE_CPU_MIPS, 1, [Define if the host CPU is a MIPS]) ;;
2172+ AC_DEFINE(HAVE_CPU_MIPS, 1, [Define if the target CPU is a MIPS]) ;;
2173 xhppa*)
2174 HAVE_CPU_HPPA=yes
2175- AC_DEFINE(HAVE_CPU_HPPA, 1, [Define if the host CPU is a HPPA]) ;;
2176+ AC_DEFINE(HAVE_CPU_HPPA, 1, [Define if the target CPU is a HPPA]) ;;
2177 xs390*)
2178 HAVE_CPU_S390=yes
2179- AC_DEFINE(HAVE_CPU_S390, 1, [Define if the host CPU is a S390]) ;;
2180+ AC_DEFINE(HAVE_CPU_S390, 1, [Define if the target CPU is a S390]) ;;
2181 xia64*)
2182 HAVE_CPU_IA64=yes
2183- AC_DEFINE(HAVE_CPU_IA64, 1, [Define if the host CPU is a IA64]) ;;
2184+ AC_DEFINE(HAVE_CPU_IA64, 1, [Define if the target CPU is a IA64]) ;;
2185 xm68k*)
2186 HAVE_CPU_M68K=yes
2187- AC_DEFINE(HAVE_CPU_M68K, 1, [Define if the host CPU is a M68K]) ;;
2188+ AC_DEFINE(HAVE_CPU_M68K, 1, [Define if the target CPU is a M68K]) ;;
2189 xx86_64)
2190 HAVE_CPU_X86_64=yes
2191- AC_DEFINE(HAVE_CPU_X86_64, 1, [Define if the host CPU is a x86_64]) ;;
2192+ AC_DEFINE(HAVE_CPU_X86_64, 1, [Define if the target CPU is a x86_64]) ;;
2193 xcris)
2194 HAVE_CPU_CRIS=yes
2195- AC_DEFINE(HAVE_CPU_CRIS, 1, [Define if the host CPU is a CRIS]) ;;
2196+ AC_DEFINE(HAVE_CPU_CRIS, 1, [Define if the target CPU is a CRIS]) ;;
2197 xcrisv32)
2198 HAVE_CPU_CRISV32=yes
2199- AC_DEFINE(HAVE_CPU_CRISV32, 1, [Define if the host CPU is a CRISv32]) ;;
2200+ AC_DEFINE(HAVE_CPU_CRISV32, 1, [Define if the target CPU is a CRISv32]) ;;
2201 esac
2202
2203 dnl Determine endianness
2204@@ -98,6 +96,7 @@ AC_DEFUN([AG_GST_ARCH],
2205 AM_CONDITIONAL(HAVE_CPU_CRISV32, test "x$HAVE_CPU_CRISV32" = "xyes")
2206
2207 AC_DEFINE_UNQUOTED(HOST_CPU, "$host_cpu", [the host CPU])
2208+ AC_DEFINE_UNQUOTED(TARGET_CPU, "$target_cpu", [the target CPU])
2209 ])
2210
2211 dnl check if unaligned memory access works correctly
2212diff --git a/common/m4/gst-args.m4 b/common/m4/gst-args.m4
2213index 030e7ac..e011ed4 100644
2214--- a/common/m4/gst-args.m4
2215+++ b/common/m4/gst-args.m4
2216@@ -19,6 +19,7 @@ dnl AG_GST_ARG_ENABLE_EXTERNAL
2217 dnl AG_GST_ARG_ENABLE_EXPERIMENTAL
2218 dnl AG_GST_ARG_ENABLE_BROKEN
2219
2220+dnl AG_GST_ARG_DISABLE_FATAL_WARNINGS
2221 AC_DEFUN([AG_GST_ARG_DEBUG],
2222 [
2223 dnl debugging stuff
2224@@ -110,13 +111,13 @@ AC_DEFUN([AG_GST_ARG_GCOV],
2225 dnl if gcov is used, we do not want default -O2 CFLAGS
2226 if test "x$GST_GCOV_ENABLED" = "xyes"
2227 then
2228- CFLAGS="-O0"
2229+ CFLAGS="$CFLAGS -O0"
2230 AC_SUBST(CFLAGS)
2231- CXXFLAGS="-O0"
2232+ CXXFLAGS="$CXXFLAGS -O0"
2233 AC_SUBST(CXXFLAGS)
2234- FFLAGS="-O0"
2235+ FFLAGS="$FFLAGS -O0"
2236 AC_SUBST(FFLAGS)
2237- CCASFLAGS="-O0"
2238+ CCASFLAGS="$CCASFLAGS -O0"
2239 AC_SUBST(CCASFLAGS)
2240 AC_MSG_NOTICE([gcov enabled, setting CFLAGS and friends to $CFLAGS])
2241 fi
2242@@ -325,3 +326,20 @@ AC_DEFUN([AG_GST_ARG_ENABLE_BROKEN],
2243 AC_MSG_NOTICE([not building broken plug-ins])
2244 ])
2245 ])
2246+
2247+dnl allow people (or build tools) to override default behaviour
2248+dnl for fatal compiler warnings
2249+AC_DEFUN([AG_GST_ARG_DISABLE_FATAL_WARNINGS],
2250+[
2251+ AC_ARG_ENABLE(fatal-warnings,
2252+ AC_HELP_STRING([--disable-fatal-warnings],
2253+ [Don't turn compiler warnings into fatal errors]),
2254+ [
2255+ case "${enableval}" in
2256+ yes) FATAL_WARNINGS=yes ;;
2257+ no) FATAL_WARNINGS=no ;;
2258+ *) AC_MSG_ERROR(bad value ${enableval} for --disable-fatal-warnings) ;;
2259+ esac
2260+ ],
2261+ [FATAL_WARNINGS=$GST_GIT]) dnl Default value
2262+])
2263diff --git a/common/m4/gst-check.m4 b/common/m4/gst-check.m4
2264index 3fd3acf..f3f39b4 100644
2265--- a/common/m4/gst-check.m4
2266+++ b/common/m4/gst-check.m4
2267@@ -117,6 +117,38 @@ AC_DEFUN([AG_GST_CHECK_GST_CHECK],
2268 ])
2269
2270 dnl ===========================================================================
2271+dnl AG_GST_CHECK_UNINSTALLED_SETUP([ACTION-IF-UNINSTALLED], [ACTION-IF-NOT])
2272+dnl
2273+dnl ACTION-IF-UNINSTALLED (optional) extra actions to perform if the setup
2274+dnl is an uninstalled setup
2275+dnl ACTION-IF-NOT (optional) extra actions to perform if the setup
2276+dnl is not an uninstalled setup
2277+dnl ===========================================================================
2278+AC_DEFUN([AG_GST_CHECK_UNINSTALLED_SETUP],
2279+[
2280+ AC_MSG_CHECKING([whether this is an uninstalled GStreamer setup])
2281+ AC_CACHE_VAL(gst_cv_is_uninstalled_setup,[
2282+ gst_cv_is_uninstalled_setup=no
2283+ if (set -u; : $GST_PLUGIN_SYSTEM_PATH) 2>/dev/null ; then
2284+ if test -z "$GST_PLUGIN_SYSTEM_PATH" \
2285+ -a -n "$GST_PLUGIN_SCANNER" \
2286+ -a -n "$GST_PLUGIN_PATH" \
2287+ -a -n "$GST_REGISTRY" \
2288+ -a -n "$DYLD_LIBRARY_PATH" \
2289+ -a -n "$LD_LIBRARY_PATH"; then
2290+ gst_cv_is_uninstalled_setup=yes;
2291+ fi
2292+ fi
2293+ ])
2294+ AC_MSG_RESULT($gst_cv_is_uninstalled_setup)
2295+ if test "x$gst_cv_is_uninstalled_setup" = "xyes"; then
2296+ ifelse([$1], , :, [$1])
2297+ else
2298+ ifelse([$2], , :, [$2])
2299+ fi
2300+])
2301+
2302+dnl ===========================================================================
2303 dnl AG_GST_CHECK_GST_PLUGINS_BASE([GST-MAJORMINOR], [MIN-VERSION], [REQUIRED])
2304 dnl
2305 dnl Sets GST_PLUGINS_BASE_CFLAGS and GST_PLUGINS_BASE_LIBS.
2306diff --git a/common/m4/gst-error.m4 b/common/m4/gst-error.m4
2307index f8f2364..e12a04c 100644
2308--- a/common/m4/gst-error.m4
2309+++ b/common/m4/gst-error.m4
2310@@ -196,6 +196,91 @@ AC_DEFUN([AG_GST_SET_ERROR_CXXFLAGS],
2311 AC_MSG_NOTICE([set ERROR_CXXFLAGS to $ERROR_CXXFLAGS])
2312 ])
2313
2314+dnl Sets WARNING_OBJCFLAGS and ERROR_OBJCFLAGS to something the compiler
2315+dnl will accept and AC_SUBST them so they are available in Makefile
2316+dnl
2317+dnl WARNING_OBJCFLAGS will contain flags to make the compiler emit more
2318+dnl warnings.
2319+dnl ERROR_OBJCFLAGS will contain flags to make those warnings fatal,
2320+dnl unless ADD-WERROR is set to "no"
2321+dnl
2322+dnl If MORE_FLAGS is set, tries to add each of the given flags
2323+dnl to WARNING_CFLAGS if the compiler supports them. Each flag is
2324+dnl tested separately.
2325+dnl
2326+dnl These flags can be overridden at make time:
2327+dnl make ERROR_OBJCFLAGS=
2328+AC_DEFUN([AG_GST_SET_ERROR_OBJCFLAGS],
2329+[
2330+ AC_REQUIRE([AC_PROG_OBJC])
2331+ AC_REQUIRE([AS_OBJC_COMPILER_FLAG])
2332+
2333+ ERROR_OBJCFLAGS=""
2334+ WARNING_OBJCFLAGS=""
2335+
2336+ dnl if we support -Wall, set it unconditionally
2337+ AS_OBJC_COMPILER_FLAG(-Wall, WARNING_OBJCFLAGS="$WARNING_OBJCFLAGS -Wall")
2338+
2339+ dnl if asked for, add -Werror if supported
2340+ if test "x$1" != "xno"
2341+ then
2342+ AS_OBJC_COMPILER_FLAG(-Werror, ERROR_OBJCFLAGS="$ERROR_OBJCFLAGS -Werror")
2343+
2344+ if test "x$ERROR_OBJCFLAGS" != "x"
2345+ then
2346+ dnl Add -fno-strict-aliasing for GLib versions before 2.19.8
2347+ dnl as before G_LOCK and friends caused strict aliasing compiler
2348+ dnl warnings.
2349+ PKG_CHECK_EXISTS([glib-2.0 < 2.19.8], [
2350+ AS_OBJC_COMPILER_FLAG([-fno-strict-aliasing],
2351+ ERROR_OBJCFLAGS="$ERROR_OBJCFLAGS -fno-strict-aliasing")
2352+ ])
2353+ else
2354+ dnl if -Werror isn't suported, try -errwarn=%all
2355+ AS_OBJC_COMPILER_FLAG([-errwarn=%all], ERROR_OBJCFLAGS="$ERROR_OBJCFLAGS -errwarn=%all")
2356+ if test "x$ERROR_OBJCFLAGS" != "x"; then
2357+ dnl try -errwarn=%all,no%E_EMPTY_DECLARATION,
2358+ dnl no%E_STATEMENT_NOT_REACHED,no%E_ARGUEMENT_MISMATCH,
2359+ dnl no%E_MACRO_REDEFINED (Sun Forte case)
2360+ dnl For Forte we need disable "empty declaration" warning produced by un-needed semicolon
2361+ dnl "statement not reached" disabled because there is g_assert_not_reached () in some places
2362+ dnl "macro redefined" because of gst/gettext.h
2363+ dnl FIXME: is it really supposed to be 'ARGUEMENT' and not 'ARGUMENT'?
2364+ dnl FIXME: do any of these work with the c++ compiler? if not, why
2365+ dnl do we check at all?
2366+ for f in 'no%E_EMPTY_DECLARATION' \
2367+ 'no%E_STATEMENT_NOT_REACHED' \
2368+ 'no%E_ARGUEMENT_MISMATCH' \
2369+ 'no%E_MACRO_REDEFINED' \
2370+ 'no%E_LOOP_NOT_ENTERED_AT_TOP'
2371+ do
2372+ AS_OBJC_COMPILER_FLAG([-errwarn=%all,$f], ERROR_OBJCFLAGS="$ERROR_OBJCFLAGS,$f")
2373+ done
2374+ fi
2375+ fi
2376+ fi
2377+
2378+ if test "x$2" != "x"
2379+ then
2380+ UNSUPPORTED=""
2381+ list="$2"
2382+ for each in $list
2383+ do
2384+ AS_OBJC_COMPILER_FLAG($each,
2385+ WARNING_OBJCFLAGS="$WARNING_OBJCFLAGS $each",
2386+ UNSUPPORTED="$UNSUPPORTED $each")
2387+ done
2388+ if test "X$UNSUPPORTED" != X ; then
2389+ AC_MSG_NOTICE([unsupported compiler flags: $UNSUPPORTED])
2390+ fi
2391+ fi
2392+
2393+ AC_SUBST(WARNING_OBJCFLAGS)
2394+ AC_SUBST(ERROR_OBJCFLAGS)
2395+ AC_MSG_NOTICE([set WARNING_OBJCFLAGS to $WARNING_OBJCFLAGS])
2396+ AC_MSG_NOTICE([set ERROR_OBJCFLAGS to $ERROR_OBJCFLAGS])
2397+])
2398+
2399 dnl Sets the default error level for debugging messages
2400 AC_DEFUN([AG_GST_SET_LEVEL_DEFAULT],
2401 [
2402diff --git a/common/m4/gst-feature.m4 b/common/m4/gst-feature.m4
2403index c072c79..cff7f30 100644
2404--- a/common/m4/gst-feature.m4
2405+++ b/common/m4/gst-feature.m4
2406@@ -232,10 +232,11 @@ AC_DEFUN([AG_GST_CHECK_GST_DEBUG_DISABLED],
2407 save_CFLAGS="$CFLAGS"
2408 CFLAGS="$GST_CFLAGS $CFLAGS"
2409 AC_COMPILE_IFELSE([
2410+ AC_LANG_SOURCE([[
2411 #include <gst/gstconfig.h>
2412 #ifdef GST_DISABLE_GST_DEBUG
2413 #error "debugging disabled, make compiler fail"
2414- #endif], [ debug_system_enabled=yes], [debug_system_enabled=no])
2415+ #endif]])], [ debug_system_enabled=yes], [debug_system_enabled=no])
2416 CFLAGS="$save_CFLAGS"
2417 AC_LANG_POP([C])
2418
2419diff --git a/common/m4/gst.m4 b/common/m4/gst.m4
2420index ddfde51..d4c53cb 100644
2421--- a/common/m4/gst.m4
2422+++ b/common/m4/gst.m4
2423@@ -3,10 +3,15 @@ dnl sets up use of GStreamer configure.ac macros
2424 dnl all GStreamer autoconf macros are prefixed
2425 dnl with AG_GST_ for public macros
2426 dnl with _AG_GST_ for private macros
2427+dnl
2428+dnl We call AC_CANONICAL_TARGET and AC_CANONICAL_HOST so that
2429+dnl it is valid before AC_ARG_PROGRAM is called
2430
2431 AC_DEFUN([AG_GST_INIT],
2432 [
2433 m4_pattern_forbid(^_?AG_GST_)
2434+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use host_ variables
2435+ AC_REQUIRE([AC_CANONICAL_TARGET]) dnl we use target_ variables
2436 ])
2437
2438 dnl AG_GST_PKG_CONFIG_PATH
diff --git a/recipes-multimedia/gstreamer/gst-plugins-gl_%.bbappend b/recipes-multimedia/gstreamer/gst-plugins-gl_%.bbappend
new file mode 100644
index 0000000..44a4b92
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gst-plugins-gl_%.bbappend
@@ -0,0 +1,11 @@
1# gst-plugins-gl for imx6 Vivante
2
3FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
4
5DEPENDS_append_mx6 = " gst-fsl-plugin gpu-viv-bin-mx6q"
6
7SRC_URI_append_mx6 = " file://IMX_MMCODEC_3.0.35_4.0.0.patch"
8
9CFLAGS_append_mx6 = " -DGLIB_DISABLE_DEPRECATION_WARNINGS -UG_DISABLE_DEPRECATED"
10
11PACKAGE_ARCH_mx6 = "${MACHINE_ARCH}"
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend
new file mode 100644
index 0000000..8be11a2
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend
@@ -0,0 +1,7 @@
1# Vivante EGL headers require the correct preprocessor
2# defines to be set for each platform
3CFLAGS_append_mx6 = " -DLINUX \
4 ${@base_contains('DISTRO_FEATURES', 'x11', '', \
5 base_contains('DISTRO_FEATURES', 'wayland', '-DEGL_API_FB -DEGL_API_WL', \
6 base_contains('DISTRO_FEATURES', 'directfb', '-DEGL_API_DFB', \
7 '-DEGL_API_FB', d),d),d)}"
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_0.9.6.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_0.9.6.bb
new file mode 100644
index 0000000..71d95f1
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_0.9.6.bb
@@ -0,0 +1,33 @@
1DESCRIPTION = "GStreamer 1.0 plugins for i.MX platforms"
2LICENSE = "LGPLv2+"
3LIC_FILES_CHKSUM = "file://LICENSE;md5=55ca817ccb7d5b5b66355690e9abc605"
4SECTION = "multimedia"
5DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base libfslvpuwrap virtual/kernel virtual/egl \
6 virtual/libgles2 ${@base_contains('DISTRO_FEATURES', 'x11', 'virtual/libx11', '', d)}"
7
8SRCBRANCH ?= "master"
9SRCREV = "67ea62069fca79d65bf244e98ff568d39399fdaf"
10SRC_URI = "git://github.com/Freescale/gstreamer-imx.git;branch=${SRCBRANCH}"
11
12S = "${WORKDIR}/git"
13
14inherit waf
15
16# configure the eglvivsink element to use the appropiate EGL platform code
17# X11 if x11 is present in DISTRO_FEATURES
18# Wayland if x11 is not present in DISTRO_FEATURES, but wayland is
19# Framebuffer otherwise
20EGLVIVSINK_PLATFORM = "${@base_contains('DISTRO_FEATURES', 'x11', 'x11', \
21 base_contains('DISTRO_FEATURES', 'wayland', 'wayland', \
22 'fb', d),d)}"
23
24EXTRA_OECONF = "--egl-platform=${EGLVIVSINK_PLATFORM} --kernel-headers=${STAGING_KERNEL_DIR}/include"
25
26# LIBV is used by gst-plugins-package.inc to specify the GStreamer version (0.10 vs 1.0)
27LIBV = "1.0"
28require recipes-multimedia/gstreamer/gst-plugins-package.inc
29
30# the following line is required to produce one package for each plugin
31PACKAGES_DYNAMIC = "^${PN}-.*"
32
33COMPATIBLE_MACHINE = "(mx6)"
diff --git a/recipes-multimedia/libfslcodec/libfslcodec.inc b/recipes-multimedia/libfslcodec/libfslcodec.inc
new file mode 100644
index 0000000..8ce80bc
--- /dev/null
+++ b/recipes-multimedia/libfslcodec/libfslcodec.inc
@@ -0,0 +1,84 @@
1# Copyright (C) 2012-2014 Freescale Semiconductor
2# Released under the MIT license (see COPYING.MIT for the terms)
3DESCRIPTION = "Freescale Multimedia codec libs"
4LICENSE = "Proprietary"
5SECTION = "multimedia"
6LIC_FILES_CHKSUM = "file://EULA.txt;md5=93b784b1c11b3fffb1638498a8dde3f6"
7
8inherit fsl-eula-unpack autotools pkgconfig
9
10SRC_URI = "${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true"
11
12PACKAGES_DYNAMIC = "${PN}-*"
13INHIBIT_PACKAGE_STRIP = "1"
14INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
15
16PACKAGES += "${PN}-meta ${PN}-test-bin ${PN}-test-source"
17
18ALLOW_EMPTY_${PN} = "1"
19ALLOW_EMPTY_${PN}-meta = "1"
20
21# Choose between Soft Float-Point and Hard Float-Point
22EXTRA_OECONF = "${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '--enable-fhw', '', d)}"
23
24# VPU Hardware acceleration
25VPU_SUPPORT = "--disable-vpu"
26VPU_SUPPORT_mx6 = "--enable-vpu"
27VPU_SUPPORT_mx6sl = "--disable-vpu"
28VPU_SUPPORT_mx5 = "--enable-vpu"
29EXTRA_OECONF += "${VPU_SUPPORT}"
30
31do_install_append() {
32 # FIXME: This link points to nowhere
33 rm ${D}${libdir}/imx-mm/audio-codec/lib_src_ppp_arm11_elinux.so
34
35 # LTIB move the files around or gst-fsl-plugin won't find them
36 for p in $(find ${D}${libdir}/imx-mm -mindepth 2 -maxdepth 2 -not -type d); do
37 mv $p ${D}${libdir}
38 done
39 rmdir ${D}${libdir}/imx-mm/video-codec
40
41}
42
43python populate_packages_prepend() {
44 codecdir = bb.data.expand('${libdir}', d)
45 do_split_packages(d, codecdir, '^lib_([^_]*).*_arm.*_elinux\.so\..*',
46 aux_files_pattern='${libdir}/imx-mm/audio-codec/wrap/lib_%sd_wrap_arm*_elinux.so.*',
47 output_pattern='libfslcodec-%s',
48 description='Freescale i.MX Codec (%s)',
49 extra_depends='')
50
51 # FIXME: All binaries lack GNU_HASH in elf binary but as we don't have
52 # the source we cannot fix it. Disable the insane check for now.
53 for p in d.getVar('PACKAGES', True).split():
54 d.setVar("DEBIAN_NOAUTONAME_%s" % p, "1")
55
56 if p == 'libfslcodec-test-bin':
57 # FIXME: includes the DUT .so files so we need to deploy those
58 d.setVar("INSANE_SKIP_%s" % p, "ldflags textrel libdir")
59 else:
60 d.setVar("INSANE_SKIP_%s" % p, "ldflags textrel")
61
62 # Allow addition of all codecs in a image; useful specially for
63 # debugging.
64 codec_pkgs = oe.utils.packages_filter_out_system(d)
65 codec_pkgs = filter(lambda x: x not in ['libfslcodec-test-bin', 'libfslcodec-test-source'],
66 codec_pkgs)
67 d.appendVar('RDEPENDS_libfslcodec-meta', ' ' + ' '.join(codec_pkgs))
68}
69
70# Ensure we get warnings if we miss something
71FILES_${PN} = ""
72
73FILES_${PN}-dev += "${libdir}/imx-mm/*/*${SOLIBSDEV} \
74 ${libdir}/imx-mm/*/*/*${SOLIBSDEV} \
75 ${libdir}/pkgconfig/*.pc ${includedir}/imx-mm/*"
76
77FILES_${PN}-test-bin += "${datadir}/imx-mm/*/examples/*/bin"
78
79FILES_${PN}-test-source += "${datadir}/imx-mm/*"
80
81# FIXME: The wrap and lib names does not match
82FILES_${PN}-oggvorbis += "${libdir}/imx-mm/audio-codec/wrap/lib_vorbisd_wrap_arm*_elinux.so.*"
83
84PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/recipes-multimedia/libfslcodec/libfslcodec_3.0.11.bb b/recipes-multimedia/libfslcodec/libfslcodec_3.0.11.bb
new file mode 100644
index 0000000..3c408f9
--- /dev/null
+++ b/recipes-multimedia/libfslcodec/libfslcodec_3.0.11.bb
@@ -0,0 +1,9 @@
1# Copyright (C) 2013, 2014 Freescale Semiconductor
2# Released under the MIT license (see COPYING.MIT for the terms)
3
4require libfslcodec.inc
5
6SRC_URI[md5sum] = "dd44ca15b88b79f8f958380bdf94a753"
7SRC_URI[sha256sum] = "510b5362f7e357f05d4c9c059c2688733aa5df617d357c7c55e2ca3fa4be8654"
8
9COMPATIBLE_MACHINE = "(mxs|mx5|mx6)"
diff --git a/recipes-multimedia/libfslparser/libfslparser.inc b/recipes-multimedia/libfslparser/libfslparser.inc
new file mode 100644
index 0000000..3e2a004
--- /dev/null
+++ b/recipes-multimedia/libfslparser/libfslparser.inc
@@ -0,0 +1,30 @@
1# Copyright (C) 2012-2013 Freescale Semiconductor
2# Released under the MIT license (see COPYING.MIT for the terms)
3DESCRIPTION = "Freescale Multimedia parser libs"
4LICENSE = "Proprietary"
5SECTION = "multimedia"
6LIC_FILES_CHKSUM = "file://COPYING;md5=93b784b1c11b3fffb1638498a8dde3f6"
7
8inherit fsl-eula-unpack autotools pkgconfig
9
10SRC_URI = "${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true"
11
12# Choose between Soft Float-Point and Hard Float-Point
13EXTRA_OECONF = "${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '--enable-fhw', '--enable-fsw', d)}"
14
15INHIBIT_PACKAGE_STRIP = "1"
16INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
17
18python populate_packages_prepend() {
19 # FIXME: All binaries lack GNU_HASH in elf binary but as we don't have
20 # the source we cannot fix it. Disable the insane check for now.
21 # FIXME: gst-fsl-plugin looks for the .so files so we need to deploy those
22 for p in d.getVar('PACKAGES', True).split():
23 d.setVar("INSANE_SKIP_%s" % p, "ldflags dev-so textrel")
24}
25
26# FIXME: gst-fsl-plugin looks for the .so files so we need to deploy those
27FILES_${PN} += "${libdir}/imx-mm/*/*${SOLIBS} ${libdir}/imx-mm/*/*${SOLIBSDEV}"
28
29PACKAGE_ARCH = "${MACHINE_ARCH}"
30
diff --git a/recipes-multimedia/libfslparser/libfslparser_3.0.11.bb b/recipes-multimedia/libfslparser/libfslparser_3.0.11.bb
new file mode 100644
index 0000000..cd4fe4a
--- /dev/null
+++ b/recipes-multimedia/libfslparser/libfslparser_3.0.11.bb
@@ -0,0 +1,9 @@
1# Copyright (C) 2013, 2014 Freescale Semiconductor
2# Released under the MIT license (see COPYING.MIT for the terms)
3
4require libfslparser.inc
5
6SRC_URI[md5sum] = "d141c9e0b8221a306db4b1e161fd8e04"
7SRC_URI[sha256sum] = "921a5f6dab239eadd08dc7ac1f36d666cf76cf61c6cd32ab9d68069986ea7c96"
8
9COMPATIBLE_MACHINE = "(mxs|mx5|mx6)"
diff --git a/recipes-multimedia/libfslvpuwrap/libfslvpuwrap/0001-vpu_wrapper-fix-tests-of-return-value-from-IOGetVirt.patch b/recipes-multimedia/libfslvpuwrap/libfslvpuwrap/0001-vpu_wrapper-fix-tests-of-return-value-from-IOGetVirt.patch
new file mode 100644
index 0000000..ccd2d9e
--- /dev/null
+++ b/recipes-multimedia/libfslvpuwrap/libfslvpuwrap/0001-vpu_wrapper-fix-tests-of-return-value-from-IOGetVirt.patch
@@ -0,0 +1,41 @@
1From 7ca66c10c05168c7d342df7c7a70d4a1ae0629f7 Mon Sep 17 00:00:00 2001
2From: Eric Nelson <eric.nelson@boundarydevices.com>
3Date: Sat, 28 Jun 2014 09:45:09 -0700
4Subject: [PATCH] vpu_wrapper: fix tests of return value from IOGetVirtMem
5
6IOGetVirtMem() returns a pointer or specifically -1 (MAP_FAILED)
7in the case of failure.
8
9Upstream-Status: Pending
10
11Signed-off-by: Laci Tele <laci@boundarydevices.com>
12Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
13---
14 vpu_wrapper.c | 4 ++--
15 1 file changed, 2 insertions(+), 2 deletions(-)
16
17diff --git a/vpu_wrapper.c b/vpu_wrapper.c
18index 9249174..148c5df 100755
19--- a/vpu_wrapper.c
20+++ b/vpu_wrapper.c
21@@ -6653,7 +6653,7 @@ VpuDecRetCode VPU_DecGetMem(VpuMemDesc* pInOutMem)
22 return VPU_DEC_RET_FAILURE;
23 }
24 ret=IOGetVirtMem(&buff);
25- if(ret==0) //if(ret!=RETCODE_SUCCESS)
26+ if(ret == -1) //if(ret==MAP_FAILED)
27 {
28 VPU_ERROR("%s: get virtual memory failure: size=%d, ret=%d \r\n",__FUNCTION__,buff.size,ret);
29 return VPU_DEC_RET_FAILURE;
30@@ -8277,7 +8277,7 @@ VpuEncRetCode VPU_EncGetMem(VpuMemDesc* pInOutMem)
31 return VPU_ENC_RET_FAILURE;
32 }
33 ret=IOGetVirtMem(&buff);
34- if(ret==0) //if(ret!=RETCODE_SUCCESS)
35+ if(ret == -1) //if(ret==MAP_FAILED)
36 {
37 VPU_ENC_ERROR("%s: get virtual memory failure: size=%d, ret=%d \r\n",__FUNCTION__,buff.size,(UINT32)ret);
38 return VPU_ENC_RET_FAILURE;
39--
401.9.1
41
diff --git a/recipes-multimedia/libfslvpuwrap/libfslvpuwrap_1.0.46.bb b/recipes-multimedia/libfslvpuwrap/libfslvpuwrap_1.0.46.bb
new file mode 100644
index 0000000..8cc1523
--- /dev/null
+++ b/recipes-multimedia/libfslvpuwrap/libfslvpuwrap_1.0.46.bb
@@ -0,0 +1,23 @@
1# Copyright (C) 2013, 2014 Freescale Semiconductor
2# Released under the MIT license (see COPYING.MIT for the terms)
3DESCRIPTION = "Freescale Multimedia VPU wrapper"
4DEPENDS = "imx-vpu"
5LICENSE = "Proprietary"
6SECTION = "multimedia"
7LIC_FILES_CHKSUM = "file://EULA.txt;md5=93b784b1c11b3fffb1638498a8dde3f6"
8
9SRC_URI = "${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true"
10SRC_URI[md5sum] = "1f50110cb6de8ebf767fb9c5f8baf20d"
11SRC_URI[sha256sum] = "7fc1258de338339d19a1a35167393fdc4d773682dfd9b951b197403a075f85fd"
12
13SRC_URI_append = " file://0001-vpu_wrapper-fix-tests-of-return-value-from-IOGetVirt.patch"
14
15inherit fsl-eula-unpack autotools pkgconfig
16
17do_install_append() {
18 # FIXME: Drop examples for now
19 rm -r ${D}${datadir}/imx-mm
20}
21
22PACKAGE_ARCH = "${MACHINE_ARCH}"
23COMPATIBLE_MACHINE = "(mx6q|mx6dl)"