Merge branch 'tizen_gst_1.19.3' into tizen_gst_1.20.0 96/270596/4
authorGilbok Lee <gilbok.lee@samsung.com>
Mon, 7 Feb 2022 01:09:35 +0000 (10:09 +0900)
committerGilbok Lee <gilbok.lee@samsung.com>
Mon, 7 Feb 2022 04:46:24 +0000 (13:46 +0900)
Change-Id: I4a331bbd883e5f078684fd02948d8d6e9b78eed0

57 files changed:
1  2 
packaging/gstreamer.spec
subprojects/gst-libav/ext/libav/gstavaudenc.c
subprojects/gst-libav/ext/libav/gstavcodecmap.c
subprojects/gst-libav/meson.build
subprojects/gst-omx/meson.build
subprojects/gst-plugins-bad/ext/soundtouch/gstpitch.cc
subprojects/gst-plugins-bad/ext/wayland/wldisplay.c
subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c
subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.h
subprojects/gst-plugins-bad/gst/id3tag/id3tag.c
subprojects/gst-plugins-bad/gst/videoparsers/gsth264parse.c
subprojects/gst-plugins-bad/meson.build
subprojects/gst-plugins-bad/sys/applemedia/vtenc.c
subprojects/gst-plugins-base/gst-libs/gst/tag/gsttagdemux.c
subprojects/gst-plugins-base/gst-libs/gst/video/meson.build
subprojects/gst-plugins-base/gst-libs/gst/video/video-converter.c
subprojects/gst-plugins-base/gst-libs/gst/video/video-info.c
subprojects/gst-plugins-base/gst-libs/gst/video/videooverlay.c
subprojects/gst-plugins-base/gst/playback/gstdecodebin2.c
subprojects/gst-plugins-base/gst/playback/gsturidecodebin3.c
subprojects/gst-plugins-base/meson.build
subprojects/gst-plugins-base/meson_options.txt
subprojects/gst-plugins-good/ext/soup/gstsouphttpsrc.c
subprojects/gst-plugins-good/ext/soup/gstsouphttpsrc.h
subprojects/gst-plugins-good/ext/soup/gstsouploader.c
subprojects/gst-plugins-good/ext/soup/gstsouploader.h
subprojects/gst-plugins-good/ext/vpx/gstvpxdec.c
subprojects/gst-plugins-good/gst/isomp4/qtdemux.c
subprojects/gst-plugins-good/gst/isomp4/qtdemux.h
subprojects/gst-plugins-good/gst/matroska/matroska-demux.c
subprojects/gst-plugins-good/gst/rtpmanager/gstrtpbin.c
subprojects/gst-plugins-good/gst/rtsp/gstrtspsrc.c
subprojects/gst-plugins-good/meson.build
subprojects/gst-plugins-good/sys/v4l2/ext/videodev2.h
subprojects/gst-plugins-good/sys/v4l2/gstv4l2bufferpool.c
subprojects/gst-plugins-good/sys/v4l2/gstv4l2bufferpool.h
subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c
subprojects/gst-plugins-good/sys/v4l2/gstv4l2videodec.c
subprojects/gst-plugins-good/sys/v4l2/v4l2_calls.c
subprojects/gst-plugins-ugly/meson.build
subprojects/gst-rtsp-server/NEWS
subprojects/gst-rtsp-server/gst-rtsp-server.doap
subprojects/gst-rtsp-server/gst/rtsp-server/meson.build
subprojects/gst-rtsp-server/gst/rtsp-server/rtsp-stream.c
subprojects/gstreamer/gst/gstbin.c
subprojects/gstreamer/gst/gstelement.c
subprojects/gstreamer/gst/gstelementfactory.c
subprojects/gstreamer/gst/gstelementfactory.h
subprojects/gstreamer/gst/gstinfo.c
subprojects/gstreamer/gst/gstquery.c
subprojects/gstreamer/libs/gst/base/gstbaseparse.c
subprojects/gstreamer/libs/gst/base/gstbaseparse.h
subprojects/gstreamer/libs/gst/base/gstbasesrc.c
subprojects/gstreamer/libs/gst/base/gstbasesrc.h
subprojects/gstreamer/meson.build
subprojects/gstreamer/meson_options.txt
subprojects/gstreamer/plugins/elements/gsttypefindelement.c

index 0000000,f98a424..eb33fd9
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,1201 +1,1200 @@@
 -Version:        1.19.3
+ %bcond_with x
+ %bcond_with wayland
+ %define gst_branch 1.0
+ %define _lib_gstreamer_dir %{_libdir}/gstreamer-%{gst_branch}
+ %define _lib_girepository %{_libdir}/girepository-%{gst_branch}
+ #######################################################################
+ ## 'plugin' macro :
+ ## 'plugin' is user defined macro to build each plugin seperately
+ ## add define option at gbs build cmd like [ --define "plugin bad" ]
+ ## if not, all the source code in subprojects will be built
+ #######################################################################
+ %if 0%{?plugin:1}
+   %if "%{plugin}" == "core"
+     %define _name gstreamer
+     %define _core_opt ""
+   %endif
+   %if "%{plugin}" == "base" || "%{plugin}" == "good" || "%{plugin}" == "bad" || "%{plugin}" == "ugly"
+     %define _name gst-plugins-%{plugin}
+     %define _base_opt ""
+     %define _good_opt ""
+     %define _bad_opt ""
+     %define _ugly_opt ""
+   %endif
+   %if "%{plugin}" == "omx" || "%{plugin}" == "libav"
+     %define _name gst-%{plugin}
+     %define _omx_opt ""
+     %define _libav_opt ""
+   %endif
+   %if "%{plugin}" == "rs"
+     %define _name gst-rtsp-server
+     %define _rs_opt ""
+   %endif
+   %if "%{plugin}" == "es"
+     %define _name gst-editing-services
+     %define _es_opt ""
+   %endif
+   %define _source_path subprojects/%{_name}
+ %else
+   %define plugin all
+   %define _name gstreamer
+   %define _source_path .
+   # plugin option prefix
+   %define _core_opt gstreamer:
+   %define _base_opt gst-plugins-base:
+   %define _good_opt gst-plugins-good:
+   %define _bad_opt gst-plugins-bad:
+   %define _ugly_opt gst-plugins-ugly:
+   %define _omx_opt gst-omx:
+   %define _libav_opt gst-libav:
+   %define _rs_opt gst-rtsp-server:
+   %define _es_opt gst-editing-services:
+ %endif
+ Name:           %{_name}
 -  -D introspection=enabled \
++Version:        1.20.0
+ Release:        0
+ Summary:        Streaming-Media Framework Runtime
+ License:        LGPL-2.0+
+ Group:          Multimedia/Framework
+ Url:            http://gstreamer.freedesktop.org/
+ Source0:        gstreamer-%{version}.tar.xz
+ Source1001:     gstreamer.manifest
+ BuildRequires:  meson >= 0.59.0
+ BuildRequires:  gettext-tools
+ BuildRequires:  pkgconfig(glib-2.0) >= 2.32.0
+ %if "%{plugin}" == "all" || "%{plugin}" == "core"
+ BuildRequires:  bison
+ BuildRequires:  fdupes
+ BuildRequires:  flex
+ BuildRequires:  libtool
+ BuildRequires:  pkgconfig(dlog)
+ BuildRequires:  pkgconfig(gobject-introspection-1.0) >= 1.31.1
+ BuildRequires:  pkgconfig(libxml-2.0)
+ %description -n gstreamer
+ GStreamer is a streaming-media framework, based on graphs of filters
+ which operate on media data. Applications using this library can do
+ anything from real-time sound processing to playing videos, and just
+ about anything else media-related.  Its plug-in-based architecture
+ means that new data types or processing capabilities can be added by
+ installing new plug-ins.
+ %package -n gstreamer-utils
+ Summary:        Streaming-Media Framework Runtime
+ Group:          Multimedia/Framework
+ Provides:       gstreamer:%{_bindir}/gst-launch-%{gst_branch} = %{version}
+ # Symbol for unversioned wrappers:
+ Provides:       gstreamer-utils_versioned = %{version}
+ %description -n gstreamer-utils
+ GStreamer is a streaming-media framework, based on graphs of filters
+ which operate on media data. Applications using this library can do
+ anything from real-time sound processing to playing videos, and just
+ about anything else media-related.  Its plug-in-based architecture
+ means that new data types or processing capabilities can be added by
+ installing new plug-ins.
+ %package -n gstreamer-devel
+ Summary:        Include Files and Libraries mandatory for Development
+ Group:          Development/Libraries
+ # gstreamer-utils is required for the gstreamer-provides rpm magic.
+ Requires:       gstreamer-utils = %{version}
+ Requires:       gstreamer = %{version}
+ %description -n gstreamer-devel
+ This package contains all necessary include files and libraries needed
+ to develop applications that require these.
+ %else
+ BuildRequires:  gstreamer-devel >= %{version}
+ #BuildRequires:  pkgconfig(gstreamer-1.0)
+ %if "%{plugin}" != "base"
+ BuildRequires:  gst-plugins-base-devel >= %{version}
+ #BuildRequires:  pkgconfig(gstreamer-plugins-base-1.0)
+ %endif
+ %endif
+ #######################################################
+ ## Package info of Base Plugin
+ #######################################################
+ %if "%{plugin}" == "all"
+ %package -n gst-plugins-base
+ Summary:        GStreamer Streaming-Media Framework Plug-Ins
+ Group:          Multimedia/Framework
+ %endif
+ %if "%{plugin}" == "all" || "%{plugin}" == "base"
+ BuildRequires:  orc >= 0.4.16
+ BuildRequires:  python
+ BuildRequires:  pkgconfig(alsa) >= 0.9.1
+ BuildRequires:  pkgconfig(freetype2) >= 2.0.9
+ BuildRequires:  pkgconfig(gobject-introspection-1.0) >= 1.31.1
+ BuildRequires:  pkgconfig(libdrm)
+ BuildRequires:  pkgconfig(libtbm)
+ BuildRequires:  pkgconfig(libxml-2.0)
+ BuildRequires:  pkgconfig(ogg) >= 1.0
+ BuildRequires:  pkgconfig(opus)
+ BuildRequires:  pkgconfig(theoradec) >= 1.1
+ BuildRequires:  pkgconfig(theoraenc) >= 1.1
+ BuildRequires:  pkgconfig(vorbis) >= 1.0
+ BuildRequires:  pkgconfig(vorbisenc) >= 1.0
+ BuildRequires:  pkgconfig(zlib)
+ %if "%{tizen_profile_name}" != "tv"
+ BuildRequires:  update-desktop-files
+ %endif
+ %if %{with wayland}
+ %if 0%{?enable_gl:1}
+ BuildRequires:  pkgconfig(gles20)
+ BuildRequires:  pkgconfig(wayland-egl) >= 9.0
+ %endif # wayland
+ %endif # gl
+ %if %{with x}
+ BuildRequires:  pkgconfig(dri2proto)
+ BuildRequires:  pkgconfig(libdri2)
+ BuildRequires:  pkgconfig(ice)
+ BuildRequires:  pkgconfig(sm)
+ BuildRequires:  pkgconfig(xext)
+ BuildRequires:  pkgconfig(xv)
+ BuildRequires:  pkgconfig(xfixes)
+ %endif
+ # gstreamer-utils is required for the gstreamer-provides rpm magic.
+ Requires:       gstreamer >= 1.0.0
+ Requires:       opus
+ Supplements:    gstreamer
+ %description -n gst-plugins-base
+ GStreamer is a streaming media framework based on graphs of filters
+ that operate on media data. Applications using this library can do
+ anything media-related, from real-time sound processing to playing
+ videos. Its plug-in-based architecture means that new data types or
+ processing capabilities can be added simply by installing new plug-ins.
+ %package -n gst-plugins-base-extension-adder
+ Summary:      libgstadder.so for gst-plugins-base
+ Requires:   gst-plugins-base = %{version}-%{release}
+ Provides:   gst-plugins-base-profile_mobile = %{version}-%{release}
+ %description -n gst-plugins-base-extension-adder
+ Libgstadder.so for gst-plugin-base. Supplicant for gst-plugin-base.
+ This is for Tizen mobile profile.
+ %package -n gst-plugins-base-devel
+ Summary:        Include files and Libraries
+ Requires:       gst-plugins-base = %{version}
+ %description -n gst-plugins-base-devel
+ This package contains all necessary include files and libraries needed
+ to compile and link applications that use gstreamer-plugins-base.
+ %endif
+ #######################################################
+ ## Package info of Good Plugin
+ #######################################################
+ %if "%{plugin}" == "all"
+ %package -n gst-plugins-good
+ Summary:        GStreamer Streaming-Media Framework Plug-Ins
+ Group:          Multimedia/Framework
+ %endif
+ %if "%{plugin}" == "all" || "%{plugin}" == "good"
+ BuildRequires:  libjpeg-devel
+ BuildRequires:  orc >= 0.4.16
+ BuildRequires:  python
+ BuildRequires:  xsltproc
+ BuildRequires:  pkgconfig(bzip2)
+ BuildRequires:  pkgconfig(cairo)
+ BuildRequires:  pkgconfig(cairo-gobject)
+ BuildRequires:  pkgconfig(gio-2.0)
+ BuildRequires:  pkgconfig(libpng) >= 1.2
+ BuildRequires:  pkgconfig(libpulse) >= 1.0
+ BuildRequires:  pkgconfig(libsoup-2.4)
+ BuildRequires:  pkgconfig(libtbm)
+ BuildRequires:  pkgconfig(libxml-2.0) >= 2.4.9
+ BuildRequires:  pkgconfig(vconf)
+ BuildRequires:  pkgconfig(vpx)
+ BuildRequires:  pkgconfig(zlib)
+ %if "%{tizen_profile_name}" != "tv"
+ BuildRequires:  pkgconfig(libv4l2)
+ %endif
+ %if %{with x}
+ BuildRequires:  pkgconfig(ice)
+ BuildRequires:  pkgconfig(sm)
+ BuildRequires:  pkgconfig(xdamage)
+ BuildRequires:  pkgconfig(xfixes)
+ # used by libgstvideo4linux2.so
+ BuildRequires:  pkgconfig(xv)
+ %endif
+ Requires:       gstreamer >= %{version}
+ Requires:       gst-plugins-base >= %{version}
+ %description -n gst-plugins-good
+ GStreamer is a streaming media framework based on graphs of filters
+ that operate on media data. Applications using this library can do
+ anything media-related, from real-time sound processing to playing
+ videos. Its plug-in-based architecture means that new data types or
+ processing capabilities can be added simply by installing new plug-ins.
+ %package -n gst-plugins-good-extra
+ Summary:        Complementary plugins for gst-plugins-good
+ Group:          Productivity/Multimedia/Other
+ Requires:       gst-plugins-good = %{version}
+ Enhances:       gst-plugins-good
+ %description -n gst-plugins-good-extra
+ This package provides complementary plugins for gst-plugins-good and
+ plugins not included in official Tizen images, which may be used for development / experimental purposes.
+ %endif
+ #######################################################
+ ## Package info of Bad Plugin
+ #######################################################
+ %if "%{plugin}" == "all"
+ %package -n gst-plugins-bad
+ Summary:        GStreamer Streaming-Media Framework Plug-Ins
+ Group:          Multimedia/Framework
+ %endif
+ %if "%{plugin}" == "all" || "%{plugin}" == "bad"
+ BuildRequires:  python
+ BuildRequires:  xsltproc
+ BuildRequires:  pkgconfig(gio-2.0) >= 2.25.0
+ BuildRequires:  pkgconfig(gobject-introspection-1.0) >= 1.31.1
+ BuildRequires:  pkgconfig(libcurl) >= 7.21.0
+ BuildRequires:  pkgconfig(libexif) >= 0.6.16
+ BuildRequires:  pkgconfig(libsrtp2) >= 2.1.0
+ BuildRequires:  pkgconfig(libusb-1.0)
+ BuildRequires:  pkgconfig(nice)
+ BuildRequires:  pkgconfig(openal)
+ BuildRequires:  pkgconfig(openssl1.1)
+ BuildRequires:  pkgconfig(opus)
+ BuildRequires:  pkgconfig(orc-0.4) >= 0.4.11
+ BuildRequires:  pkgconfig(sndfile) >= 1.0.16
+ BuildRequires:  pkgconfig(soundtouch) > 1.4
+ BuildRequires:  pkgconfig(usrsctp)
+ %if %{with wayland}
+ BuildRequires:  pkgconfig(libdrm)
+ BuildRequires:  pkgconfig(libxml-2.0)
+ BuildRequires:  pkgconfig(wayland-client) >= 1.0.0
+ BuildRequires:  pkgconfig(wayland-cursor) >= 1.0.0
+ BuildRequires:  pkgconfig(wayland-protocols)
+ %endif
+ %if %{with x}
+ BuildRequires:  pkgconfig(x11)
+ %endif
+ Requires:       gstreamer >= %{version}
+ %description -n gst-plugins-bad
+ GStreamer is a streaming media framework based on graphs of filters
+ that operate on media data. Applications using this library can do
+ anything media-related,from real-time sound processing to playing
+ videos. Its plug-in-based architecture means that new data types or
+ processing capabilities can be added simply by installing new plug-ins.
+ %package -n gst-plugins-bad-devel
+ Summary:        GStreamer Streaming-Media Framework Plug-Ins
+ Requires:       gst-plugins-bad = %{version}-%{release}
+ Requires:       gst-plugins-base-devel
+ %description -n gst-plugins-bad-devel
+ GStreamer is a streaming media framework based on graphs of filters
+ that operate on media data. Applications using this library can do
+ anything media-related,from real-time sound processing to playing
+ videos. Its plug-in-based architecture means that new data types or
+ processing capabilities can be added simply by installing new plug-ins.
+ %endif
+ #######################################################
+ ## Package info of Ugly Plugin
+ #######################################################
+ %if "%{plugin}" == "all"
+ %package -n gst-plugins-ugly
+ Summary:        GStreamer plugins from the "ugly" set
+ Group:          Multimedia/Framework
+ %endif
+ %if "%{plugin}" == "all" || "%{plugin}" == "ugly"
+ BuildRequires:  which
+ BuildRequires:  pkgconfig(opencore-amrwb)
+ %if "%{tizen_profile_name}" != "tv"
+ BuildRequires:  pkgconfig(opencore-amrnb)
+ %endif
+ %description -n gst-plugins-ugly
+  GStreamer is a streaming media framework, based on graphs of filters
+  which operate on media data.  Applications using this library can do
+  anything from real-time sound processing to playing videos, and just
+  about anything else media-related.  Its plugin-based architecture means
+  that new data types or processing capabilities can be added simply by
+  installing new plug-ins.
+  .
+  This packages contains plugins from the "ugly" set, a set of
+  good-quality plug-ins that might pose distribution problems.
+ %endif
+ #######################################################
+ ## Package info of Omx Plugin
+ #######################################################
+ %if "%{plugin}" == "all"
+ %package -n gst-omx
+ Summary:        GStreamer plug-in that allows communication with OpenMAX IL components
+ Group:          Multimedia/Framework
+ %endif
+ %if "%{plugin}" == "all" || "%{plugin}" == "omx"
+ BuildRequires:  which
+ BuildRequires:  pkgconfig(libtbm)
+ BuildRequires:  pkgconfig(mm-common)
+ %if "%{target}" == "rpi"
+ BuildRequires:  pkgconfig(bcm_host)
+ BuildRequires:  pkgconfig(brcmegl)
+ %endif
+ ExclusiveArch: %arm aarch64
+ %description -n gst-omx
+ gst-openmax is a GStreamer plug-in that allows communication with OpenMAX IL components.
+ Multiple OpenMAX IL implementations can be used.
+ %endif
+ #######################################################
+ ## Package info of libav Plugin
+ #######################################################
+ %if "%{plugin}" == "all"
+ %package -n gst-libav
+ Summary:        Libav plugin for GStreamer
+ Group:          Multimedia/Framework
+ %endif
+ %if "%{plugin}" == "all" || "%{plugin}" == "libav"
+ BuildRequires:  bzip2-devel
+ BuildRequires:  gettext
+ BuildRequires:  which
+ BuildRequires:  yasm
+ BuildRequires:  pkgconfig(libavcodec)
+ BuildRequires:  pkgconfig(libavfilter)
+ BuildRequires:  pkgconfig(libavformat)
+ BuildRequires:  pkgconfig(libavutil)
+ BuildRequires:  pkgconfig(orc-0.4)
+ BuildRequires:  pkgconfig(theora)
+ BuildRequires:  pkgconfig(vorbis)
+ BuildRequires:  pkgconfig(zlib)
+ %description -n gst-libav
+ This GStreamer plugin supports a large number of audio and video compression
+ formats through the use of the libav library.  The plugin contains GStreamer
+ elements for decoding 90+ formats (AVI, MPEG, OGG, Matroska, ASF, ...),
+ demuxing 30+ formats and colorspace conversion.
+ %endif
+ #######################################################
+ ## Package info of rtsp-server Plugin
+ #######################################################
+ %if "%{plugin}" == "all"
+ %package -n gst-rtsp-server
+ Summary:        Multimedia Framework Library
+ Group:          System/Libraries
+ %endif
+ %if "%{plugin}" == "all" || "%{plugin}" == "rs"
+ Requires(post):  /sbin/ldconfig
+ Requires(postun):  /sbin/ldconfig
+ BuildRequires:  gobject-introspection-devel
+ %description -n gst-rtsp-server
+ This GStreamer plugin supports a large number of audio and video compression
+ formats through the use of the libav library.  The plugin contains GStreamer
+ elements for decoding 90+ formats (AVI, MPEG, OGG, Matroska, ASF, ...),
+ demuxing 30+ formats and colorspace conversion.
+ %package -n gst-rtsp-server-devel
+ Summary:    Multimedia Framework RTSP server library (DEV)
+ Group:      Development/Libraries
+ Requires:   gst-rtsp-server = %{version}-%{release}
+ %description -n gst-rtsp-server-devel
+ %endif
+ #######################################################
+ ## Package info of editing-services Plugin
+ #######################################################
+ %if "%{plugin}" == "all"
+ %package -n gst-editing-services
+ Summary:        GStreamer Editing Service Plug-Ins
+ Group:          Multimedia/Framework
+ %endif
+ %if "%{plugin}" == "all" || "%{plugin}" == "es"
+ BuildRequires:  flex
+ BuildRequires:  gobject-introspection-devel
+ BuildRequires:  gtk-doc
+ BuildRequires:  pkgconfig(libxml-2.0)
+ Requires:       gstreamer >= 1.0.0
+ Supplements:    gstreamer
+ %description -n gst-editing-services
+ This is a high-level library for facilitating the creation of audio/video
+ non-linear editors.
+ %package -n gst-editing-services-devel
+ Summary:    Development files for gst-editing-services
+ Requires:   gst-editing-services = %{version}-%{release}
+ %description -n gst-editing-services-devel
+ This package contains libraries and header files for
+ developing applications that use %{name}
+ %endif
+ #######################################################
+ ## Prep
+ #######################################################
+ %prep
+ %setup -q -n gstreamer-%{version}
+ cp %{SOURCE1001} ./gstreamer.manifest
+ cp %{SOURCE1001} ./gst-plugins-base.manifest
+ cp %{SOURCE1001} ./gst-plugins-good.manifest
+ cp %{SOURCE1001} ./gst-plugins-bad.manifest
+ cp %{SOURCE1001} ./gst-plugins-ugly.manifest
+ cp %{SOURCE1001} ./gst-omx.manifest
+ cp %{SOURCE1001} ./gst-libav.manifest
+ cp %{SOURCE1001} ./gst-rtsp-server.manifest
+ cp %{SOURCE1001} ./gst-editing-services.manifest
+ #######################################################
+ ## Build
+ #######################################################
+ %build
+ %if "%{plugin}" != "all"
+ pushd %{_source_path}
+ %endif
+ mkdir -p build
+ export CFLAGS="%{optflags} \
+   -fno-strict-aliasing\
+   -fstack-protector-strong\
+   -Wl,-z,relro\
+   -D_FORTIFY_SOURCE=2"
+ export CXXFLAGS+=" -Wno-error"
+ export LDFLAGS+=" -pthread"
+ meson --auto-features=disabled --prefix=/usr --libdir=%{_libdir} --datadir=%{_datadir} --sysconfdir=%{_hal_sysconfdir} \
+ %if "%{plugin}" == "all" || "%{plugin}" == "core"
+   -D %{_core_opt}coretracers=enabled \
+   -D %{_core_opt}tools=enabled \
+   -D %{_core_opt}introspection=enabled \
+   -D %{_core_opt}extra-checks=enabled \
+   -D %{_core_opt}ptp-helper-permissions=none \
+ %endif
+ %if "%{plugin}" == "all" || "%{plugin}" == "base"
+   -D %{_base_opt}adder=enabled \
+   -D %{_base_opt}app=enabled \
+   -D %{_base_opt}audioconvert=enabled \
+   -D %{_base_opt}audiomixer=enabled \
+   -D %{_base_opt}audiorate=enabled \
+   -D %{_base_opt}audioresample=enabled \
+   -D %{_base_opt}audiotestsrc=enabled \
+   -D %{_base_opt}compositor=enabled \
+   -D %{_base_opt}encoding=enabled \
+   -D %{_base_opt}gio=enabled \
+   -D %{_base_opt}gio-typefinder=enabled \
+   -D %{_base_opt}overlaycomposition=enabled \
+   -D %{_base_opt}pbtypes=enabled \
+   -D %{_base_opt}playback=enabled \
+   -D %{_base_opt}rawparse=enabled \
+   -D %{_base_opt}subparse=enabled \
+   -D %{_base_opt}tcp=enabled \
+   -D %{_base_opt}typefind=enabled \
+   -D %{_base_opt}videoconvert=enabled \
+   -D %{_base_opt}videorate=enabled \
+   -D %{_base_opt}videoscale=enabled \
+   -D %{_base_opt}videotestsrc=enabled \
+   -D %{_base_opt}volume=enabled \
+   -D %{_base_opt}alsa=enabled \
+   -D %{_base_opt}ogg=enabled \
+   -D %{_base_opt}opus=enabled \
+   -D %{_base_opt}theora=enabled \
+   -D %{_base_opt}vorbis=enabled \
+   -D %{_base_opt}introspection=enabled \
+   -D %{_base_opt}tbm=true \
+   %if "%{tizen_profile_name}" == "tv"
+     -D %{_base_opt}tv-profile=true \
+   %else
+     %if 0%{?enable_gl:1}
+       -D %{_base_opt}gl=enabled \
+     %endif # gl
+   %endif # tv
+ %endif # base plugin
+ %if "%{plugin}" == "all" || "%{plugin}" == "good"
+   %if 0%{?ENABLE_AALIB}
+     -D %{_good_opt}aalib=enabled \
+   %endif
+   -D %{_good_opt}apetag=enabled \
+   -D %{_good_opt}audiofx=enabled \
+   -D %{_good_opt}audioparsers=enabled \
+   -D %{_good_opt}autodetect=enabled \
+   -D %{_good_opt}avi=enabled \
+   -D %{_good_opt}debugutils=enabled \
+   -D %{_good_opt}deinterlace=enabled \
+   -D %{_good_opt}effectv=enabled \
+   -D %{_good_opt}flv=enabled \
+   -D %{_good_opt}icydemux=enabled \
+   -D %{_good_opt}id3demux=enabled \
+   -D %{_good_opt}imagefreeze=enabled \
+   -D %{_good_opt}interleave=enabled \
+   -D %{_good_opt}isomp4=enabled \
+   -D %{_good_opt}law=enabled \
+   -D %{_good_opt}matroska=enabled \
+   -D %{_good_opt}multifile=enabled \
+   -D %{_good_opt}replaygain=enabled \
+   -D %{_good_opt}rtp=enabled \
+   -D %{_good_opt}rtpmanager=enabled \
+   -D %{_good_opt}rtsp=enabled \
+   -D %{_good_opt}smpte=enabled \
+   -D %{_good_opt}udp=enabled \
+   -D %{_good_opt}videobox=enabled \
+   -D %{_good_opt}videocrop=enabled \
+   -D %{_good_opt}videofilter=enabled \
+   -D %{_good_opt}videomixer=enabled \
+   -D %{_good_opt}wavenc=enabled \
+   -D %{_good_opt}wavparse=enabled \
+   -D %{_good_opt}v4l2=enabled \
+   -D %{_good_opt}cairo=enabled \
+   -D %{_good_opt}jpeg=enabled \
+   -D %{_good_opt}png=enabled \
+   -D %{_good_opt}pulse=enabled \
+   -D %{_good_opt}soup=enabled \
+   -D %{_good_opt}vpx=enabled \
+   -D %{_good_opt}tbm=true \
+   -D %{_good_opt}v4l2-probe=true \
+   %if "%{tizen_profile_name}" != "tv"
+     -D %{_good_opt}v4l2-libv4l2=enabled \
+   %endif # tv
+ %endif # plugin
+ %if "%{plugin}" == "all" || "%{plugin}" == "bad"
+   -D %{_bad_opt}gst_play_tests=false\
+   -D %{_bad_opt}introspection=disabled \
+   -D %{_bad_opt}audiobuffersplit=enabled \
+   -D %{_bad_opt}audiomixmatrix=enabled \
+   -D %{_bad_opt}audiolatency=enabled \
+   -D %{_bad_opt}coloreffects=enabled \
+   -D %{_bad_opt}debugutils=enabled \
+   -D %{_bad_opt}gaudieffects=enabled \
+   -D %{_bad_opt}gdp=enabled \
+   -D %{_bad_opt}midi=enabled \
+   -D %{_bad_opt}mpegtsmux=enabled \
+   -D %{_bad_opt}netsim=enabled \
+   -D %{_bad_opt}proxy=enabled \
+   -D %{_bad_opt}sdp=enabled \
+   -D %{_bad_opt}timecode=enabled \
+   -D %{_bad_opt}videoframe_audiolevel=enabled \
+   -D %{_bad_opt}videoparsers=enabled \
+   -D %{_bad_opt}ipcpipeline=enabled \
+   -D %{_bad_opt}shm=enabled \
+   -D %{_bad_opt}aes=enabled \
+   -D %{_bad_opt}dtls=enabled \
+   -D %{_bad_opt}openal=enabled \
+   -D %{_bad_opt}opus=enabled \
+   -D %{_bad_opt}sctp=enabled \
+   -D %{_bad_opt}soundtouch=enabled \
+   -D %{_bad_opt}srtp=enabled \
+   -D %{_bad_opt}wayland=enabled \
+   -D %{_bad_opt}webrtc=enabled \
+   %if %{with wayland}
+     -D %{_bad_opt}wayland=enabled \
+   %endif
+   %if "%{tizen_profile_name}" == "tv"
+     -D %{_bad_opt}tv-profile=true \
+   %else
+     -D %{_bad_opt}autoconvert=enabled \
+     -D %{_bad_opt}id3tag=enabled \
+     -D %{_bad_opt}camerabin2=enabled \
+     -D %{_bad_opt}jpegformat=enabled \
+     -D %{_bad_opt}dash=enabled \
+     -D %{_bad_opt}hls=enabled \
+     -D %{_bad_opt}mpegdemux=enabled \
+     -D %{_bad_opt}mpegtsdemux=enabled \
+     -D %{_bad_opt}rtp=enabled \
+     -D %{_bad_opt}smoothstreaming=enabled \
+     %if 0%{?enable_gl:1}
+       -D %{_bad_opt}gl=enabled \
+     %endif # gl
+   %endif # tv
+ %endif # plugin
+ %if "%{plugin}" == "all" || "%{plugin}" == "ugly"
+   -D %{_ugly_opt}amrwbdec=enabled \
+   %if "%{tizen_profile_name}" == "tv"
+     -D %{_ugly_opt}tv-profile=true \
+   %else
+   -D %{_ugly_opt}asfdemux=enabled \
+   -D %{_ugly_opt}amrnb=enabled \
+   %endif # tv
+ %endif # plugin
+ %if "%{plugin}" == "all" || "%{plugin}" == "omx"
+   %if "%{target}" == "rpi"
+     -D %{_omx_opt}target=rpi \
+     -D %{_omx_opt}header_path=/opt/vc/include/interface/vmcs_host/khronos/IL \
+   %else
+     %ifarch aarch64
+       -D %{_omx_opt}target=exynos64 \
+     %else
+       -D %{_omx_opt}target=exynos \
+       -D %{_omx_opt}vp9=true \
+     %endif # arch
+   %endif # target
+ %endif # plugin
+ %if "%{plugin}" == "all" || "%{plugin}" == "libav"
+   %if "%{tizen_profile_name}" == "tv"
+     -D %{_libav_opt}tv-profile=true \
+   %endif # tv
+ %endif # plugin
+ %if "%{plugin}" == "all" || "%{plugin}" == "rs"
+   -D %{_rs_opt}rtspclientsink=enabled \
+   -D %{_rs_opt}introspection=disabled \
+ %endif
+ %if "%{plugin}" == "all" || "%{plugin}" == "es"
+   -D %{_es_opt}introspection=disabled \
+   -D %{_es_opt}tools=enabled \
+   -D %{_es_opt}xptv=enabled \
+   -D %{_es_opt}python=enabled \
+ %endif
+   build
+ ninja -C build all %{?_smp_mflags}
+ %if "%{plugin}" != "all"
+ popd
+ %endif
+ #######################################################
+ ## Install
+ #######################################################
+ %install
+ rm -rf %{buildroot}
+ export DESTDIR=%{buildroot}
+ ninja -C %{_source_path}/build install
+ mkdir -p %{buildroot}%{_datadir}/gstreamer-%{gst_branch}/presets
+ rm -rf %{buildroot}%{_datadir}/gstreamer-%{gst_branch}/encoding-profiles
+ rm -rf %{buildroot}%{_datadir}/locale
+ %clean
+ rm -rf $RPM_BUILD_ROOT
+ %post -p /sbin/ldconfig
+ %postun -p /sbin/ldconfig
+ #######################################################
+ ## Packaging rpms
+ #######################################################
+ ###################### gstreamer ######################
+ %if "%{plugin}" == "all" || "%{plugin}" == "core"
+ %files -n gstreamer
+ %manifest gstreamer.manifest
+ %defattr(-, root, root)
+ %license subprojects/gstreamer/COPYING
+ %dir %{_datadir}/gstreamer-%{gst_branch}
+ %dir %{_datadir}/gstreamer-%{gst_branch}/presets
+ %dir %{_lib_gstreamer_dir}
+ %{_lib_gstreamer_dir}/libgstcoreelements.so
+ %{_lib_gstreamer_dir}/libgstcoretracers.so
+ %dir %{_libexecdir}/gstreamer-%{gst_branch}
+ %{_libexecdir}/gstreamer-%{gst_branch}/gst-hotdoc-plugins-scanner
+ %{_libexecdir}/gstreamer-%{gst_branch}/gst-plugin-scanner
+ %{_libexecdir}/gstreamer-%{gst_branch}/gst-ptp-helper
+ %exclude %{_libexecdir}/gstreamer-%{gst_branch}/gst-plugins-doc-cache-generator
+ %{_libdir}/libgstbase*.so.*
+ %{_libdir}/libgstcontroller*.so.*
+ %{_libdir}/libgstnet*.so.*
+ %{_libdir}/libgstreamer*.so.*
+ %{_lib_girepository}/Gst-1.0.typelib
+ %{_lib_girepository}/GstBase-1.0.typelib
+ %{_lib_girepository}/GstController-1.0.typelib
+ %{_lib_girepository}/GstNet-1.0.typelib
+ %{_datadir}/gdb/auto-load/usr/%{_lib}/libgstreamer*-gdb.py
+ %{_datadir}/gstreamer-%{gst_branch}/gdb/glib_gobject_helper.py
+ %{_datadir}/gstreamer-%{gst_branch}/gdb/gst_gdb.py
+ %files -n gstreamer-utils
+ %manifest gstreamer.manifest
+ %defattr(-, root, root)
+ %license subprojects/gstreamer/COPYING
+ %{_bindir}/gst-inspect-1.0
+ %{_bindir}/gst-launch-1.0
+ %{_bindir}/gst-stats-1.0
+ %{_bindir}/gst-typefind-1.0
+ %exclude %doc %{_mandir}/man?/*-%{gst_branch}.*
+ %files -n gstreamer-devel
+ %manifest gstreamer.manifest
+ %defattr(-, root, root)
+ %{_datadir}/aclocal/gst-element-check-1.0.m4
+ %{_includedir}/gstreamer-%{gst_branch}/gst/*.h
+ %{_includedir}/gstreamer-%{gst_branch}/gst/base/*
+ %{_includedir}/gstreamer-%{gst_branch}/gst/controller/*
+ %{_includedir}/gstreamer-%{gst_branch}/gst/net/*
+ %{_libdir}/libgstbase*.so
+ %{_libdir}/libgstcontroller*.so
+ %{_libdir}/libgstnet*.so
+ %{_libdir}/libgstreamer*.so
+ %{_libdir}/pkgconfig/gstreamer-1.0.pc
+ %{_libdir}/pkgconfig/gstreamer-base-1.0.pc
+ %{_libdir}/pkgconfig/gstreamer-controller-1.0.pc
+ %{_libdir}/pkgconfig/gstreamer-net-1.0.pc
+ %{_datadir}/gir-%{gst_branch}/Gst-1.0.gir
+ %{_datadir}/gir-%{gst_branch}/GstBase-1.0.gir
+ %{_datadir}/gir-%{gst_branch}/GstController-1.0.gir
+ %{_datadir}/gir-%{gst_branch}/GstNet-1.0.gir
+ %changelog
+ %endif
+ ###################### gst-plugins-base ######################
+ %if "%{plugin}" == "all" || "%{plugin}" == "base"
+ %files -n gst-plugins-base
+ %manifest gst-plugins-base.manifest
+ %defattr(-, root, root)
+ %license subprojects/gst-plugins-base/COPYING
+ %{_lib_gstreamer_dir}/libgstalsa.so
+ %{_lib_gstreamer_dir}/libgstapp.so
+ %{_lib_gstreamer_dir}/libgstaudioconvert.so
+ %{_lib_gstreamer_dir}/libgstaudiorate.so
+ %{_lib_gstreamer_dir}/libgstaudioresample.so
+ %{_lib_gstreamer_dir}/libgstaudiotestsrc.so
+ %{_lib_gstreamer_dir}/libgstgio.so
+ %{_lib_gstreamer_dir}/libgstogg.so
+ %{_lib_gstreamer_dir}/libgstplayback.so
+ %{_lib_gstreamer_dir}/libgstoverlaycomposition.so
+ %{_lib_gstreamer_dir}/libgstsubparse.so
+ %{_lib_gstreamer_dir}/libgsttcp.so
+ %{_lib_gstreamer_dir}/libgsttheora.so
+ %{_lib_gstreamer_dir}/libgsttypefindfunctions.so
+ %{_lib_gstreamer_dir}/libgstvideoconvert.so
+ %{_lib_gstreamer_dir}/libgstvideorate.so
+ %{_lib_gstreamer_dir}/libgstvideoscale.so
+ %{_lib_gstreamer_dir}/libgstvideotestsrc.so
+ %{_lib_gstreamer_dir}/libgstvolume.so
+ %{_lib_gstreamer_dir}/libgstvorbis.so
+ %{_lib_gstreamer_dir}/libgstpbtypes.so
+ %{_lib_gstreamer_dir}/libgstrawparse.so
+ %{_lib_gstreamer_dir}/libgstopus.so
+ %{_lib_gstreamer_dir}/libgstencoding.so
+ %{_lib_gstreamer_dir}/libgstaudiomixer.so
+ %{_lib_gstreamer_dir}/libgstcompositor.so
+ %if %{with x}
+ %{_lib_gstreamer_dir}/libgstximagesink.so
+ %{_lib_gstreamer_dir}/libgstxvimagesink.so
+ %endif
+ %{_libdir}/libgstapp*.so.*
+ %{_libdir}/libgstaudio*.so.*
+ %{_libdir}/libgstallocators*.so.*
+ %{_libdir}/libgstfft*.so.*
+ %{_libdir}/libgstpbutils*.so.*
+ %{_libdir}/libgstriff*.so.*
+ %{_libdir}/libgstrtp*.so.*
+ %{_libdir}/libgstrtsp*.so.*
+ %{_libdir}/libgstsdp*.so.*
+ %{_libdir}/libgsttag*.so.*
+ %{_libdir}/libgstvideo*.so.*
+ %{_lib_girepository}/GstAllocators-1.0.typelib
+ %{_lib_girepository}/GstApp-1.0.typelib
+ %{_lib_girepository}/GstAudio-1.0.typelib
+ %{_lib_girepository}/GstPbutils-1.0.typelib
+ %{_lib_girepository}/GstRtp-1.0.typelib
+ %{_lib_girepository}/GstRtsp-1.0.typelib
+ %{_lib_girepository}/GstSdp-1.0.typelib
+ %{_lib_girepository}/GstTag-1.0.typelib
+ %{_lib_girepository}/GstVideo-1.0.typelib
+ %dir %{_datadir}/gst-plugins-base/
+ %dir %{_datadir}/gst-plugins-base/%{gst_branch}/
+ %{_datadir}/gst-plugins-base/%{gst_branch}/license-translations.dict
+ %files -n gst-plugins-base-extension-adder
+ %{_lib_gstreamer_dir}/libgstadder.so
+ %license subprojects/gst-plugins-base/COPYING
+ %files -n gst-plugins-base-devel
+ %manifest gst-plugins-base.manifest
+ %defattr(-, root, root)
+ %{_includedir}/gstreamer-%{gst_branch}/gst/allocators/*
+ %{_includedir}/gstreamer-%{gst_branch}/gst/app/*
+ %{_includedir}/gstreamer-%{gst_branch}/gst/audio/*
+ %{_includedir}/gstreamer-%{gst_branch}/gst/fft/*
+ %{_includedir}/gstreamer-%{gst_branch}/gst/pbutils/*
+ %{_includedir}/gstreamer-%{gst_branch}/gst/riff/*
+ %{_includedir}/gstreamer-%{gst_branch}/gst/rtp/*
+ %{_includedir}/gstreamer-%{gst_branch}/gst/rtsp/*
+ %{_includedir}/gstreamer-%{gst_branch}/gst/sdp/*
+ %{_includedir}/gstreamer-%{gst_branch}/gst/tag/*
+ %{_includedir}/gstreamer-%{gst_branch}/gst/video/*
+ %if "%{plugin}" == "all"
+ %exclude %{_includedir}/gstreamer-%{gst_branch}/gst/audio/audio-bad-prelude.h
+ %exclude %{_includedir}/gstreamer-%{gst_branch}/gst/audio/gstnonstreamaudiodecoder.h
+ %exclude %{_includedir}/gstreamer-%{gst_branch}/gst/audio/gstplanaraudioadapter.h
+ %endif
+ %{_libdir}/libgstallocators*.so
+ %{_libdir}/libgstapp*.so
+ %{_libdir}/libgstaudio*.so
+ %{_libdir}/libgstfft*.so
+ %{_libdir}/libgstpbutils*.so
+ %{_libdir}/libgstriff*.so
+ %{_libdir}/libgstrtp*.so
+ %{_libdir}/libgstrtsp*.so
+ %{_libdir}/libgstsdp*.so
+ %{_libdir}/libgsttag*.so
+ %{_libdir}/libgstvideo*.so
+ %{_libdir}/pkgconfig/gstreamer-allocators*.pc
+ %{_libdir}/pkgconfig/gstreamer-app*.pc
+ %{_libdir}/pkgconfig/gstreamer-audio*.pc
+ %{_libdir}/pkgconfig/gstreamer-fft*.pc
+ %{_libdir}/pkgconfig/gstreamer-pbutils*.pc
+ %{_libdir}/pkgconfig/gstreamer-plugins-base*.pc
+ %{_libdir}/pkgconfig/gstreamer-riff*.pc
+ %{_libdir}/pkgconfig/gstreamer-rtp*.pc
+ %{_libdir}/pkgconfig/gstreamer-rtsp*.pc
+ %{_libdir}/pkgconfig/gstreamer-sdp*.pc
+ %{_libdir}/pkgconfig/gstreamer-tag*.pc
+ %{_libdir}/pkgconfig/gstreamer-video*.pc
+ %{_datadir}/gir-%{gst_branch}/GstAllocators-1.0.gir
+ %{_datadir}/gir-%{gst_branch}/GstApp-1.0.gir
+ %{_datadir}/gir-%{gst_branch}/GstAudio-1.0.gir
+ %{_datadir}/gir-%{gst_branch}/GstPbutils-1.0.gir
+ %{_datadir}/gir-%{gst_branch}/GstRtp-1.0.gir
+ %{_datadir}/gir-%{gst_branch}/GstRtsp-1.0.gir
+ %{_datadir}/gir-%{gst_branch}/GstSdp-1.0.gir
+ %{_datadir}/gir-%{gst_branch}/GstTag-1.0.gir
+ %{_datadir}/gir-%{gst_branch}/GstVideo-1.0.gir
+ %endif
+ ###################### gst-plugins-good ######################
+ %if "%{plugin}" == "all" || "%{plugin}" == "good"
+ %files -n gst-plugins-good
+ %manifest gst-plugins-good.manifest
+ %defattr(-, root, root)
+ %license subprojects/gst-plugins-good/COPYING
+ %{_lib_gstreamer_dir}/libgstalaw.so
+ %{_lib_gstreamer_dir}/libgstapetag.so
+ %{_lib_gstreamer_dir}/libgstaudiofx.so
+ %{_lib_gstreamer_dir}/libgstaudioparsers.so
+ %{_lib_gstreamer_dir}/libgstautodetect.so
+ %{_lib_gstreamer_dir}/libgstavi.so
+ %{_lib_gstreamer_dir}/libgstdebug.so
+ %{_lib_gstreamer_dir}/libgstdeinterlace.so
+ %{_lib_gstreamer_dir}/libgsteffectv.so
+ %{_lib_gstreamer_dir}/libgsticydemux.so
+ %{_lib_gstreamer_dir}/libgstid3demux.so
+ %{_lib_gstreamer_dir}/libgstinterleave.so
+ %{_lib_gstreamer_dir}/libgstisomp4.so
+ %{_lib_gstreamer_dir}/libgstjpeg.so
+ %{_lib_gstreamer_dir}/libgstmatroska.so
+ %{_lib_gstreamer_dir}/libgstmulaw.so
+ %{_lib_gstreamer_dir}/libgstmultifile.so
+ %{_lib_gstreamer_dir}/libgstnavigationtest.so
+ %{_lib_gstreamer_dir}/libgstpulseaudio.so
+ %{_lib_gstreamer_dir}/libgstreplaygain.so
+ %{_lib_gstreamer_dir}/libgstrtp.so
+ %{_lib_gstreamer_dir}/libgstrtpmanager.so
+ %{_lib_gstreamer_dir}/libgstrtsp.so
+ %{_lib_gstreamer_dir}/libgstsmpte.so
+ %{_lib_gstreamer_dir}/libgstudp.so
+ %{_lib_gstreamer_dir}/libgstvideo4linux2.so
+ %{_lib_gstreamer_dir}/libgstvideocrop.so
+ %{_lib_gstreamer_dir}/libgstvideofilter.so
+ %{_lib_gstreamer_dir}/libgstwavenc.so
+ %{_lib_gstreamer_dir}/libgstwavparse.so
+ %if %{with x}
+ %{_lib_gstreamer_dir}/libgstximagesrc.so
+ %endif
+ %{_lib_gstreamer_dir}/libgstcairo.so
+ %{_lib_gstreamer_dir}/libgstsoup.so
+ %{_lib_gstreamer_dir}/libgstvpx.so
+ %{_lib_gstreamer_dir}/libgstimagefreeze.so
+ %if "%{tizen_profile_name}" != "tv"
+ %{_lib_gstreamer_dir}/libgstflv.so
+ %{_lib_gstreamer_dir}/libgstvideobox.so
+ %{_lib_gstreamer_dir}/libgstvideomixer.so
+ %{_datadir}/gstreamer-%{gst_branch}/presets/GstQTMux.prs
+ %endif
+ %{_datadir}/gstreamer-%{gst_branch}/presets/GstVP8Enc.prs
+ %files -n gst-plugins-good-extra
+ %manifest gst-plugins-good.manifest
+ %defattr(-, root, root)
+ %license subprojects/gst-plugins-good/COPYING
+ %if 0%{?ENABLE_AALIB}
+ %{_lib_gstreamer_dir}/libgstaasink.so
+ %endif
+ %{_lib_gstreamer_dir}/libgstpng.so
+ %{_lib_gstreamer_dir}/libgstimagefreeze.so
+ %endif
+ ###################### gst-plugins-bad ######################
+ %if "%{plugin}" == "all" || "%{plugin}" == "bad"
+ %files -n gst-plugins-bad
+ %manifest gst-plugins-bad.manifest
+ %defattr(-, root, root)
+ %license subprojects/gst-plugins-bad/COPYING
+ %if "%{tizen_profile_name}" != "tv"
+ %{_lib_gstreamer_dir}/libgstautoconvert.so
+ %{_lib_gstreamer_dir}/libgstcamerabin.so
+ %{_lib_gstreamer_dir}/libgstid3tag.so
+ %{_lib_gstreamer_dir}/libgstjpegformat.so
+ %{_lib_gstreamer_dir}/libgstmpegpsdemux.so
+ %{_lib_gstreamer_dir}/libgstsmoothstreaming.so
+ %{_lib_gstreamer_dir}/libgstdash.so
+ %if 0%{?enable_gl:1}
+ %{_lib_gstreamer_dir}/libgstopengl.so
+ %endif
+ %{_lib_gstreamer_dir}/libgstsoundtouch.so
+ %{_libdir}/libgstadaptivedemux-%{gst_branch}.so.0*
+ %{_libdir}/libgstbasecamerabinsrc-%{gst_branch}.so.0*
+ %{_libdir}/libgstinsertbin-%{gst_branch}.so.0*
+ %{_libdir}/libgstphotography-%{gst_branch}.so.0*
+ %{_libdir}/libgsturidownloader-%{gst_branch}.so.0*
+ %if 0%{?enable_gl:1}
+ %{_libdir}/libgstgl-%{gst_branch}.so.0*
+ %endif
+ %{_libdir}/libgstisoff-%{gst_branch}.so.0*
+ %endif
+ %{_lib_gstreamer_dir}/libgstaes.so
+ %{_lib_gstreamer_dir}/libgstgdp.so
+ %{_lib_gstreamer_dir}/libgstdebugutilsbad.so
+ %{_lib_gstreamer_dir}/libgstmpegtsdemux.so
+ %{_lib_gstreamer_dir}/libgstmpegtsmux.so
+ %{_lib_gstreamer_dir}/libgstsdpelem.so
+ %{_lib_gstreamer_dir}/libgstshm.so
+ %{_lib_gstreamer_dir}/libgstvideoparsersbad.so
+ %{_lib_gstreamer_dir}/libgstmidi.so
+ %{_lib_gstreamer_dir}/libgstopenal.so
+ %{_lib_gstreamer_dir}/libgsthls.so
+ %{_lib_gstreamer_dir}/libgstnetsim.so
+ %{_lib_gstreamer_dir}/libgsttimecode.so
+ %{_lib_gstreamer_dir}/libgstvideoframe_audiolevel.so
+ %{_lib_gstreamer_dir}/libgstaudiomixmatrix.so
+ %{_lib_gstreamer_dir}/libgstaudiobuffersplit.so
+ %{_lib_gstreamer_dir}/libgstaudiolatency.so
+ %{_lib_gstreamer_dir}/libgstipcpipeline.so
+ %{_lib_gstreamer_dir}/libgstproxy.so
+ %{_lib_gstreamer_dir}/libgstwebrtc.so
+ %{_lib_gstreamer_dir}/libgstdtls.so
+ %{_lib_gstreamer_dir}/libgstrtpmanagerbad.so
+ %{_lib_gstreamer_dir}/libgstsctp.so
+ %{_lib_gstreamer_dir}/libgstsrtp.so
+ %{_lib_gstreamer_dir}/libgstopusparse.so
+ %{_lib_gstreamer_dir}/libgstgaudieffects.so
+ %{_lib_gstreamer_dir}/libgstcoloreffects.so
+ %if %{with wayland}
+ %{_lib_gstreamer_dir}/libgstwaylandsink.so
+ %endif
+ %{_libdir}/libgstbadaudio-%{gst_branch}.so.0*
+ %{_libdir}/libgstcodecs-%{gst_branch}.so.0*
+ %{_libdir}/libgstcodecparsers-%{gst_branch}.so.0*
+ %{_libdir}/libgstmpegts-%{gst_branch}.so.0*
+ %{_libdir}/libgstplay-%{gst_branch}.so.0*
+ %{_libdir}/libgstplayer-%{gst_branch}.so.0*
+ %{_libdir}/libgstsctp-%{gst_branch}.so.0*
+ %{_libdir}/libgsttranscoder-%{gst_branch}.so.0*
+ %{_libdir}/libgstwebrtc-%{gst_branch}.so.0*
+ %if %{with wayland}
+ %{_libdir}/libgstwayland-%{gst_branch}.so.0*
+ %endif
+ %exclude %{_bindir}/gst-transcoder-1.0
+ %files -n gst-plugins-bad-devel
+ %manifest gst-plugins-bad.manifest
+ %defattr(-, root, root)
+ %{_includedir}/gstreamer-%{gst_branch}/gst/audio/audio-bad-prelude.h
+ %{_includedir}/gstreamer-%{gst_branch}/gst/audio/gstnonstreamaudiodecoder.h
+ %{_includedir}/gstreamer-%{gst_branch}/gst/audio/gstplanaraudioadapter.h
+ %{_includedir}/gstreamer-%{gst_branch}/gst/basecamerabinsrc/*
+ %{_includedir}/gstreamer-%{gst_branch}/gst/codecparsers/*
+ %{_includedir}/gstreamer-%{gst_branch}/gst/insertbin/*
+ %{_includedir}/gstreamer-%{gst_branch}/gst/interfaces/*
+ %{_includedir}/gstreamer-%{gst_branch}/gst/isoff/*
+ %{_includedir}/gstreamer-%{gst_branch}/gst/mpegts/*
+ %{_includedir}/gstreamer-%{gst_branch}/gst/play/*
+ %{_includedir}/gstreamer-%{gst_branch}/gst/player/*
+ %{_includedir}/gstreamer-%{gst_branch}/gst/sctp/*
+ %{_includedir}/gstreamer-%{gst_branch}/gst/transcoder/*
+ %{_includedir}/gstreamer-%{gst_branch}/gst/uridownloader/*
+ %if %{with wayland}
+ %{_includedir}/gstreamer-%{gst_branch}/gst/wayland/*
+ %endif
+ %{_includedir}/gstreamer-%{gst_branch}/gst/webrtc/*
+ %if "%{tizen_profile_name}" != "tv"
+ %if 0%{?enable_gl:1}
+ %{_lib_gstreamer_dir}/include/gst/gl/*
+ %endif
+ %endif
+ %{_libdir}/libgstadaptivedemux*.so
+ %{_libdir}/libgstbadaudio*.so
+ %{_libdir}/libgstbasecamerabinsrc*.so
+ %{_libdir}/libgstcodecparsers*.so
+ %{_libdir}/libgstcodecs*.so
+ %{_libdir}/libgstinsertbin*.so
+ %{_libdir}/libgstisoff*.so
+ %{_libdir}/libgstmpegts*.so
+ %{_libdir}/libgstphotography*.so
+ %{_libdir}/libgstplay*.so
+ %{_libdir}/libgstsctp*.so
+ %{_libdir}/libgsttranscoder*.so
+ %{_libdir}/libgsturidownloader*.so
+ %if %{with wayland}
+ %{_libdir}/libgstwayland*.so
+ %endif
+ %{_libdir}/libgstwebrtc*.so
+ %{_libdir}/pkgconfig/gstreamer-bad-audio-1.0.pc
+ %{_libdir}/pkgconfig/gstreamer-codecparsers-1.0.pc
+ %if "%{tizen_profile_name}" != "tv"
+ %if 0%{?enable_gl:1}
+ %{_libdir}/pkgconfig/gstreamer-gl-*.pc
+ %endif
+ %endif
+ %{_libdir}/pkgconfig/gstreamer-insertbin-1.0.pc
+ %{_libdir}/pkgconfig/gstreamer-mpegts-1.0.pc
+ %{_libdir}/pkgconfig/gstreamer-photography-1.0.pc
+ %{_libdir}/pkgconfig/gstreamer-play-1.0.pc
+ %{_libdir}/pkgconfig/gstreamer-player-1.0.pc
+ %{_libdir}/pkgconfig/gstreamer-plugins-bad-1.0.pc
+ %{_libdir}/pkgconfig/gstreamer-sctp-1.0.pc
+ %{_libdir}/pkgconfig/gstreamer-transcoder-1.0.pc
+ %if %{with wayland}
+ %{_libdir}/pkgconfig/gstreamer-wayland-1.0.pc
+ %endif
+ %{_libdir}/pkgconfig/gstreamer-webrtc-1.0.pc
+ %endif
+ ###################### gst-plugins-ugly ######################
+ %if "%{plugin}" == "all" || "%{plugin}" == "ugly"
+ %files -n gst-plugins-ugly
+ %manifest gst-plugins-ugly.manifest
+ %defattr(-,root,root,-)
+ %license subprojects/gst-plugins-ugly/COPYING
+ %if "%{tizen_profile_name}" != "tv"
+ %{_lib_gstreamer_dir}/libgstasf.so
+ %{_lib_gstreamer_dir}/libgstamrnb.so
+ %exclude %{_datadir}/gstreamer-%{gst_branch}/presets/GstAmrnbEnc.prs
+ %endif
+ %{_lib_gstreamer_dir}/libgstamrwbdec.so
+ %endif
+ ########################## gst-omx ###########################
+ %if "%{plugin}" == "all" || "%{plugin}" == "omx"
+ %files -n gst-omx
+ %manifest gst-omx.manifest
+ %defattr(-,root,root,-)
+ %license subprojects/gst-omx/COPYING
+ %{_libdir}/gstreamer-1.0/libgstomx.so
+ %endif
+ ######################## gst-libav ###########################
+ %if "%{plugin}" == "all" || "%{plugin}" == "libav"
+ %files -n gst-libav
+ %manifest gst-libav.manifest
+ %defattr(-,root,root,-)
+ %license subprojects/gst-libav/COPYING
+ %{_libdir}/gstreamer-1.0/libgstlibav.so
+ %endif
+ ###################### gst-rtsp-server #######################
+ %if "%{plugin}" == "all" || "%{plugin}" == "rs"
+ %files -n gst-rtsp-server
+ %manifest gst-rtsp-server.manifest
+ %defattr(-,root,root,-)
+ %license subprojects/gst-rtsp-server/COPYING
+ %{_libdir}/libgstrtspserver*.so.*
+ %{_libdir}/gstreamer-1.0/libgstrtspclientsink.so
+ %files -n gst-rtsp-server-devel
+ %defattr(-,root,root,-)
+ %{_libdir}/libgstrtspserver*.so
+ %{_includedir}/gstreamer-1.0/gst/rtsp-server/rtsp-*.h
+ %{_includedir}/gstreamer-1.0/gst/rtsp-server/gstwfd*.h
+ %{_libdir}/pkgconfig/gstreamer-rtsp-server-1.0.pc
+ %endif
+ ###################### gst-editing-services #######################
+ %if "%{plugin}" == "all" || "%{plugin}" == "es"
+ %files -n gst-editing-services
+ %manifest gst-editing-services.manifest
+ %defattr(-,root,root,-)
+ %license subprojects/gst-editing-services/COPYING
+ %{_libdir}/libges*.so.*
+ %{_libdir}/gstreamer-1.0/libgstges.so
+ %{_libdir}/gstreamer-1.0/libgstnle.so
+ %exclude %{_libdir}/gst-validate-launcher/python/launcher/apps/geslaunch.py
+ %exclude %{_datadir}/gstreamer-%{gst_branch}/validate/scenarios/ges-edit-clip-while-paused.scenario
+ %{_bindir}/ges*-%{gst_branch}
+ %files -n gst-editing-services-devel
+ %{_libdir}/libges*.so
+ %{_includedir}/gstreamer-1.0/ges/*
+ %{_libdir}/pkgconfig/gst-editing-services-1.0.pc
+ %endif
Simple merge
Simple merge
    return ret;
  }
  
 -
 +static GstElement *
 +_build_fec_encoder (GstWebRTCBin * webrtc, WebRTCTransceiver * trans)
 +{
 +  GstElement *ret = NULL;
 +  GstElement *prev = NULL;
 +  guint ulpfec_pt = 0;
 +  guint red_pt = 0;
 +  GstPad *sinkpad = NULL;
 +  GstWebRTCRTPTransceiver *rtp_trans = GST_WEBRTC_RTP_TRANSCEIVER (trans);
 +
 +  if (trans->stream) {
 +    ulpfec_pt =
 +        transport_stream_get_pt (trans->stream, "ULPFEC", rtp_trans->mline);
 +    red_pt = transport_stream_get_pt (trans->stream, "RED", rtp_trans->mline);
 +  }
 +
 +  if (ulpfec_pt || red_pt)
 +    ret = gst_bin_new (NULL);
 +
 +  if (ulpfec_pt) {
 +    GstElement *fecenc = gst_element_factory_make ("rtpulpfecenc", NULL);
 +    GstCaps *caps = transport_stream_get_caps_for_pt (trans->stream, ulpfec_pt);
 +
 +    GST_DEBUG_OBJECT (webrtc,
 +        "Creating ULPFEC encoder for mline %u with pt %d", rtp_trans->mline,
 +        ulpfec_pt);
 +
 +    gst_bin_add (GST_BIN (ret), fecenc);
 +    sinkpad = gst_element_get_static_pad (fecenc, "sink");
 +    g_object_set (fecenc, "pt", ulpfec_pt, "percentage",
 +        trans->fec_percentage, NULL);
 +
 +    g_object_bind_property (rtp_trans, "fec-percentage", fecenc, "percentage",
 +        G_BINDING_BIDIRECTIONAL);
 +
 +    if (caps && !gst_caps_is_empty (caps)) {
 +      const GstStructure *s = gst_caps_get_structure (caps, 0);
 +      const gchar *media = gst_structure_get_string (s, "media");
 +
 +      if (!g_strcmp0 (media, "video"))
 +        g_object_set (fecenc, "multipacket", TRUE, NULL);
 +    }
 +
 +    prev = fecenc;
 +  }
 +
 +  if (red_pt) {
 +    GstElement *redenc = gst_element_factory_make ("rtpredenc", NULL);
 +
 +    GST_DEBUG_OBJECT (webrtc, "Creating RED encoder for mline %u with pt %d",
 +        rtp_trans->mline, red_pt);
 +
 +    gst_bin_add (GST_BIN (ret), redenc);
 +    if (prev)
 +      gst_element_link (prev, redenc);
 +    else
 +      sinkpad = gst_element_get_static_pad (redenc, "sink");
 +
 +    g_object_set (redenc, "pt", red_pt, "allow-no-red-blocks", TRUE, NULL);
 +
 +    prev = redenc;
 +  }
 +
 +  if (sinkpad) {
 +    GstPad *ghost = gst_ghost_pad_new ("sink", sinkpad);
 +    gst_object_unref (sinkpad);
 +    gst_element_add_pad (ret, ghost);
 +  }
 +
 +  if (prev) {
 +    GstPad *srcpad = gst_element_get_static_pad (prev, "src");
 +    GstPad *ghost = gst_ghost_pad_new ("src", srcpad);
 +    gst_object_unref (srcpad);
 +    gst_element_add_pad (ret, ghost);
 +  }
 +
 +  return ret;
 +}
 +
+ #ifdef TIZEN_FEATURE_WEBRTC_IMPORT_NETSIM
+ static void
+ _insert_netsim_element_between (GstWebRTCBin * webrtc, GstElement * srcbin,
+     const gchar * srcpadname, GstElement * sinkbin, const gchar * sinkpadname,
+     guint idx)
+ {
+   gboolean send = !g_strcmp0 (sinkpadname, "rtp_sink");
+   gchar *netsim_name = g_strdup_printf ("netsim_%s_%u",
+       send ? "send" : "recv", idx);
+   GstElement *netsim = gst_element_factory_make ("netsim", netsim_name);
+   g_free (netsim_name);
+   gst_bin_add (GST_BIN (webrtc), netsim);
+   g_object_set (netsim, "drop-probability",
+       send ? webrtc->priv->drop_probability_sender :
+       webrtc->priv->drop_probability_receiver, NULL);
+   gst_element_sync_state_with_parent (netsim);
+   if (!gst_element_link_pads (srcbin, srcpadname, netsim, "sink"))
+     g_warn_if_reached ();
+   if (!gst_element_link_pads (netsim, "src", sinkbin, sinkpadname))
+     g_warn_if_reached ();
+ }
+ #endif
 +
  static GstPad *
  _connect_input_stream (GstWebRTCBin * webrtc, GstWebRTCBinPad * pad)
  {
@@@ -230,16 -187,12 +230,15 @@@ gst_vtenc_base_init (GstVTEncClass * kl
    g_free (longname);
    g_free (description);
  
 -  caps = gst_static_caps_get (&sink_caps);
 -  sink_template = gst_pad_template_new ("sink",
 -      GST_PAD_SINK, GST_PAD_ALWAYS, caps);
 -  gst_element_class_add_pad_template (element_class, sink_template);
 -  gst_caps_unref (caps);
 +  {
 +    GstCaps *caps = gst_static_caps_get (&sink_caps);
 +    /* RGBA64_LE is kCVPixelFormatType_64RGBALE, only available on macOS 11.3+ */
 +    if (GST_VTUTIL_HAVE_64ARGBALE)
 +      caps = gst_vtutil_caps_append_video_format (caps, "RGBA64_LE");
 +    gst_element_class_add_pad_template (element_class,
 +        gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, caps));
 +  }
  
    src_caps = gst_caps_new_simple (codec_details->mimetype,
        "width", GST_TYPE_INT_RANGE, min_width, max_width,
        "height", GST_TYPE_INT_RANGE, min_height, max_height,
@@@ -70,7 -70,7 +70,7 @@@ option('xvideo', type : 'feature', valu
  option('examples', type : 'feature', value : 'auto', yield : true)
  option('tests', type : 'feature', value : 'auto', yield : true)
  option('tools', type : 'feature', value : 'auto', yield : true)
--option('introspection', type : 'feature', value : 'auto', yield : true, description : 'Generate gobject-introspection bindings')
++option('introspection', type : 'feature', value : 'auto', yield : false, description : 'Generate gobject-introspection bindings')
  option('nls', type : 'feature', value : 'auto', yield: true, description : 'Enable native language support (translations)')
  option('orc', type : 'feature', value : 'auto', yield : true)
  option('gobject-cast-checks', type : 'feature', value : 'auto', yield : true,
@@@ -542,7 -471,25 +547,19 @@@ gst_soup_http_src_reset (GstSoupHTTPSr
    src->increase_blocksize_count = 0;
    src->last_socket_read_time = 0;
  
+ #ifdef TIZEN_FEATURE_SOUP_MODIFICATION
+   if (src->dash_oldest_segment) {
+     g_free (src->dash_oldest_segment);
+     src->dash_oldest_segment = NULL;
+   }
+   if (src->dash_newest_segment) {
+     g_free (src->dash_newest_segment);
+     src->dash_newest_segment = NULL;
+   }
+   src->dlna_opt = 0;
+ #endif
    g_cancellable_reset (src->cancellable);
 -  g_mutex_lock (&src->mutex);
 -  if (src->input_stream) {
 -    g_object_unref (src->input_stream);
 -    src->input_stream = NULL;
 -  }
 -  g_mutex_unlock (&src->mutex);
  
    gst_caps_replace (&src->src_caps, NULL);
    g_free (src->iradio_name);
@@@ -2109,11 -1973,14 +2255,14 @@@ gst_soup_http_src_read_buffer (GstSoupH
    }
  
    gst_buffer_unmap (*outbuf, &mapinfo);
 -  if (read_bytes > 0) {
 -    gst_buffer_set_size (*outbuf, read_bytes);
 +  if (res.nbytes > 0) {
 +    gst_buffer_set_size (*outbuf, res.nbytes);
      GST_BUFFER_OFFSET (*outbuf) = bsrc->segment.position;
      ret = GST_FLOW_OK;
 -    gst_soup_http_src_update_position (src, read_bytes);
 +    gst_soup_http_src_update_position (src, res.nbytes);
+ #ifdef TIZEN_FEATURE_SOUP_MODIFICATION
 -    src->received_total += read_bytes;
++    src->received_total += res.nbytes;
+ #endif
  
      /* Got some data, reset retry counter */
      src->retry_count = 0;
@@@ -2286,10 -2109,17 +2435,21 @@@ gst_soup_http_src_start (GstBaseSrc * b
  
    GST_DEBUG_OBJECT (src, "start(\"%s\")", src->location);
  
 -  return gst_soup_http_src_session_open (src);
+ #ifdef TIZEN_FEATURE_SOUP_MODIFICATION
+   if (src->dash_oldest_segment) {
+     g_free (src->dash_oldest_segment);
+     src->dash_oldest_segment = NULL;
+   }
+   if (src->dash_newest_segment) {
+     g_free (src->dash_newest_segment);
+     src->dash_newest_segment = NULL;
+   }
+ #endif
++
 +  g_mutex_lock (&src->session_mutex);
 +  ret = gst_soup_http_src_session_open (src);
 +  g_mutex_unlock (&src->session_mutex);
 +  return ret;
  }
  
  static gboolean
@@@ -687,14 -555,20 +694,24 @@@ _soup_message_headers_get_encoding (Sou
  goffset
  _soup_message_headers_get_content_length (SoupMessageHeaders * hdrs)
  {
 +#ifdef STATIC_SOUP
 +  return soup_message_headers_get_content_length (hdrs);
 +#else
    g_assert (gst_soup_vtable._soup_message_headers_get_content_length != NULL);
    return gst_soup_vtable._soup_message_headers_get_content_length (hdrs);
 +#endif
  }
  
+ #ifdef TIZEN_FEATURE_SOUP_MODIFICATION
+ gboolean
+ _soup_message_headers_get_content_range (SoupMessageHeaders * hdrs,
+     goffset *start, goffset *end, goffset *total_length)
+ {
+   g_assert (gst_soup_vtable._soup_message_headers_get_content_range != NULL);
+   return gst_soup_vtable._soup_message_headers_get_content_range (hdrs, start, end, total_length);
+ }
+ #endif
  SoupStatus
  _soup_message_get_status (SoupMessage * msg)
  {
@@@ -768,10 -773,8 +768,12 @@@ struct v4l2_pix_format 
  #define V4L2_META_FMT_D4XX        v4l2_fourcc('D', '4', 'X', 'X') /* D4XX Payload Header metadata */
  #define V4L2_META_FMT_VIVID     v4l2_fourcc('V', 'I', 'V', 'D') /* Vivid Metadata */
  
 +/* Vendor specific - used for RK_ISP1 camera sub-system */
 +#define V4L2_META_FMT_RK_ISP1_PARAMS  v4l2_fourcc('R', 'K', '1', 'P') /* Rockchip ISP1 3A Parameters */
 +#define V4L2_META_FMT_RK_ISP1_STAT_3A v4l2_fourcc('R', 'K', '1', 'S') /* Rockchip ISP1 3A Statistics */
 +
+ #define V4L2_PIX_FMT_INVZ     v4l2_fourcc('I', 'N', 'V', 'Z') /* Intel Planar Depth 16-bit */
  /* priv field value to indicates that subsequent fields are valid. */
  #define V4L2_PIX_FMT_PRIV_MAGIC               0xfeedcafe
  
@@@ -66,23 -68,79 +68,97 @@@ enum _GstV4l2BufferPoolAcquireFlag
    GST_V4L2_BUFFER_POOL_ACQUIRE_FLAG_LAST
  };
  
 -#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
 +/* Buffer state flags */
 +enum _GstV4l2BufferState
 +{
 +  /* Buffer is free (either on the GstBufferPool free queue, or no GstBuffer has
 +   * been allocated yet) */
 +  BUFFER_STATE_FREE = 0,
 +
 +  /* Buffer had outstanding external users */
 +  BUFFER_STATE_OUTSTANDING = 1,
 +
 +  /* Buffer is on one of the kernel queues */
 +  BUFFER_STATE_QUEUED = 2,
 +};
 +
 +static void gst_v4l2_buffer_pool_complete_release_buffer (GstBufferPool * bpool,
 +    GstBuffer * buffer, gboolean queued);
 +
++#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
+ static void gst_v4l2_buffer_pool_release_buffer (GstBufferPool * bpool,
+     GstBuffer * buffer);
++
+ typedef struct _GstV4l2TizenBuffer GstV4l2TizenBuffer;
+ struct _GstV4l2TizenBuffer {
+   int index;
+   GstBuffer *gst_buffer;
+   GstBuffer *v4l2_buffer;
+   GstV4l2BufferPool *v4l2_pool;
+ };
+ static void gst_v4l2_tizen_buffer_finalize (GstV4l2TizenBuffer *tizen_buffer)
+ {
+   GstV4l2BufferPool *pool = NULL;
+   if (!tizen_buffer) {
+     GST_ERROR ("NULL buffer");
+     return;
+   }
+   pool = tizen_buffer->v4l2_pool;
+   gst_v4l2_buffer_pool_release_buffer (GST_BUFFER_POOL_CAST (pool), tizen_buffer->v4l2_buffer);
+   g_mutex_lock (&pool->buffer_lock);
+   pool->live_buffer_count--;
+   GST_DEBUG_OBJECT (pool, "release buffer[%d][tizen:%p,v4l2:%p,gst:%p], live[%d]",
+       tizen_buffer->index, tizen_buffer, tizen_buffer->v4l2_buffer,
+       tizen_buffer->gst_buffer, pool->live_buffer_count);
+   g_cond_signal (&pool->buffer_cond);
+   g_mutex_unlock (&pool->buffer_lock);
+   gst_object_unref (pool);
+   g_free(tizen_buffer);
+ }
+ static GstV4l2TizenBuffer *gst_v4l2_tizen_buffer_new (GstBuffer *v4l2_buffer, int index, GstV4l2BufferPool *v4l2_pool)
+ {
+   GstV4l2TizenBuffer *tizen_buffer = NULL;
+   GstMemory *memory = NULL;
+   tizen_buffer = g_new0 (GstV4l2TizenBuffer, 1);
+   tizen_buffer->index = index;
+   tizen_buffer->v4l2_buffer = v4l2_buffer;
+   tizen_buffer->gst_buffer = gst_buffer_new ();
+   tizen_buffer->v4l2_pool = gst_object_ref (v4l2_pool);
+   memory = gst_tizen_allocator_alloc_surface (v4l2_pool->tallocator,
+       &v4l2_pool->obj->info, v4l2_pool->vallocator->groups[index]->surface, (gpointer)tizen_buffer,
+       (GDestroyNotify)gst_v4l2_tizen_buffer_finalize);
+   gst_buffer_append_memory (tizen_buffer->gst_buffer, memory);
+   gst_buffer_set_size (tizen_buffer->gst_buffer, v4l2_pool->vallocator->s_info.size);
+   g_mutex_lock (&v4l2_pool->buffer_lock);
+   v4l2_pool->live_buffer_count++;
+   GST_DEBUG_OBJECT (v4l2_pool, "new buffer[tizen:%p,v4l2:%p,gst:%p], size[%d], live[%d]",
+       tizen_buffer, v4l2_buffer, tizen_buffer->gst_buffer,
+       v4l2_pool->vallocator->s_info.size, v4l2_pool->live_buffer_count);
+   g_mutex_unlock (&v4l2_pool->buffer_lock);
+   return tizen_buffer;
+ }
+ #endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
  static gboolean
  gst_v4l2_is_buffer_valid (GstBuffer * buffer, GstV4l2MemoryGroup ** out_group)
  {
@@@ -1295,7 -1361,9 +1399,10 @@@ gst_v4l2_buffer_pool_dqbuf (GstV4l2Buff
    GstVideoMeta *vmeta;
    gsize size;
    gint i;
 +  gint old_buffer_state;
+ #ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
+   GstV4l2TizenBuffer *tizen_buffer = NULL;
+ #endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
  
    if ((res = gst_v4l2_buffer_pool_poll (pool, wait)) < GST_FLOW_OK)
      goto poll_failed;
@@@ -1583,9 -1633,16 +1700,17 @@@ gst_v4l2_buffer_pool_complete_release_b
    GstBufferPoolClass *pclass = GST_BUFFER_POOL_CLASS (parent_class);
    GstV4l2Object *obj = pool->obj;
  
 -  GST_DEBUG_OBJECT (pool, "release buffer %p", buffer);
 +  GST_DEBUG_OBJECT (pool, "complete release buffer %p (queued = %s)", buffer,
 +      queued ? "yes" : "no");
  
+   /* If the buffer's pool has been orphaned, dispose of it so that
+    * the pool resources can be freed */
+   if (pool->orphaned) {
+     GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_TAG_MEMORY);
+     pclass->release_buffer (bpool, buffer);
+     return;
+   }
    switch (obj->type) {
      case V4L2_BUF_TYPE_VIDEO_CAPTURE:
      case V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE:
@@@ -2033,8 -2091,11 +2185,10 @@@ gst_v4l2_buffer_pool_process (GstV4l2Bu
            ret = gst_v4l2_buffer_pool_copy_buffer (pool, *buf, tmp);
  
            /* an queue the buffer again after the copy */
 -          gst_v4l2_buffer_pool_release_buffer (bpool, tmp);
 +          gst_v4l2_buffer_pool_complete_release_buffer (bpool, tmp, FALSE);
+ #ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
+           }
+ #endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
 -
            if (ret != GST_FLOW_OK)
              goto copy_failed;
            break;
Simple merge
@@@ -107,13 -107,11 +107,17 @@@ GstElement*             gst_element_fac
  GST_API
  gboolean                gst_element_register                    (GstPlugin *plugin, const gchar *name,
                                                                   guint rank, GType type);
+ #ifdef TIZEN_PROFILE_TV
+ GST_API
+ GstElement              *gst_element_factory_get                (GstElementFactory * factory, const gchar * name);
+ #endif
  
 +GST_API
 +void                    gst_element_type_set_skip_documentation (GType type);
 +
 +GST_API
 +gboolean                gst_element_factory_get_skip_documentation (GstElementFactory * factory);
 +
  /* Factory list functions */
  
  /**
Simple merge
Simple merge
Simple merge
@@@ -29,7 -29,7 +29,7 @@@ option('examples', type : 'feature', va
  option('tests', type : 'feature', value : 'auto', yield : true)
  option('benchmarks', type : 'feature', value : 'auto', yield : true)
  option('tools', type : 'feature', value : 'auto', yield : true)
--option('introspection', type : 'feature', value : 'auto', yield : true, description : 'Generate gobject-introspection bindings')
++option('introspection', type : 'feature', value : 'auto', yield : false, description : 'Generate gobject-introspection bindings')
  option('nls', type : 'feature', value : 'auto', yield: true, description : 'Enable native language support (translations)')
  option('gobject-cast-checks', type : 'feature', value : 'auto', yield : true,
         description: 'Enable run-time GObject cast checks (auto = enabled for development, disabled for stable releases)')