Apply GStreamer 1.22.0 into Tizen 72/287272/5
authorEunhye Choi <eunhae1.choi@samsung.com>
Wed, 25 Jan 2023 04:26:41 +0000 (13:26 +0900)
committerEunhye Choi <eunhae1.choi@samsung.com>
Fri, 27 Jan 2023 06:53:27 +0000 (15:53 +0900)
- gbs build works : both full and each plugin

Change-Id: I7d4948119a07a67efd66b129e9dd65d70c4230ce

138 files changed:
1  2 
meson.build
meson_options.txt
packaging/gstreamer.spec
subprojects/gst-editing-services/ges/ges-text-overlay-clip.c
subprojects/gst-editing-services/ges/ges-text-overlay.c
subprojects/gst-editing-services/meson.build
subprojects/gst-editing-services/tools/meson.build
subprojects/gst-libav/ext/libav/gstav.c
subprojects/gst-libav/ext/libav/gstavaudenc.c
subprojects/gst-libav/ext/libav/gstavcodecmap.c
subprojects/gst-libav/ext/libav/gstavdemux.c
subprojects/gst-libav/meson.build
subprojects/gst-omx/meson.build
subprojects/gst-plugins-bad/ext/aes/meson.build
subprojects/gst-plugins-bad/ext/dash/gstdashdemux.c
subprojects/gst-plugins-bad/ext/dash/gstmpdclient.c
subprojects/gst-plugins-bad/ext/dash/gstmpdparser.h
subprojects/gst-plugins-bad/ext/dtls/meson.build
subprojects/gst-plugins-bad/ext/hls/gsthlsdemux.c
subprojects/gst-plugins-bad/ext/hls/gsthlsdemux.h
subprojects/gst-plugins-bad/ext/hls/m3u8.c
subprojects/gst-plugins-bad/ext/hls/m3u8.h
subprojects/gst-plugins-bad/ext/hls/meson.build
subprojects/gst-plugins-bad/ext/meson.build
subprojects/gst-plugins-bad/ext/openal/meson.build
subprojects/gst-plugins-bad/ext/srt/gstsrtobject.c
subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c
subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.h
subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcstats.c
subprojects/gst-plugins-bad/ext/webrtc/meson.build
subprojects/gst-plugins-bad/ext/webrtc/webrtcdatachannel.c
subprojects/gst-plugins-bad/gst-libs/gst/adaptivedemux/gstadaptivedemux.c
subprojects/gst-plugins-bad/gst-libs/gst/meson.build
subprojects/gst-plugins-bad/gst-libs/gst/vulkan/wayland/gstvkdisplay_wayland.c
subprojects/gst-plugins-bad/gst-libs/gst/webrtc/datachannel.c
subprojects/gst-plugins-bad/gst-libs/gst/webrtc/meson.build
subprojects/gst-plugins-bad/gst-libs/gst/webrtc/webrtc-priv.h
subprojects/gst-plugins-bad/gst/mpegtsdemux/mpegtsbase.c
subprojects/gst-plugins-bad/gst/mpegtsdemux/mpegtspacketizer.c
subprojects/gst-plugins-bad/gst/mpegtsdemux/mpegtspacketizer.h
subprojects/gst-plugins-bad/gst/mpegtsdemux/tsdemux.c
subprojects/gst-plugins-bad/gst/mxf/mxfdemux.c
subprojects/gst-plugins-bad/gst/videoparsers/gsth264parse.c
subprojects/gst-plugins-bad/meson.build
subprojects/gst-plugins-bad/meson_options.txt
subprojects/gst-plugins-bad/tests/examples/camerabin2/gst-camerabin2-test.c
subprojects/gst-plugins-base/gst-libs/gst/allocators/meson.build
subprojects/gst-plugins-base/gst-libs/gst/audio/gstaudiodecoder.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-format.c
subprojects/gst-plugins-base/gst-libs/gst/video/video-format.h
subprojects/gst-plugins-base/gst-libs/gst/video/video-info.c
subprojects/gst-plugins-base/gst/playback/gstdecodebin2.c
subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c
subprojects/gst-plugins-base/gst/playback/gstrawcaps.h
subprojects/gst-plugins-base/gst/playback/gsturidecodebin3.c
subprojects/gst-plugins-base/gst/subparse/gstsubparse.c
subprojects/gst-plugins-base/gst/subparse/samiparse.c
subprojects/gst-plugins-base/gst/typefind/gsttypefindfunctions.c
subprojects/gst-plugins-base/gst/videoscale/meson.build
subprojects/gst-plugins-base/meson.build
subprojects/gst-plugins-base/meson_options.txt
subprojects/gst-plugins-good/ext/pulse/meson.build
subprojects/gst-plugins-good/ext/pulse/pulsesink.c
subprojects/gst-plugins-good/ext/soup/gstsouphttpsrc.c
subprojects/gst-plugins-good/gst/audioparsers/gstaacparse.c
subprojects/gst-plugins-good/gst/audioparsers/gstmpegaudioparse.c
subprojects/gst-plugins-good/gst/audioparsers/gstmpegaudioparse.h
subprojects/gst-plugins-good/gst/avi/gstavidemux.c
subprojects/gst-plugins-good/gst/flv/gstflvdemux.c
subprojects/gst-plugins-good/gst/isomp4/fourcc.h
subprojects/gst-plugins-good/gst/isomp4/gstqtmux.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/rtpmanager/gstrtpbin.h
subprojects/gst-plugins-good/gst/rtsp/gstrtspsrc.c
subprojects/gst-plugins-good/gst/rtsp/gstrtspsrc.h
subprojects/gst-plugins-good/gst/wavparse/gstwavparse.c
subprojects/gst-plugins-good/meson.build
subprojects/gst-plugins-good/meson_options.txt
subprojects/gst-plugins-good/sys/v4l2/ext/videodev2.h
subprojects/gst-plugins-good/sys/v4l2/gstv4l2.c
subprojects/gst-plugins-good/sys/v4l2/gstv4l2allocator.c
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/gstv4l2object.h
subprojects/gst-plugins-good/sys/v4l2/gstv4l2src.c
subprojects/gst-plugins-good/sys/v4l2/gstv4l2src.h
subprojects/gst-plugins-good/sys/v4l2/gstv4l2videodec.c
subprojects/gst-plugins-good/sys/v4l2/gstv4l2videoenc.c
subprojects/gst-plugins-good/sys/v4l2/meson.build
subprojects/gst-plugins-good/sys/v4l2/v4l2_calls.c
subprojects/gst-plugins-ugly/ext/a52dec/meson.build
subprojects/gst-plugins-ugly/ext/dvdread/dvdreadsrc.c
subprojects/gst-plugins-ugly/gst/asfdemux/gstasfdemux.c
subprojects/gst-plugins-ugly/meson.build
subprojects/gst-plugins-ugly/meson_options.txt
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-client.c
subprojects/gst-rtsp-server/gst/rtsp-server/rtsp-client.h
subprojects/gst-rtsp-server/gst/rtsp-server/rtsp-media.c
subprojects/gst-rtsp-server/gst/rtsp-server/rtsp-server.c
subprojects/gst-rtsp-server/gst/rtsp-server/rtsp-stream.c
subprojects/gst-rtsp-server/gst/rtsp-sink/gstrtspclientsink.c
subprojects/gst-rtsp-server/meson.build
subprojects/gstreamer/docs/meson.build
subprojects/gstreamer/gst/gstbin.c
subprojects/gstreamer/gst/gstelement.c
subprojects/gstreamer/gst/gstelementfactory.c
subprojects/gstreamer/gst/gstinfo.c
subprojects/gstreamer/gst/gstobject.c
subprojects/gstreamer/gst/gstpad.c
subprojects/gstreamer/gst/gstquark.c
subprojects/gstreamer/gst/gstquark.h
subprojects/gstreamer/gst/gstquery.c
subprojects/gstreamer/gst/gstquery.h
subprojects/gstreamer/gst/gsttaglist.c
subprojects/gstreamer/gst/gstutils.c
subprojects/gstreamer/gst/meson.build
subprojects/gstreamer/libs/gst/base/gstbaseparse.c
subprojects/gstreamer/libs/gst/base/gstbasesrc.c
subprojects/gstreamer/libs/gst/base/meson.build
subprojects/gstreamer/libs/gst/helpers/meson.build
subprojects/gstreamer/meson.build
subprojects/gstreamer/plugins/elements/gstfilesink.c
subprojects/gstreamer/plugins/elements/gstinputselector.c
subprojects/gstreamer/plugins/elements/gstmultiqueue.c
subprojects/gstreamer/plugins/elements/gstqueue.c
subprojects/gstreamer/plugins/elements/gstqueue2.c
subprojects/gstreamer/plugins/elements/gsttypefindelement.c
subprojects/gstreamer/tools/meson.build

diff --cc meson.build
@@@ -1,6 -1,6 +1,6 @@@
  project('gstreamer-full', 'c',
-   version : '1.20.0',
-   meson_version : '>= 0.59',
+   version : '1.22.0',
 -  meson_version : '>= 0.62.0',
++  meson_version : '>= 0.59.0',
    default_options : ['buildtype=debugoptimized',
                       # Needed due to https://github.com/mesonbuild/meson/issues/1889,
                       # but this can cause problems in the future. Remove it
@@@ -380,11 -473,13 +473,11 @@@ endi
  message('Building subprojects: ' + ', '.join(subprojects_names))
  
  setenv = find_program('gst-env.py')
- devenv_cmd = [setenv, '--builddir=@0@'.format(meson.project_build_root()),
-               '--gstbuilddir=@0@'.format(meson.current_build_dir()),
-               '--srcdir=@0@'.format(meson.project_source_root())]
  
- subdir('tests')
+ devenv_cmd = [setenv, '--builddir=@0@'.format(meson.global_build_root()),
+               '--srcdir=@0@'.format(meson.global_source_root())]
 -subdir('tests')
 -subdir('ci/fuzzing')
  if meson.can_run_host_binaries() and build_machine.system() == 'linux' and host_machine.system() == 'windows'
    # FIXME: Ideally we could get the wrapper directly from meson
    devenv_cmd += ['--wine', host_machine.cpu_family() == 'x86_64' ? 'wine64' : 'wine32']
@@@ -402,6 -496,30 +494,29 @@@ if orc_subproject.found() and orc_updat
    alias_target('update-orc-dist', orc_update_targets)
  endif
  
 -subdir('scripts')
+ dotnet_format = find_program('dotnet-format', required: false)
+ if dotnet_format.found()
+     run_target('csharp_format_check',
+         command: [join_paths(meson.current_source_dir(), 'scripts', 'format-csharp'),
+             '--check'
+         ],
+     )
+     run_target('csharp_format_apply',
+         command: [join_paths(meson.current_source_dir(), 'scripts', 'format-csharp'),
+         ],
+     )
+ endif
  summary({
-   'gstreamer-full': get_option('default_library') == 'static',
+   'gstreamer-full library': building_full,
  }, section: 'Build options', bool_yn: true, list_sep: '  ')
+ gst_tools = []
+ foreach tool, data: all_tools
+   gst_tools += tool
+ endforeach
+ summary({
+     'Tools': gst_tools,
+ }, section: 'Build options', list_sep: ', ')
@@@ -16,6 -16,11 +16,11 @@@ option('rs', type : 'feature', value : 
  option('gst-examples', type : 'feature', value : 'auto', description : 'Build gst-examples')
  option('tls', type : 'feature', value : 'auto', description : 'TLS support using glib-networking')
  option('qt5', type : 'feature', value : 'auto', description : 'Qt5 Support')
 -option('tools', type : 'feature', value : 'auto', yield : true, description : 'Build command line tools')
++option('tools', type : 'feature', value : 'enabled', description : 'Build command line tools')
+ # Build for fuzzing
+ option('oss_fuzz', type : 'feature', value : 'disabled',
+        description: 'Use fuzzing build environment')
  
  # Other options
  option('custom_subprojects', type : 'string', value : '', description : 'Comma-separated project names')
index 787b1d7,0000000..84902f0
mode 100644,000000..100644
--- /dev/null
@@@ -1,1314 -1,0 +1,1321 @@@
- Version:        1.20.0
 +%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}
 +%define _enable_v4l2h264enc 0
 +%define _enable_introspection 0
 +
 +#######################################################################
 +## how to build each plugin :
 +## 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 %{_base_opt}videorate=enabled \
++Version:        1.22.0
 +Release:        44
 +Summary:        Streaming-Media Framework Runtime
 +License:        LGPL-2.0+
 +Group:          Multimedia/Framework
 +Url:            http://gstreamer.freedesktop.org/
 +Source0:        gstreamer-%{version}.tar.gz
 +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)
 +%if "%{_enable_introspection}" == "1"
 +BuildRequires:  pkgconfig(gobject-introspection-1.0) >= 1.31.1
 +%endif
 +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:  pkgconfig(gstreamer-1.0)
 +
 +%if "%{plugin}" != "base"
 +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(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 "%{_enable_introspection}" == "1"
 +BuildRequires:  pkgconfig(gobject-introspection-1.0) >= 1.31.1
 +%endif
 +%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.
 +
 +%if "%{tizen_profile_name}" != "tv"
 +%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.
 +%endif
 +
 +%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(gio-2.0)
 +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(libpng) >= 1.2
 +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}
 +Requires:       libsoup
 +
 +%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.
 +
 +%package -n gst-plugins-good-cairo
 +Summary:        Cairo plugin for gst-plugins-good
 +Group:          Multimedia/Framework
 +%if "%{tizen_profile_name}" != "tv"
 +BuildRequires:  pkgconfig(cairo)
 +BuildRequires:  pkgconfig(cairo-gobject)
 +%endif
 +Requires:       gst-plugins-good = %{version}
 +Enhances:       gst-plugins-good
 +
 +%description -n gst-plugins-good-cairo
 +This package provides cairo plugin for gst-plugins-good and
 +this is not included in Tizen headless image.
 +
 +%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(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
 +%if "%{tizen_profile_name}" != "tv"
 +BuildRequires:  pkgconfig(srt)
 +%endif
 +%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 "%{tizen_profile_name}" != "tv"
 +%ifarch %{arm} aarch64 riscv64
 +
 +%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
 +
 +%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 # plugin
 +%endif # arch
 +%endif # profile
 +
 +#######################################################
 +## 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
 +
 +%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 "%{tizen_profile_name}" != "tv"
 +
 +%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:  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 # plugin
 +
 +%endif # profile
 +
 +#######################################################
 +## 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-libav.manifest
 +cp %{SOURCE1001} ./gst-rtsp-server.manifest
 +%if "%{tizen_profile_name}" != "tv"
 +cp %{SOURCE1001} ./gst-omx.manifest
 +cp %{SOURCE1001} ./gst-editing-services.manifest
 +%endif
 +
 +#######################################################
 +## Build
 +#######################################################
 +
 +%build
 +
 +%if "%{plugin}" != "all"
 +pushd %{_source_path}
 +%endif
 +
 +mkdir -p build
 +export CFLAGS="%{optflags} \
 +  -fno-strict-aliasing\
 +  -fstack-protector-strong\
 +  -Wl,-z,relro\
 +%if "%{tizen_profile_name}" == "tv"
 +  -Wno-declaration-after-statement\
 +%endif
 +  -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"
 +  %if "%{tizen_profile_name}" == "tv"
 +    -D ges=disabled \
 +    -D omx=disabled \
 +  %endif # profile
 +  %ifarch x86_64 %{ix86}
 +    -D omx=disabled \
 +  %endif # arch
 +%endif # plugin
 +%if "%{plugin}" == "all" || "%{plugin}" == "core"
 +  -D %{_core_opt}check=enabled \
 +  -D %{_core_opt}coretracers=enabled \
 +  -D %{_core_opt}extra-checks=enabled \
 +  -D %{_core_opt}ptp-helper-permissions=none \
 +  -D %{_core_opt}tools=enabled \
 +  %if "%{tizen_profile_name}" == "tv"
 +    -D %{_core_opt}tv-profile=true \
 +  %endif # profile
 +  %if "%{_enable_introspection}" == "1"
 +    -D %{_core_opt}introspection=enabled \
 +  %endif # introspection
 +%endif # plugin
 +%if "%{plugin}" == "all" || "%{plugin}" == "base"
 +  -D %{_base_opt}alsa=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}gio=enabled \
 +  -D %{_base_opt}gio-typefinder=enabled \
 +  -D %{_base_opt}ogg=enabled \
 +  -D %{_base_opt}opus=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}tbm=true \
 +  -D %{_base_opt}tcp=enabled \
++  -D %{_base_opt}tools=disabled \
 +  -D %{_base_opt}theora=enabled \
 +  -D %{_base_opt}typefind=enabled \
++  -D %{_base_opt}videoconvertscale=disabled \
 +  -D %{_base_opt}videoconvert=enabled \
- %{_lib_gstreamer_dir}/libgstvideorate.so
 +  -D %{_base_opt}videoscale=enabled \
++  -D %{_base_opt}videorate=enabled \
 +  -D %{_base_opt}videotestsrc=enabled \
 +  -D %{_base_opt}volume=enabled \
 +  -D %{_base_opt}vorbis=enabled \
 +  %if "%{tizen_profile_name}" == "tv"
 +    -D %{_base_opt}tv-profile=true \
 +  %else
 +    -D %{_base_opt}adder=enabled \
 +    -D %{_base_opt}encoding=enabled \
 +    %if 0%{?enable_gl:1}
 +      -D %{_base_opt}gl=enabled \
 +    %endif # gl
 +  %endif # profile
 +  %if "%{_enable_introspection}" == "1"
 +    -D %{_base_opt}introspection=enabled \
 +  %endif # introspection
 +%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}icydemux=enabled \
 +  -D %{_good_opt}id3demux=enabled \
 +  -D %{_good_opt}interleave=enabled \
 +  -D %{_good_opt}isomp4=enabled \
 +  -D %{_good_opt}jpeg=enabled \
 +  -D %{_good_opt}law=enabled \
 +  -D %{_good_opt}pulse=enabled \
 +  -D %{_good_opt}replaygain=enabled \
 +  -D %{_good_opt}rtp=enabled \
 +  -D %{_good_opt}rtpmanager=enabled \
 +  -D %{_good_opt}rtsp=enabled \
 +  -D %{_good_opt}soup=enabled \
 +  -D %{_good_opt}tbm=true \
 +  -D %{_good_opt}udp=enabled \
 +  -D %{_good_opt}videocrop=enabled \
 +  -D %{_good_opt}videofilter=enabled \
 +  -D %{_good_opt}vpx=enabled \
 +  -D %{_good_opt}wavenc=enabled \
 +  -D %{_good_opt}wavparse=enabled \
 +  %if "%{_enable_v4l2h264enc}" == "1"
 +    -D %{_good_opt}v4l2h264enc=enabled \
 +  %endif
 +  %if "%{tizen_profile_name}" == "tv"
 +    -D %{_good_opt}tv-profile=true \
 +    %ifnarch %{arm} aarch64
 +      -D %{_good_opt}v4l2=enabled \
 +    %endif
 +  %else
 +    -D %{_good_opt}cairo=enabled \
 +    -D %{_good_opt}effectv=enabled \
 +    -D %{_good_opt}flv=enabled \
 +    -D %{_good_opt}imagefreeze=enabled \
 +    -D %{_good_opt}matroska=enabled \
 +    -D %{_good_opt}multifile=enabled \
 +    -D %{_good_opt}png=enabled \
 +    -D %{_good_opt}smpte=enabled \
 +    -D %{_good_opt}v4l2=enabled \
 +    -D %{_good_opt}v4l2-libv4l2=enabled \
 +    -D %{_good_opt}v4l2-probe=true \
 +    -D %{_good_opt}videobox=enabled \
 +    -D %{_good_opt}videomixer=enabled \
 +  %endif # profile
 +%endif # plugin
 +%if "%{plugin}" == "all" || "%{plugin}" == "bad"
 +  -D %{_bad_opt}aes=enabled \
 +  -D %{_bad_opt}audiobuffersplit=enabled \
 +  -D %{_bad_opt}audiolatency=enabled \
 +  -D %{_bad_opt}audiomixmatrix=enabled \
 +  -D %{_bad_opt}debugutils=enabled \
 +  -D %{_bad_opt}dtls=enabled \
 +  -D %{_bad_opt}gst_play_tests=false\
 +  -D %{_bad_opt}introspection=disabled \
 +  -D %{_bad_opt}ipcpipeline=enabled \
 +  -D %{_bad_opt}midi=enabled \
 +  -D %{_bad_opt}mpegtsdemux=enabled \
 +  -D %{_bad_opt}mpegtsmux=enabled \
 +  -D %{_bad_opt}netsim=enabled \
 +  -D %{_bad_opt}openal=enabled \
 +  -D %{_bad_opt}opus=enabled \
 +  -D %{_bad_opt}proxy=enabled \
 +  -D %{_bad_opt}sctp=enabled \
 +  -D %{_bad_opt}sdp=enabled \
 +  -D %{_bad_opt}shm=enabled \
 +  -D %{_bad_opt}soundtouch=enabled \
 +  -D %{_bad_opt}srtp=enabled \
 +  -D %{_bad_opt}timecode=enabled \
 +  -D %{_bad_opt}videoframe_audiolevel=enabled \
 +  -D %{_bad_opt}videoparsers=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}camerabin2=enabled \
 +    -D %{_bad_opt}coloreffects=enabled \
 +    -D %{_bad_opt}dash=enabled \
 +    -D %{_bad_opt}gaudieffects=enabled \
 +    -D %{_bad_opt}gdp=enabled \
 +    -D %{_bad_opt}hls=enabled \
 +    -D %{_bad_opt}id3tag=enabled \
 +    -D %{_bad_opt}jpegformat=enabled \
 +    -D %{_bad_opt}mpegdemux=enabled \
 +    -D %{_bad_opt}rist=enabled \
 +    -D %{_bad_opt}rtp=enabled \
 +    -D %{_bad_opt}srt=enabled \
 +    -D %{_bad_opt}smoothstreaming=enabled \
 +    %if 0%{?enable_gl:1}
 +      -D %{_bad_opt}gl=enabled \
 +    %endif # gl
 +  %endif # profile
 +%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}amrnb=enabled \
 +    -D %{_ugly_opt}asfdemux=enabled \
 +  %endif # profile
 +%endif # plugin
 +%if "%{plugin}" == "all" || "%{plugin}" == "libav"
 +  %if "%{tizen_profile_name}" == "tv"
 +    -D %{_libav_opt}tv-profile=true \
 +  %endif # profile
 +%endif # plugin
 +%if "%{plugin}" == "all" || "%{plugin}" == "rs"
 +  %if "%{tizen_profile_name}" == "tv"
 +    -D %{_rs_opt}tv-profile=true \
 +  %endif # profile
 +  -D %{_rs_opt}introspection=disabled \
 +  -D %{_rs_opt}rtspclientsink=enabled \
 +%endif
 +%if "%{tizen_profile_name}" != "tv"
 +  %ifarch %{arm} aarch64 riscv64
 +    %if "%{plugin}" == "all" || "%{plugin}" == "omx"
++      -D %{_omx_opt}tools=disabled \
 +      %if "%{target}" == "rpi"
 +        -D %{_omx_opt}header_path=/opt/vc/include/interface/vmcs_host/khronos/IL \
 +        -D %{_omx_opt}target=rpi \
 +      %else
 +        %ifarch riscv64
 +          -D %{_omx_opt}target=generic \
 +        %else
 +          %ifarch aarch64
 +            -D %{_omx_opt}target=exynos64 \
 +          %else
 +            -D %{_omx_opt}target=exynos \
 +            -D %{_omx_opt}vp9=true \
 +          %endif # arch aarch64
 +        %endif # arch riscv64
 +      %endif # target
 +    %endif # plugin
 +  %endif # arch
 +  %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 # plugin
 +%endif # profile
 +  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-%{gst_branch}.so.*
 +%{_libdir}/libgstcontroller-%{gst_branch}.so.*
 +%{_libdir}/libgstnet-%{gst_branch}.so.*
 +%{_libdir}/libgstcheck-%{gst_branch}.so.*
 +%{_libdir}/libgstreamer-%{gst_branch}.so.*
 +%if "%{_enable_introspection}" == "1"
 +%{_lib_girepository}/Gst-%{gst_branch}.typelib
 +%{_lib_girepository}/GstBase-%{gst_branch}.typelib
 +%{_lib_girepository}/GstController-%{gst_branch}.typelib
 +%{_lib_girepository}/GstNet-%{gst_branch}.typelib
 +%{_lib_girepository}/GstCheck-%{gst_branch}.typelib
 +%endif #introspection
 +%{_datadir}/gdb/auto-load/usr/%{_lib}/libgstreamer-%{gst_branch}*-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-%{gst_branch}
 +%{_bindir}/gst-launch-%{gst_branch}
 +%{_bindir}/gst-stats-%{gst_branch}
 +%{_bindir}/gst-typefind-%{gst_branch}
 +%exclude %doc %{_mandir}/man?/*-%{gst_branch}.*
 +
 +%files -n gstreamer-devel
 +%manifest gstreamer.manifest
 +%defattr(-, root, root)
 +%{_datadir}/aclocal/gst-element-check-%{gst_branch}.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/*
 +%{_includedir}/gstreamer-%{gst_branch}/gst/check/*
 +%{_libdir}/libgstbase-%{gst_branch}.so
 +%{_libdir}/libgstcontroller-%{gst_branch}.so
 +%{_libdir}/libgstnet-%{gst_branch}.so
 +%{_libdir}/libgstcheck-%{gst_branch}.so
 +%{_libdir}/libgstreamer-%{gst_branch}.so
 +%{_libdir}/pkgconfig/gstreamer-%{gst_branch}.pc
 +%{_libdir}/pkgconfig/gstreamer-base-%{gst_branch}.pc
 +%{_libdir}/pkgconfig/gstreamer-controller-%{gst_branch}.pc
 +%{_libdir}/pkgconfig/gstreamer-net-%{gst_branch}.pc
 +%{_libdir}/pkgconfig/gstreamer-check-%{gst_branch}.pc
 +%if "%{_enable_introspection}" == "1"
 +%{_datadir}/gir-%{gst_branch}/Gst-%{gst_branch}.gir
 +%{_datadir}/gir-%{gst_branch}/GstBase-%{gst_branch}.gir
 +%{_datadir}/gir-%{gst_branch}/GstController-%{gst_branch}.gir
 +%{_datadir}/gir-%{gst_branch}/GstNet-%{gst_branch}.gir
 +%{_datadir}/gir-%{gst_branch}/GstCheck-%{gst_branch}.gir
 +%endif #introspection
 +
 +%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}/libgstaudiomixer.so
 +%{_lib_gstreamer_dir}/libgstaudiorate.so
 +%{_lib_gstreamer_dir}/libgstaudioresample.so
 +%{_lib_gstreamer_dir}/libgstaudiotestsrc.so
 +%{_lib_gstreamer_dir}/libgstcompositor.so
 +%{_lib_gstreamer_dir}/libgstgio.so
 +%{_lib_gstreamer_dir}/libgstogg.so
 +%{_lib_gstreamer_dir}/libgstopus.so
 +%{_lib_gstreamer_dir}/libgstoverlaycomposition.so
 +%{_lib_gstreamer_dir}/libgstpbtypes.so
 +%{_lib_gstreamer_dir}/libgstplayback.so
 +%{_lib_gstreamer_dir}/libgstrawparse.so
 +%{_lib_gstreamer_dir}/libgstsubparse.so
 +%{_lib_gstreamer_dir}/libgsttcp.so
 +%{_lib_gstreamer_dir}/libgsttheora.so
 +%{_lib_gstreamer_dir}/libgsttypefindfunctions.so
++#%{_lib_gstreamer_dir}/libgstvideoconvertscale.so
 +%{_lib_gstreamer_dir}/libgstvideoconvert.so
- %exclude %{_libdir}/debug/.build-id/*
 +%{_lib_gstreamer_dir}/libgstvideoscale.so
++%{_lib_gstreamer_dir}/libgstvideorate.so
 +%{_lib_gstreamer_dir}/libgstvideotestsrc.so
 +%{_lib_gstreamer_dir}/libgstvolume.so
 +%{_lib_gstreamer_dir}/libgstvorbis.so
 +%if %{with x}
 +%{_lib_gstreamer_dir}/libgstximagesink.so
 +%{_lib_gstreamer_dir}/libgstxvimagesink.so
 +%endif
 +%{_libdir}/libgstallocators-%{gst_branch}.so.*
 +%{_libdir}/libgstapp-%{gst_branch}.so.*
 +%{_libdir}/libgstaudio-%{gst_branch}.so.*
 +%{_libdir}/libgstfft-%{gst_branch}.so.*
 +%{_libdir}/libgstpbutils-%{gst_branch}.so.*
 +%{_libdir}/libgstriff-%{gst_branch}.so.*
 +%{_libdir}/libgstrtp-%{gst_branch}.so.*
 +%{_libdir}/libgstrtsp-%{gst_branch}.so.*
 +%{_libdir}/libgstsdp-%{gst_branch}.so.*
 +%{_libdir}/libgsttag-%{gst_branch}.so.*
 +%{_libdir}/libgstvideo-%{gst_branch}.so.*
 +%if "%{tizen_profile_name}" != "tv"
 +%{_lib_gstreamer_dir}/libgstencoding.so
 +%endif #profile
 +%if "%{_enable_introspection}" == "1"
 +%{_lib_girepository}/GstAllocators-%{gst_branch}.typelib
 +%{_lib_girepository}/GstApp-%{gst_branch}.typelib
 +%{_lib_girepository}/GstAudio-%{gst_branch}.typelib
 +%{_lib_girepository}/GstPbutils-%{gst_branch}.typelib
 +%{_lib_girepository}/GstRtp-%{gst_branch}.typelib
 +%{_lib_girepository}/GstRtsp-%{gst_branch}.typelib
 +%{_lib_girepository}/GstSdp-%{gst_branch}.typelib
 +%{_lib_girepository}/GstTag-%{gst_branch}.typelib
 +%{_lib_girepository}/GstVideo-%{gst_branch}.typelib
 +%endif #introspection
 +%dir %{_datadir}/gst-plugins-base/
 +%dir %{_datadir}/gst-plugins-base/%{gst_branch}/
 +%{_datadir}/gst-plugins-base/%{gst_branch}/license-translations.dict
 +
 +%if "%{tizen_profile_name}" != "tv"
 +%files -n gst-plugins-base-extension-adder
 +%{_lib_gstreamer_dir}/libgstadder.so
 +%license subprojects/gst-plugins-base/COPYING
 +%endif # profile
 +
 +%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" && "%{tizen_profile_name}" != "tv"
 +%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-%{gst_branch}.so
 +%{_libdir}/libgstapp-%{gst_branch}.so
 +%{_libdir}/libgstaudio-%{gst_branch}.so
 +%{_libdir}/libgstfft-%{gst_branch}.so
 +%{_libdir}/libgstpbutils-%{gst_branch}.so
 +%{_libdir}/libgstriff-%{gst_branch}.so
 +%{_libdir}/libgstrtp-%{gst_branch}.so
 +%{_libdir}/libgstrtsp-%{gst_branch}*.so
 +%{_libdir}/libgstsdp-%{gst_branch}.so
 +%{_libdir}/libgsttag-%{gst_branch}.so
 +%{_libdir}/libgstvideo-%{gst_branch}.so
 +%{_libdir}/pkgconfig/gstreamer-allocators-%{gst_branch}.pc
 +%{_libdir}/pkgconfig/gstreamer-app-%{gst_branch}.pc
 +%{_libdir}/pkgconfig/gstreamer-audio-%{gst_branch}.pc
 +%{_libdir}/pkgconfig/gstreamer-fft-%{gst_branch}.pc
 +%{_libdir}/pkgconfig/gstreamer-pbutils-%{gst_branch}.pc
 +%{_libdir}/pkgconfig/gstreamer-plugins-base-%{gst_branch}.pc
 +%{_libdir}/pkgconfig/gstreamer-riff-%{gst_branch}.pc
 +%{_libdir}/pkgconfig/gstreamer-rtp-%{gst_branch}.pc
 +%{_libdir}/pkgconfig/gstreamer-rtsp-%{gst_branch}.pc
 +%{_libdir}/pkgconfig/gstreamer-sdp-%{gst_branch}.pc
 +%{_libdir}/pkgconfig/gstreamer-tag-%{gst_branch}.pc
 +%{_libdir}/pkgconfig/gstreamer-video-%{gst_branch}.pc
 +%if "%{_enable_introspection}" == "1"
 +%{_datadir}/gir-%{gst_branch}/GstAllocators-%{gst_branch}.gir
 +%{_datadir}/gir-%{gst_branch}/GstApp-%{gst_branch}.gir
 +%{_datadir}/gir-%{gst_branch}/GstAudio-%{gst_branch}.gir
 +%{_datadir}/gir-%{gst_branch}/GstPbutils-%{gst_branch}.gir
 +%{_datadir}/gir-%{gst_branch}/GstRtp-%{gst_branch}.gir
 +%{_datadir}/gir-%{gst_branch}/GstRtsp-%{gst_branch}.gir
 +%{_datadir}/gir-%{gst_branch}/GstSdp-%{gst_branch}.gir
 +%{_datadir}/gir-%{gst_branch}/GstTag-%{gst_branch}.gir
 +%{_datadir}/gir-%{gst_branch}/GstVideo-%{gst_branch}.gir
 +%endif # introspection
 +
 +%endif # plugin
 +
 +###################### 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}/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}/libgstmulaw.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}/libgstsoup.so
 +%{_lib_gstreamer_dir}/libgstudp.so
 +%{_lib_gstreamer_dir}/libgstvideocrop.so
 +%{_lib_gstreamer_dir}/libgstvideofilter.so
 +%{_lib_gstreamer_dir}/libgstvpx.so
 +%{_lib_gstreamer_dir}/libgstwavenc.so
 +%{_lib_gstreamer_dir}/libgstwavparse.so
 +%if %{with x}
 +%{_lib_gstreamer_dir}/libgstximagesrc.so
 +%endif # x
 +%if "%{tizen_profile_name}" != "tv"
 +%{_lib_gstreamer_dir}/libgsteffectv.so
 +%{_lib_gstreamer_dir}/libgstflv.so
 +%{_lib_gstreamer_dir}/libgstimagefreeze.so
 +%{_lib_gstreamer_dir}/libgstmatroska.so
 +%{_lib_gstreamer_dir}/libgstmultifile.so
 +%{_lib_gstreamer_dir}/libgstsmpte.so
 +%{_lib_gstreamer_dir}/libgstvideo4linux2.so
 +%{_lib_gstreamer_dir}/libgstvideobox.so
 +%{_lib_gstreamer_dir}/libgstvideomixer.so
 +%else # profile
 +%ifnarch %{arm} aarch64
 +%{_lib_gstreamer_dir}/libgstvideo4linux2.so
 +%endif # arch
 +%endif # profile
 +%{_datadir}/gstreamer-%{gst_branch}/presets/GstQTMux.prs
 +%{_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
 +%if "%{tizen_profile_name}" != "tv"
 +%{_lib_gstreamer_dir}/libgstimagefreeze.so
 +%{_lib_gstreamer_dir}/libgstpng.so
 +%endif
 +
 +%files -n gst-plugins-good-cairo
 +%manifest gst-plugins-good.manifest
 +%defattr(-, root, root)
 +%license subprojects/gst-plugins-good/COPYING
 +%if "%{tizen_profile_name}" != "tv"
 +%{_lib_gstreamer_dir}/libgstcairo.so
 +%endif
 +
 +%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}/libgstcoloreffects.so
 +%{_lib_gstreamer_dir}/libgstdash.so
 +%{_lib_gstreamer_dir}/libgstgaudieffects.so
 +%{_lib_gstreamer_dir}/libgstgdp.so
 +%{_lib_gstreamer_dir}/libgsthls.so
 +%{_lib_gstreamer_dir}/libgstid3tag.so
 +%{_lib_gstreamer_dir}/libgstjpegformat.so
 +%{_lib_gstreamer_dir}/libgstmpegpsdemux.so
 +%{_lib_gstreamer_dir}/libgstrist.so
 +%{_lib_gstreamer_dir}/libgstsmoothstreaming.so
 +%{_lib_gstreamer_dir}/libgstsrt.so
 +%{_libdir}/libgstadaptivedemux-%{gst_branch}.so.0*
 +%{_libdir}/libgstbadaudio-%{gst_branch}.so.0*
 +%{_libdir}/libgstbasecamerabinsrc-%{gst_branch}.so.0*
 +%{_libdir}/libgstinsertbin-%{gst_branch}.so.0*
 +%{_libdir}/libgstisoff-%{gst_branch}.so.0*
 +%{_libdir}/libgstphotography-%{gst_branch}.so.0*
 +%{_libdir}/libgstplay-%{gst_branch}.so.0*
 +%{_libdir}/libgstplayer-%{gst_branch}.so.0*
 +%{_libdir}/libgsturidownloader-%{gst_branch}.so.0*
 +%if 0%{?enable_gl:1}
 +%{_lib_gstreamer_dir}/libgstopengl.so
 +%{_libdir}/libgstgl-%{gst_branch}.so.0*
 +%endif
 +%endif # profile
 +%{_lib_gstreamer_dir}/libgstaes.so
 +%{_lib_gstreamer_dir}/libgstaudiobuffersplit.so
 +%{_lib_gstreamer_dir}/libgstaudiolatency.so
 +%{_lib_gstreamer_dir}/libgstaudiomixmatrix.so
 +%{_lib_gstreamer_dir}/libgstdebugutilsbad.so
 +%{_lib_gstreamer_dir}/libgstdtls.so
 +%{_lib_gstreamer_dir}/libgstipcpipeline.so
 +%{_lib_gstreamer_dir}/libgstmidi.so
 +%{_lib_gstreamer_dir}/libgstmpegtsdemux.so
 +%{_lib_gstreamer_dir}/libgstmpegtsmux.so
 +%{_lib_gstreamer_dir}/libgstnetsim.so
 +%{_lib_gstreamer_dir}/libgstnice.so
 +%{_lib_gstreamer_dir}/libgstopenal.so
 +%{_lib_gstreamer_dir}/libgstopusparse.so
 +%{_lib_gstreamer_dir}/libgstproxy.so
 +%if "%{tizen_profile_name}" != "tv"
 +%{_lib_gstreamer_dir}/libgstrtpmanagerbad.so
 +%endif
 +%{_lib_gstreamer_dir}/libgstsctp.so
 +%{_lib_gstreamer_dir}/libgstsdpelem.so
 +%{_lib_gstreamer_dir}/libgstshm.so
 +%{_lib_gstreamer_dir}/libgstsoundtouch.so
 +%{_lib_gstreamer_dir}/libgstsrtp.so
 +%{_lib_gstreamer_dir}/libgsttimecode.so
 +%{_lib_gstreamer_dir}/libgstvideoframe_audiolevel.so
 +%{_lib_gstreamer_dir}/libgstvideoparsersbad.so
 +%if %{with wayland}
 +%{_lib_gstreamer_dir}/libgstwaylandsink.so
 +%endif
 +%{_lib_gstreamer_dir}/libgstwebrtc.so
 +%{_libdir}/libgstcodecparsers-%{gst_branch}.so.0*
 +%{_libdir}/libgstcodecs-%{gst_branch}.so.0*
++%{_libdir}/libgstcuda-%{gst_branch}.so.0*
 +%{_libdir}/libgstmpegts-%{gst_branch}.so.0*
 +%{_libdir}/libgstsctp-%{gst_branch}.so.0*
 +%{_libdir}/libgsttranscoder-%{gst_branch}.so.0*
 +%if %{with wayland}
 +%{_libdir}/libgstwayland-%{gst_branch}.so.0*
 +%endif
 +%{_libdir}/libgstwebrtc-%{gst_branch}.so.0*
 +%exclude %{_bindir}/gst-transcoder-%{gst_branch}
 +%exclude %{_libdir}/debug/*
 +
 +%files -n gst-plugins-bad-devel
 +%manifest gst-plugins-bad.manifest
 +%defattr(-, root, root)
 +%if "%{tizen_profile_name}" != "tv"
 +%{_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/insertbin/*
 +%{_includedir}/gstreamer-%{gst_branch}/gst/interfaces/*
 +%{_includedir}/gstreamer-%{gst_branch}/gst/isoff/*
 +%{_includedir}/gstreamer-%{gst_branch}/gst/play/*
 +%{_includedir}/gstreamer-%{gst_branch}/gst/player/*
 +%{_includedir}/gstreamer-%{gst_branch}/gst/uridownloader/*
 +%endif
 +%{_includedir}/gstreamer-%{gst_branch}/gst/codecparsers/*
++%{_includedir}/gstreamer-%{gst_branch}/gst/cuda/*
 +%{_includedir}/gstreamer-%{gst_branch}/gst/mpegts/*
 +%{_includedir}/gstreamer-%{gst_branch}/gst/sctp/*
 +%{_includedir}/gstreamer-%{gst_branch}/gst/transcoder/*
 +%if %{with wayland}
 +%{_includedir}/gstreamer-%{gst_branch}/gst/wayland/*
 +%endif
 +%{_includedir}/gstreamer-%{gst_branch}/gst/webrtc/*
 +%if "%{tizen_profile_name}" != "tv"
 +%{_libdir}/libgstadaptivedemux*.so
 +%{_libdir}/libgstbadaudio*.so
 +%{_libdir}/libgstbasecamerabinsrc*.so
 +%{_libdir}/libgstinsertbin*.so
 +%{_libdir}/libgstisoff*.so
 +%{_libdir}/libgstphotography*.so
 +%{_libdir}/libgstplay*.so
 +%{_libdir}/libgsturidownloader*.so
 +%if 0%{?enable_gl:1}
 +%{_lib_gstreamer_dir}/include/gst/gl/*
 +%endif # gl
 +%endif # profile
 +
 +%{_libdir}/libgstcodecparsers*.so
 +%{_libdir}/libgstcodecs*.so
++%{_libdir}/libgstcuda*.so
 +%{_libdir}/libgstmpegts*.so
 +%{_libdir}/libgstsctp*.so
 +%{_libdir}/libgsttranscoder*.so
 +%if %{with wayland}
 +%{_libdir}/libgstwayland*.so
 +%endif
 +%{_libdir}/libgstwebrtc*.so
 +%{_libdir}/pkgconfig/gstreamer-codecparsers-%{gst_branch}.pc
 +%if "%{tizen_profile_name}" != "tv"
 +%{_libdir}/pkgconfig/gstreamer-bad-audio-%{gst_branch}.pc
 +%{_libdir}/pkgconfig/gstreamer-insertbin-%{gst_branch}.pc
 +%{_libdir}/pkgconfig/gstreamer-photography-%{gst_branch}.pc
 +%{_libdir}/pkgconfig/gstreamer-play-%{gst_branch}.pc
 +%{_libdir}/pkgconfig/gstreamer-player-%{gst_branch}.pc
 +%if 0%{?enable_gl:1}
 +%{_libdir}/pkgconfig/gstreamer-gl-*.pc
 +%endif # gl
 +%endif # profile
++%{_libdir}/pkgconfig/gstreamer-cuda-%{gst_branch}.pc
 +%{_libdir}/pkgconfig/gstreamer-mpegts-%{gst_branch}.pc
 +%{_libdir}/pkgconfig/gstreamer-plugins-bad-%{gst_branch}.pc
 +%{_libdir}/pkgconfig/gstreamer-sctp-%{gst_branch}.pc
 +%{_libdir}/pkgconfig/gstreamer-transcoder-%{gst_branch}.pc
 +%if %{with wayland}
 +%{_libdir}/pkgconfig/gstreamer-wayland-%{gst_branch}.pc
 +%endif
 +%{_libdir}/pkgconfig/gstreamer-webrtc-%{gst_branch}.pc
 +
 +%endif # plugin
 +
 +###################### 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}/libgstamrnb.so
 +%{_lib_gstreamer_dir}/libgstasf.so
 +%exclude %{_datadir}/gstreamer-%{gst_branch}/presets/GstAmrnbEnc.prs
 +%endif # profile
 +%{_lib_gstreamer_dir}/libgstamrwbdec.so
 +
 +%endif # plugin
 +
 +######################## gst-libav ###########################
 +
 +%if "%{plugin}" == "all" || "%{plugin}" == "libav"
 +
 +%files -n gst-libav
 +%manifest gst-libav.manifest
 +%defattr(-,root,root,-)
 +%license subprojects/gst-libav/COPYING
 +%{_lib_gstreamer_dir}/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.*
 +%{_lib_gstreamer_dir}/libgstrtspclientsink.so
 +
 +%files -n gst-rtsp-server-devel
 +%defattr(-,root,root,-)
 +%{_libdir}/libgstrtspserver*.so
 +%{_includedir}/gstreamer-%{gst_branch}/gst/rtsp-server/rtsp-*.h
 +%{_includedir}/gstreamer-%{gst_branch}/gst/rtsp-server/gstwfd*.h
 +%{_libdir}/pkgconfig/gstreamer-rtsp-server-%{gst_branch}.pc
 +
 +%endif
 +
 +%if "%{tizen_profile_name}" != "tv"
 +
 +########################## gst-omx ###########################
 +%ifarch %{arm} aarch64 riscv64
 +
 +%if "%{plugin}" == "all" || "%{plugin}" == "omx"
 +
 +%files -n gst-omx
 +%manifest gst-omx.manifest
 +%defattr(-,root,root,-)
 +%license subprojects/gst-omx/COPYING
 +%{_lib_gstreamer_dir}/libgstomx.so
 +
 +%endif
 +
 +%endif # arch
 +
 +###################### 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-%{gst_branch}.so.*
 +%{_lib_gstreamer_dir}/libgstges.so
 +%{_lib_gstreamer_dir}/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-launch-%{gst_branch}
 +
 +%files -n gst-editing-services-devel
 +%{_libdir}/libges-%{gst_branch}.so
 +%{_includedir}/gstreamer-%{gst_branch}/ges/*
 +%{_libdir}/pkgconfig/gst-editing-services-%{gst_branch}.pc
 +
 +%endif # plugin
 +
 +%endif # profile
@@@ -1,6 -1,6 +1,6 @@@
  project('gst-editing-services', 'c',
-   version : '1.20.0',
+   version : '1.22.0',
 -  meson_version : '>= 0.62',
 +  meson_version : '>= 0.59',
    default_options : [ 'warning_level=1',
                        'buildtype=debugoptimized' ])
  
@@@ -285,48 -276,15 +281,15 @@@ if not get_option('examples').disabled(
  endif
  subdir('docs')
  
- override_detector = '''
- import sys
- import os
- prefix = sys.argv[1]
- version = sys.version_info
- # If we are installing in the same prefix as PyGobject
- # make sure to install in the right place.
- import gi.overrides
- overrides_path = os.path.dirname(gi.overrides.__file__)
- if os.path.commonprefix([overrides_path, prefix]) == prefix:
-     print(overrides_path)
-     exit(0)
- # Otherwise follow python's way of install site packages inside
- # the provided prefix
- if os.name == 'posix':
-     print(os.path.join(
-         prefix, 'lib', 'python%d.%d' % (version.major, version.minor),
-         'site-packages', 'gi', 'overrides'))
- else:
-     print(os.path.join(
-         prefix, 'Lib', 'Python%d%d' % (version.major, version.minor),
-         'site-packages', 'gi', 'overrides'))
- '''
  pygi_override_dir = get_option('pygi-overrides-dir')
--if pygi_override_dir == ''
-     cres = run_command(python3, '-c', override_detector, get_option('prefix'), check: false)
-     if cres.returncode() == 0
-       pygi_override_dir = cres.stdout().strip()
-     endif
-     if cres.stderr() != ''
-         message(cres.stderr())
-     endif
 -  pygi_override_dir = python3.get_install_dir(
 -    subdir : join_paths('gi', 'overrides')
 -  )
--endif
 -
 -message('pygobject overrides directory = @0@'.format(pygi_override_dir))
 -subdir('bindings/python')
++#if pygi_override_dir == ''
++#  pygi_override_dir = python3.get_install_dir(
++#    subdir : join_paths('gi', 'overrides')
++#  )
++#endif
 +
- if pygi_override_dir != ''
-   message('pygobject overrides directory ' + pygi_override_dir)
-   subdir('bindings/python')
- endif
++#message('pygobject overrides directory = @0@'.format(pygi_override_dir))
++#subdir('bindings/python')
  
  # Set release date
  if gst_version_nano == 0
@@@ -6,49 -6,62 +6,62 @@@ if gstvalidate_dep.found(
    ges_tool_args += ['-DGST_USE_UNSTABLE_API']
  endif
  
- ges_launch = executable('ges-launch-@0@'.format(apiversion),
-     'ges-validate.c', 'ges-launch.c', 'ges-launcher.c', 'utils.c', 'ges-launcher-kb.c',
-     c_args : [ges_tool_args] + ['-DG_LOG_DOMAIN="ges-launch-@0@"'.format(apiversion)],
-     pie : true,
-     dependencies : deps,
-     install: true
- )
- #install_man('ges-launch-1.0.1')
- # bash completion
- bashcomp_option = get_option('bash-completion')
- bashcomp_dep = dependency('bash-completion', version : '>= 2.0', required : bashcomp_option)
- bash_completions_dir = ''
- bash_helpers_dir = ''
- bashcomp_found = false
- if bashcomp_dep.found()
-   bashcomp_found = true
-   bashcomp_dir_override = bashcomp_dep.version().version_compare('>= 2.10') ? ['datadir', datadir] : ['prefix', prefix]
-   bash_completions_dir = bashcomp_dep.get_variable('completionsdir', pkgconfig_define:  bashcomp_dir_override)
-   if bash_completions_dir == ''
-     msg = 'Found bash-completion but the .pc file did not set \'completionsdir\'.'
-     if bashcomp_option.enabled()
-       error(msg)
-     else
-       message(msg)
+ ges_launch_files = files('ges-validate.c', 'ges-launch.c', 'ges-launcher.c', 'utils.c', 'ges-launcher-kb.c')
+ man_page = files('ges-launch-1.0.1')
+ gst_tools = {'ges-launch':
+   {
+     'files': ges_launch_files,
+     'deps': deps,
+     'extra_c_args': ges_tool_args,
+     'man_page': man_page,
+   }
+ }
+ if not get_option('tools').disabled()
+   ges_launch = executable('ges-launch-@0@'.format(apiversion),
+       ges_launch_files,
+       c_args : [ges_tool_args] + ['-DG_LOG_DOMAIN="ges-launch-@0@"'.format(apiversion)],
+       dependencies : deps,
+       install: true
+   )
 -  install_man(man_page)
++#  install_man(man_page)
+   # bash completion
+   bashcomp_option = get_option('bash-completion')
+   bashcomp_dep = dependency('bash-completion', version : '>= 2.0', required : bashcomp_option)
+   bash_completions_dir = ''
+   bash_helpers_dir = ''
+   bashcomp_found = false
+   if bashcomp_dep.found()
+     bashcomp_found = true
+     bashcomp_dir_override = bashcomp_dep.version().version_compare('>= 2.10') ? ['datadir', datadir] : ['prefix', prefix]
+     bash_completions_dir = bashcomp_dep.get_variable('completionsdir', pkgconfig_define:  bashcomp_dir_override)
+     if bash_completions_dir == ''
+       msg = 'Found bash-completion but the .pc file did not set \'completionsdir\'.'
+       if bashcomp_option.enabled()
+         error(msg)
+       else
+         message(msg)
+       endif
+       bashcomp_found = false
      endif
-     bashcomp_found = false
-   endif
  
-   bash_helpers_dir = bashcomp_dep.get_variable('helpersdir', pkgconfig_define:  bashcomp_dir_override)
-   if bash_helpers_dir == ''
-     msg = 'Found bash-completion, but the .pc file did not set \'helpersdir\'.'
-     if bashcomp_option.enabled()
-       error(msg)
-     else
-       message(msg)
+     bash_helpers_dir = bashcomp_dep.get_variable('helpersdir', pkgconfig_define:  bashcomp_dir_override)
+     if bash_helpers_dir == ''
+       msg = 'Found bash-completion, but the .pc file did not set \'helpersdir\'.'
+       if bashcomp_option.enabled()
+         error(msg)
+       else
+         message(msg)
+       endif
+       bashcomp_found = false
      endif
-     bashcomp_found = false
-   endif
  
-   if bashcomp_found
-     install_data('../data/completions/ges-launch-1.0', install_dir : bash_completions_dir)
+     if bashcomp_found
+       install_data('../data/completions/ges-launch-1.0', install_dir : bash_completions_dir)
+     endif
    endif
  endif
@@@ -1,6 -1,6 +1,6 @@@
- project('gst-libav', 'c', 'cpp',
-   version : '1.20.0',
+ project('gst-libav', 'c',
+   version : '1.22.0',
 -  meson_version : '>= 0.62',
 +  meson_version : '>= 0.59',
    default_options : [ 'warning_level=1',
                        'buildtype=debugoptimized' ])
  
@@@ -1,6 -1,6 +1,6 @@@
  project('gst-omx', 'c',
-   version : '1.20.0',
+   version : '1.22.0',
 -  meson_version : '>= 0.62',
 +  meson_version : '>= 0.59',
    default_options : [ 'warning_level=1',
                        'buildtype=debugoptimized' ])
  
  #include "gsthlselements.h"
  
  #define GST_CAT_DEFAULT hls_debug
 +#ifdef TIZEN_FEATURE_ADAPTIVE_MODIFICATION
 +#define DEFAULT_RESOLUTION_LIMIT -1
 +#define DEFAULT_BANDWIDTH_LIMIT -1
 +#endif
  
  static GstM3U8MediaFile *gst_m3u8_media_file_new (gchar * uri,
-     gchar * title, GstClockTime duration, guint sequence);
+     gchar * title, GstClockTime duration, guint sequence,
+     GstDateTime * program_dt);
  static void gst_m3u8_init_file_unref (GstM3U8InitFile * self);
  static gchar *uri_join (const gchar * uri, const gchar * path);
  
@@@ -71,10 -69,7 +69,11 @@@ enu
    PROP_WAIT_FOR_CONNECTION,
    PROP_STREAMID,
    PROP_AUTHENTICATION,
+   PROP_AUTO_RECONNECT,
 +#ifdef TIZEN_FEATURE_SRT_LATENCY
 +  PROP_RECEIVE_LATENCY,
 +  PROP_PEER_LATENCY,
 +#endif
    PROP_LAST
  };
  
@@@ -440,15 -426,9 +430,17 @@@ gst_srt_object_set_property_helper (Gst
        break;
      case PROP_AUTHENTICATION:
        srtobject->authentication = g_value_get_boolean (value);
+     case PROP_AUTO_RECONNECT:
+       srtobject->auto_reconnect = g_value_get_boolean (value);
        break;
 +#ifdef TIZEN_FEATURE_SRT_LATENCY
 +    case PROP_RECEIVE_LATENCY:
 +      gst_structure_set_value (srtobject->parameters, "rcvlatency", value);
 +      break;
 +    case PROP_PEER_LATENCY:
 +      gst_structure_set_value (srtobject->parameters, "peerlatency", value);
 +      break;
 +#endif
      default:
        goto err;
    }
@@@ -555,33 -535,11 +547,37 @@@ gst_srt_object_get_property_helper (Gst
        break;
      case PROP_AUTHENTICATION:
        g_value_set_boolean (value, srtobject->authentication);
+     case PROP_AUTO_RECONNECT:
+       GST_OBJECT_LOCK (srtobject->element);
+       g_value_set_boolean (value, srtobject->auto_reconnect);
+       GST_OBJECT_UNLOCK (srtobject->element);
        break;
 +#ifdef TIZEN_FEATURE_SRT_LATENCY
 +    case PROP_RECEIVE_LATENCY:{
 +      gint v;
 +
 +      GST_OBJECT_LOCK (srtobject->element);
 +      if (!gst_structure_get_int (srtobject->parameters, "rcvlatency", &v)) {
 +        GST_WARNING_OBJECT (srtobject->element, "Failed to get 'rcvlatency'");
 +        v = GST_SRT_DEFAULT_LATENCY;
 +      }
 +      g_value_set_int (value, v);
 +      GST_OBJECT_UNLOCK (srtobject->element);
 +      break;
 +    }
 +    case PROP_PEER_LATENCY:{
 +      gint v;
 +
 +      GST_OBJECT_LOCK (srtobject->element);
 +      if (!gst_structure_get_int (srtobject->parameters, "peerlatency", &v)) {
 +        GST_WARNING_OBJECT (srtobject->element, "Failed to get 'peerlatency'");
 +        v = GST_SRT_DEFAULT_LATENCY;
 +      }
 +      g_value_set_int (value, v);
 +      GST_OBJECT_UNLOCK (srtobject->element);
 +      break;
 +    }
 +#endif
      default:
        return FALSE;
    }
@@@ -743,30 -701,21 +739,45 @@@ gst_srt_object_install_properties_helpe
            "Authenticate a connection",
            FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  
+   /**
+    * GstSRTSrc:auto-reconnect:
+    *
+    * Boolean to choose whether to automatically reconnect.  If TRUE, an element
+    * in caller mode will try to reconnect instead of reporting an error.
+    *
+    * Since: 1.22
+    *
+    */
+   g_object_class_install_property (gobject_class, PROP_AUTO_RECONNECT,
+       g_param_spec_boolean ("auto-reconnect",
+           "Automatic reconnect",
+           "Automatically reconnect when connection fails",
+           GST_SRT_DEFAULT_AUTO_RECONNECT,
+           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
++
 +#ifdef TIZEN_FEATURE_SRT_LATENCY
 +  /**
 +   * GstSRTSrc:rcvlatency:
 +   *
 +   * The receiver delay to absorb burst of missed packet retransmission
 +   */
 +  g_object_class_install_property (gobject_class, PROP_RECEIVE_LATENCY,
 +      g_param_spec_int ("rcvlatency", "receive latency",
 +          "receiver delay (milliseconds)", 0,
 +          G_MAXINT32, GST_SRT_DEFAULT_LATENCY,
 +          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 +
 +  /**
 +   * GstSRTSrc:peerlatency:
 +   *
 +   * The minimum receiver delay for the peer.
 +   */
 +  g_object_class_install_property (gobject_class, PROP_PEER_LATENCY,
 +      g_param_spec_int ("peerlatency", "peer latency",
 +          "Minimum receiver delay for the peer (milliseconds)", 0,
 +          G_MAXINT32, GST_SRT_DEFAULT_LATENCY,
 +          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 +#endif
  }
  
  static void
@@@ -546,11 -673,7 +673,12 @@@ enu
    PROP_ICE_AGENT,
    PROP_LATENCY,
    PROP_SCTP_TRANSPORT,
 -  PROP_HTTP_PROXY
++  PROP_HTTP_PROXY,
 +#ifdef TIZEN_FEATURE_WEBRTC_IMPORT_NETSIM
 +  PROP_NETSIM,
 +  PROP_DROP_PROBABILITY_SENDER,
 +  PROP_DROP_PROBABILITY_RECEIVER
 +#endif
  };
  
  static guint gst_webrtc_bin_signals[LAST_SIGNAL] = { 0 };
@@@ -1405,11 -1581,8 +1623,11 @@@ _update_ice_gathering_state_task (GstWe
      ICE_UNLOCK (webrtc);
    }
  
 +#ifdef TIZEN_FEATURE_WEBRTC_MODIFICATION
 +  _update_and_notify_ice_gathering_state (webrtc, new_state);
 +#else
    if (new_state != webrtc->ice_gathering_state) {
-     gchar *old_s, *new_s;
+     const gchar *old_s, *new_s;
  
      old_s = _enum_value_to_string (GST_TYPE_WEBRTC_ICE_GATHERING_STATE,
          old_state);
@@@ -1911,10 -2044,8 +2090,10 @@@ _find_codec_preferences (GstWebRTCBin 
      }
  
      if (caps) {
 +#ifndef TIZEN_FEATURE_WEBRTC_MODIFICATION
        if (trans)
-         gst_caps_replace (&trans->last_configured_caps, caps);
 +#endif
+         gst_caps_replace (&trans->last_retrieved_caps, caps);
  
        ret = caps;
      }
@@@ -4479,111 -4926,238 +4997,264 @@@ _build_fec_encoder (GstWebRTCBin * webr
      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);
+   if (trans->ulpfecenc || trans->redenc) {
+     g_critical ("webrtcbin: duplicate call to create a fec encoder or "
+         "red encoder!");
+     return NULL;
+   }
  
-     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);
+   GST_DEBUG_OBJECT (webrtc,
+       "Creating ULPFEC encoder for mline %u with pt %d", rtp_trans->mline,
+       ulpfec_pt);
  
-     g_object_bind_property (rtp_trans, "fec-percentage", fecenc, "percentage",
-         G_BINDING_BIDIRECTIONAL);
+   ret = gst_bin_new (NULL);
  
-     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");
+   trans->ulpfecenc = gst_element_factory_make ("rtpulpfecenc", NULL);
+   gst_object_ref_sink (trans->ulpfecenc);
+   if (!gst_bin_add (GST_BIN (ret), trans->ulpfecenc))
+     g_warn_if_reached ();
+   sinkpad = gst_element_get_static_pad (trans->ulpfecenc, "sink");
  
-       if (!g_strcmp0 (media, "video"))
-         g_object_set (fecenc, "multipacket", TRUE, NULL);
-     }
+   g_object_bind_property (rtp_trans, "fec-percentage", trans->ulpfecenc,
+       "percentage", G_BINDING_DEFAULT);
  
-     prev = fecenc;
-   }
+   trans->redenc = gst_element_factory_make ("rtpredenc", NULL);
+   gst_object_ref_sink (trans->redenc);
  
-   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_DEBUG_OBJECT (webrtc, "Creating RED encoder for mline %u with pt %d",
-         rtp_trans->mline, red_pt);
+   gst_bin_add (GST_BIN (ret), trans->redenc);
+   gst_element_link (trans->ulpfecenc, trans->redenc);
  
-     gst_bin_add (GST_BIN (ret), redenc);
-     if (prev)
-       gst_element_link (prev, redenc);
-     else
-       sinkpad = gst_element_get_static_pad (redenc, "sink");
+   ghost = gst_ghost_pad_new ("sink", sinkpad);
+   gst_clear_object (&sinkpad);
+   gst_element_add_pad (ret, ghost);
+   ghost = NULL;
  
-     g_object_set (redenc, "pt", red_pt, "allow-no-red-blocks", TRUE, NULL);
+   srcpad = gst_element_get_static_pad (trans->redenc, "src");
+   ghost = gst_ghost_pad_new ("src", srcpad);
+   gst_clear_object (&srcpad);
+   gst_element_add_pad (ret, ghost);
+   ghost = NULL;
  
-     prev = redenc;
  }
+   return ret;
+ }
  
-   if (sinkpad) {
-     GstPad *ghost = gst_ghost_pad_new ("sink", sinkpad);
-     gst_object_unref (sinkpad);
-     gst_element_add_pad (ret, ghost);
-   }
+ static gboolean
+ _merge_structure (GQuark field_id, const GValue * value, gpointer user_data)
+ {
+   GstStructure *s = user_data;
  
-   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);
-   }
+   gst_structure_id_set_value (s, field_id, value);
  
-   return ret;
+   return TRUE;
  }
  
- #ifdef TIZEN_FEATURE_WEBRTC_IMPORT_NETSIM
+ #define GST_WEBRTC_PAYLOAD_TYPE "gst.webrtcbin.payload.type"
  static void
- _insert_netsim_element_between (GstWebRTCBin * webrtc, GstElement * srcbin,
-     const gchar * srcpadname, GstElement * sinkbin, const gchar * sinkpadname,
-     guint idx)
+ try_match_transceiver_with_fec_decoder (GstWebRTCBin * webrtc,
+     WebRTCTransceiver * trans)
  {
-   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);
+   GList *l;
  
-   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);
+   for (l = trans->stream->fecdecs; l; l = l->next) {
+     GstElement *fecdec = GST_ELEMENT (l->data);
+     gboolean found_transceiver = FALSE;
+     int original_pt;
+     guint i;
  
-   if (!gst_element_link_pads (srcbin, srcpadname, netsim, "sink"))
-     g_warn_if_reached ();
+     original_pt =
+         GPOINTER_TO_INT (g_object_get_data (G_OBJECT (fecdec),
+             GST_WEBRTC_PAYLOAD_TYPE));
+     if (original_pt <= 0) {
+       GST_WARNING_OBJECT (trans, "failed to match fec decoder with "
+           "transceiver, fec decoder %" GST_PTR_FORMAT " does not contain a "
+           "valid payload type", fecdec);
+       continue;
+     }
  
-   if (!gst_element_link_pads (netsim, "src", sinkbin, sinkpadname))
-     g_warn_if_reached ();
+     for (i = 0; i < trans->stream->ptmap->len; i++) {
+       PtMapItem *item = &g_array_index (trans->stream->ptmap, PtMapItem, i);
+       /* FIXME: this only works for a 1-1 original_pt->fec_pt mapping */
+       if (original_pt == item->pt && item->media_idx != -1
+           && item->media_idx == trans->parent.mline) {
+         if (trans->ulpfecdec) {
+           GST_FIXME_OBJECT (trans, "cannot");
+           gst_clear_object (&trans->ulpfecdec);
+         }
+         trans->ulpfecdec = gst_object_ref (fecdec);
+         found_transceiver = TRUE;
+         break;
+       }
+     }
+     if (!found_transceiver) {
+       GST_WARNING_OBJECT (trans, "failed to match fec decoder with "
+           "transceiver");
+     }
+   }
  }
- #endif
  
- static GstPad *
- _connect_input_stream (GstWebRTCBin * webrtc, GstWebRTCBinPad * pad)
+ static void
+ _set_internal_rtpbin_element_props_from_stream (GstWebRTCBin * webrtc,
+     TransportStream * stream)
  {
- /*
-  * Not-bundle case:
-  *
-  * ,--------------------------------------------webrtcbin--------------------------------------------,
-  * ;                                                                                                 ;
-  * ;                                                ,-------rtpbin-------,   ,--transport_send_%u--, ;
-  * ;                                                ;    send_rtp_src_%u o---o rtp_sink            ; ;
-  * ;         ,---clocksync---,                      ;                    ;   ;                     ; ;
-  * ;         ;               ;                      ;   send_rtcp_src_%u o---o rtcp_sink           ; ;
-  * ; sink_%u ;               ; ,---fec encoder---,  ;                    ;   '---------------------' ;
-  * o---------o sink      src o-o sink        src o--o send_rtp_sink_%u   ;                           ;
-  * ;         '---------------' ,-----------------,  '--------------------'                           ;
-  * '-------------------------------------------------------------------------------------------------'
+   GstStructure *merged_local_rtx_ssrc_map;
+   GstStructure *pt_map = gst_structure_new_empty ("application/x-rtp-pt-map");
+   GValue red_pt_array = { 0, };
+   gint *rtx_pt;
+   gsize rtx_count;
+   gsize i;
+   gst_value_array_init (&red_pt_array, 0);
+   rtx_pt = transport_stream_get_all_pt (stream, "RTX", &rtx_count);
+   GST_DEBUG_OBJECT (stream, "have %" G_GSIZE_FORMAT " rtx payloads", rtx_count);
+   for (i = 0; i < rtx_count; i++) {
+     GstCaps *rtx_caps = transport_stream_get_caps_for_pt (stream, rtx_pt[i]);
+     const GstStructure *s = gst_caps_get_structure (rtx_caps, 0);
+     const gchar *apt = gst_structure_get_string (s, "apt");
+     GST_LOG_OBJECT (stream, "setting rtx mapping: %s -> %u", apt, rtx_pt[i]);
+     gst_structure_set (pt_map, apt, G_TYPE_UINT, rtx_pt[i], NULL);
+   }
+   GST_DEBUG_OBJECT (stream, "setting payload map on %" GST_PTR_FORMAT " : %"
+       GST_PTR_FORMAT " and %" GST_PTR_FORMAT, stream->rtxreceive,
+       stream->rtxsend, pt_map);
+   if (stream->rtxreceive)
+     g_object_set (stream->rtxreceive, "payload-type-map", pt_map, NULL);
+   if (stream->rtxsend)
+     g_object_set (stream->rtxsend, "payload-type-map", pt_map, NULL);
+   gst_structure_free (pt_map);
+   g_clear_pointer (&rtx_pt, g_free);
+   merged_local_rtx_ssrc_map =
+       gst_structure_new_empty ("application/x-rtp-ssrc-map");
+   for (i = 0; i < webrtc->priv->transceivers->len; i++) {
+     GstWebRTCRTPTransceiver *rtp_trans =
+         g_ptr_array_index (webrtc->priv->transceivers, i);
+     WebRTCTransceiver *trans = WEBRTC_TRANSCEIVER (rtp_trans);
+     if (trans->stream == stream) {
+       gint ulpfec_pt, red_pt = 0;
+       ulpfec_pt = transport_stream_get_pt (stream, "ULPFEC", rtp_trans->mline);
+       if (ulpfec_pt <= 0)
+         ulpfec_pt = 0;
+       red_pt = transport_stream_get_pt (stream, "RED", rtp_trans->mline);
+       if (red_pt <= 0) {
+         red_pt = -1;
+       } else {
+         GValue ptval = { 0, };
+         g_value_init (&ptval, G_TYPE_INT);
+         g_value_set_int (&ptval, red_pt);
+         gst_value_array_append_value (&red_pt_array, &ptval);
+         g_value_unset (&ptval);
+       }
+       GST_DEBUG_OBJECT (webrtc, "stream %" GST_PTR_FORMAT " transceiver %"
+           GST_PTR_FORMAT " has FEC payload %d and RED payload %d", stream,
+           trans, ulpfec_pt, red_pt);
+       if (trans->ulpfecenc) {
+         guint ulpfecenc_pt = ulpfec_pt;
+         if (ulpfecenc_pt == 0)
+           ulpfecenc_pt = 255;
+         g_object_set (trans->ulpfecenc, "pt", ulpfecenc_pt, "multipacket",
+             rtp_trans->kind == GST_WEBRTC_KIND_VIDEO, "percentage",
+             trans->fec_percentage, NULL);
+       }
+       try_match_transceiver_with_fec_decoder (webrtc, trans);
+       if (trans->ulpfecdec) {
+         g_object_set (trans->ulpfecdec, "passthrough", ulpfec_pt == 0, "pt",
+             ulpfec_pt, NULL);
+       }
+       if (trans->redenc) {
+         gboolean always_produce = TRUE;
+         if (red_pt == -1) {
+           /* passthrough settings */
+           red_pt = 0;
+           always_produce = FALSE;
+         }
+         g_object_set (trans->redenc, "pt", red_pt, "allow-no-red-blocks",
+             always_produce, NULL);
+       }
+       if (trans->local_rtx_ssrc_map) {
+         gst_structure_foreach (trans->local_rtx_ssrc_map,
+             _merge_structure, merged_local_rtx_ssrc_map);
+       }
+     }
+   }
+   if (stream->rtxsend)
+     g_object_set (stream->rtxsend, "ssrc-map", merged_local_rtx_ssrc_map, NULL);
+   gst_clear_structure (&merged_local_rtx_ssrc_map);
+   if (stream->reddec) {
+     g_object_set_property (G_OBJECT (stream->reddec), "payloads",
+         &red_pt_array);
+   }
+   g_value_unset (&red_pt_array);
+ }
++#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)
+ {
+ /*
+  * Not-bundle case:
+  *
+  * ,--------------------------------------------webrtcbin--------------------------------------------,
+  * ;                                                                                                 ;
+  * ;                                                ,-------rtpbin-------,   ,--transport_send_%u--, ;
+  * ;                                                ;    send_rtp_src_%u o---o rtp_sink            ; ;
+  * ;         ,---clocksync---,                      ;                    ;   ;                     ; ;
+  * ;         ;               ;                      ;   send_rtcp_src_%u o---o rtcp_sink           ; ;
+  * ; sink_%u ;               ; ,---fec encoder---,  ;                    ;   '---------------------' ;
+  * o---------o sink      src o-o sink        src o--o send_rtp_sink_%u   ;                           ;
+  * ;         '---------------' ,-----------------,  '--------------------'                           ;
+  * '-------------------------------------------------------------------------------------------------'
   */
  
  /*
      gst_pad_link (srcpad, rtp_sink);
      gst_object_unref (rtp_sink);
  
-     gst_ghost_pad_set_target (GST_GHOST_PAD (pad), sinkpad);
      pad_name = g_strdup_printf ("send_rtp_src_%u", pad->trans->mline);
 +#ifdef TIZEN_FEATURE_WEBRTC_IMPORT_NETSIM
 +    if (webrtc->priv->netsim) {
 +      _insert_netsim_element_between (webrtc, GST_ELEMENT (webrtc->rtpbin), pad_name,
 +          GST_ELEMENT (trans->stream->send_bin), "rtp_sink", pad->trans->mline);
 +    } else {
 +#endif
      if (!gst_element_link_pads (GST_ELEMENT (webrtc->rtpbin), pad_name,
              GST_ELEMENT (trans->stream->send_bin), "rtp_sink"))
        g_warn_if_reached ();
@@@ -7401,23 -8247,13 +8408,30 @@@ gst_webrtc_bin_set_property (GObject * 
        webrtc->priv->jb_latency = g_value_get_uint (value);
        _update_rtpstorage_latency (webrtc);
        break;
+     case PROP_ICE_AGENT:
+       webrtc->priv->ice = g_value_get_object (value);
+       break;
+     case PROP_HTTP_PROXY:
+       gst_webrtc_ice_set_http_proxy (webrtc->priv->ice,
+           g_value_get_string (value));
+       break;
 +#ifdef TIZEN_FEATURE_WEBRTC_IMPORT_NETSIM
 +    case PROP_NETSIM:
 +      webrtc->priv->netsim = g_value_get_boolean (value);
 +      _update_drop_probability (webrtc, webrtc->priv->netsim ?
 +          webrtc->priv->drop_probability_sender : 0.0, TRUE);
 +      _update_drop_probability (webrtc, webrtc->priv->netsim ?
 +          webrtc->priv->drop_probability_receiver : 0.0, FALSE);
 +      break;
 +    case PROP_DROP_PROBABILITY_SENDER:
 +      webrtc->priv->drop_probability_sender = g_value_get_float (value);
 +      _update_drop_probability (webrtc, webrtc->priv->drop_probability_sender, TRUE);
 +      break;
 +    case PROP_DROP_PROBABILITY_RECEIVER:
 +      webrtc->priv->drop_probability_receiver = g_value_get_float (value);
 +      _update_drop_probability (webrtc, webrtc->priv->drop_probability_receiver, FALSE);
 +      break;
 +#endif
      default:
        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
        break;
@@@ -7495,17 -8331,10 +8509,21 @@@ gst_webrtc_bin_get_property (GObject * 
      case PROP_SCTP_TRANSPORT:
        g_value_set_object (value, webrtc->priv->sctp_transport);
        break;
+     case PROP_HTTP_PROXY:
+       g_value_take_string (value,
+           gst_webrtc_ice_get_http_proxy (webrtc->priv->ice));
+       break;
 +#ifdef TIZEN_FEATURE_WEBRTC_IMPORT_NETSIM
 +    case PROP_NETSIM:
 +      g_value_set_boolean (value, webrtc->priv->netsim);
 +      break;
 +    case PROP_DROP_PROBABILITY_SENDER:
 +      g_value_set_float (value, webrtc->priv->drop_probability_sender);
 +      break;
 +    case PROP_DROP_PROBABILITY_RECEIVER:
 +      g_value_set_float (value, webrtc->priv->drop_probability_receiver);
 +      break;
 +#endif
      default:
        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
        break;
@@@ -7519,13 -8348,13 +8537,13 @@@ gst_webrtc_bin_constructed (GObject * o
    GstWebRTCBin *webrtc = GST_WEBRTC_BIN (object);
    gchar *name;
  
-   name = g_strdup_printf ("%s:ice", GST_OBJECT_NAME (webrtc));
-   webrtc->priv->ice = gst_webrtc_ice_new (name);
+   if (!webrtc->priv->ice) {
+     name = g_strdup_printf ("%s:ice", GST_OBJECT_NAME (webrtc));
 -    webrtc->priv->ice = GST_WEBRTC_ICE (gst_webrtc_nice_new (name));
++//    webrtc->priv->ice = GST_WEBRTC_ICE (gst_webrtc_nice_new (name));
+     g_free (name);
+   }
    gst_webrtc_ice_set_on_ice_candidate (webrtc->priv->ice,
-       (GstWebRTCIceOnCandidateFunc) _on_local_ice_candidate_cb, webrtc, NULL);
-   g_free (name);
+       (GstWebRTCICEOnCandidateFunc) _on_local_ice_candidate_cb, webrtc, NULL);
  
    G_OBJECT_CLASS (parent_class)->constructed (object);
  }
@@@ -7960,16 -8788,22 +9000,31 @@@ gst_webrtc_bin_class_init (GstWebRTCBin
     *  "local-id"            G_TYPE_STRING               identifier for the associated RTCInboundRTPSTreamStats
     *  "remote-timestamp"    G_TYPE_DOUBLE               remote timestamp the statistics were sent by the remote
     *
+    * RTCIceCandidateStats supported fields (https://www.w3.org/TR/webrtc-stats/#icecandidate-dict*) (Since: 1.22)
+    *
+    *  "transport-id"         G_TYPE_STRING              identifier for the associated RTCTransportStats for this stream
+    *  "address"              G_TYPE_STRING              address of the candidate, allowing for IPv4, IPv6 and FQDNs
+    *  "port"                 G_TYPE_UINT                port number of the candidate
+    *  "candidate-type"       G_TYPE_STRING              RTCIceCandidateType
+    *  "priority"             G_TYPE_UINT64              calculated as defined in RFC 5245
+    *  "protocol"             G_TYPE_STRING              Either "udp" or "tcp". Based on the "transport" defined in RFC 5245
+    *  "relay-protocol"       G_TYPE_STRING              protocol used by the endpoint to communicate with the TURN server. Only present for local candidates. Either "udp", "tcp" or "tls"
+    *  "url"                  G_TYPE_STRING              URL of the ICE server from which the candidate was obtained. Only present for local candidates
+    *
+    * RTCIceCandidatePairStats supported fields (https://www.w3.org/TR/webrtc-stats/#candidatepair-dict*) (Since: 1.22)
+    *
+    *  "local-candidate-id"  G_TYPE_STRING               unique identifier that is associated to the object that was inspected to produce the RTCIceCandidateStats for the local candidate associated with this candidate pair.
+    *  "remote-candidate-id" G_TYPE_STRING               unique identifier that is associated to the object that was inspected to produce the RTCIceCandidateStats for the remote candidate associated with this candidate pair.
     */
 +#ifdef TIZEN_FEATURE_WEBRTC_MODIFICATION
 +  /**
 +   * RTCPeerConnectionStats supported fields (https://w3c.github.io/webrtc-stats/#pcstats-dict*)
 +   *
 +   *  "data-channels-opened"  G_TYPE_UINT               number of unique data channels that have entered the 'open' state
 +   *  "data-channels-closed"  G_TYPE_UINT               number of unique data channels that have left the 'open' state
 +   *
 +   */
 +#endif
    gst_webrtc_bin_signals[GET_STATS_SIGNAL] =
        g_signal_new_class_handler ("get-stats",
        G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
@@@ -11,7 -3,11 +11,9 @@@ subdir('uridownloader'
  subdir('adaptivedemux')
  subdir('audio')
  subdir('basecamerabinsrc')
 -subdir('codecparsers')
 -subdir('codecs')
  subdir('d3d11')
+ # cuda can depend on d3d11
+ subdir('cuda')
  subdir('insertbin')
  subdir('interfaces')
  subdir('isoff')
@@@ -767,10 -764,8 +778,11 @@@ mpegts_base_update_program (MpegTSBase 
    for (tmp = toremove; tmp; tmp = tmp->next) {
      MpegTSBaseStream *stream = (MpegTSBaseStream *) tmp->data;
      mpegts_base_program_remove_stream (base, program, stream->pid);
 +#ifdef TIZEN_FEATURE_TSDEMUX_UPDATE_STREAM
 +    MPEGTS_BIT_UNSET (base->is_pes, stream->pid);
 +#endif
    }
+   g_list_free (toremove);
    return TRUE;
  }
  
@@@ -1089,9 -1095,8 +1112,11 @@@ mpegts_base_apply_pat (MpegTSBase * bas
                ("Refcounting issue. Setting twice a PMT PID (0x%04x) as know PSI",
                program->pmt_pid);
          MPEGTS_BIT_SET (base->known_psi, patp->network_or_program_map_PID);
 +#ifdef TIZEN_FEATURE_TSDEMUX_UPDATE_PMT
 +        MPEGTS_BIT_UNSET (base->is_pes, patp->network_or_program_map_PID);
 +#endif
+       } else {
+         GST_LOG ("Regular program update");
        }
      } else {
        /* Create a new program */
@@@ -2291,41 -2278,10 +2288,41 @@@ mpegts_packetizer_pts_to_ts_internal (M
      res = pts + pcrtable->pcroffset + packetizer->extra_shift;
  
      /* Don't return anything if we differ too much against last seen PCR */
-     if (G_UNLIKELY (pcr_pid != 0x1fff &&
-             ABSDIFF (res, pcrtable->last_pcrtime) > 15 * GST_SECOND))
 +    /* FIXME : Ideally we want to figure out whether we have a wraparound or
 +     * a reset so we can provide actual values.
 +     * That being said, this will only happen for the small interval of time
 +     * where PTS/DTS are wrapping just before we see the first reset/wrap PCR
 +     */
 +    /*
 +     * For some HLS Live servers (e.g tvpstream.tvp.pl ) , we observe erronous PCR values.
 +     * As a result , last_pcrtime comes faulty which causes PTS values not to be calculated at all and buffers are dropped.
 +     * We are currently ignoring the check for handling the erronous server PCR case.
 +     */
 +#ifdef TIZEN_FEATURE_TSDEMUX_MODIFICATION
 +    tmp = pcrtable->base_time + pcrtable->skew;
 +    if (packetizer->is_live_stream) {
 +      if (G_UNLIKELY (ABSDIFF (res, pcrtable->last_pcrtime) > 15 * GST_SECOND))
 +        GST_WARNING
 +            ("Live Stream : Server sending erronous PCR values : Recalculating!!");
 +
 +      if (tmp + res > pcrtable->base_pcrtime)
 +        res += tmp - pcrtable->base_pcrtime;
 +      else
 +        res = GST_CLOCK_TIME_NONE;
 +    } else {
 +      if (G_UNLIKELY (ABSDIFF (res, pcrtable->last_pcrtime) > 15 * GST_SECOND))
 +        GST_WARNING
 +            ("VOD Stream : Server sending erronous PCR values : Maintaining old ts value !!!");
 +      else if (tmp + res > pcrtable->base_pcrtime)
 +        res += tmp - pcrtable->base_pcrtime;
 +      else
 +        res = GST_CLOCK_TIME_NONE;
 +    }
 +#else
+     if (G_UNLIKELY (check_diff && pcr_pid != 0x1fff &&
+             ABSDIFF (res, pcrtable->last_pcrtime) > 15 * GST_SECOND)) {
        res = GST_CLOCK_TIME_NONE;
-     else {
+     else {
        GstClockTime tmp = pcrtable->base_time + pcrtable->skew;
        if (tmp + res >= pcrtable->base_pcrtime) {
          res += tmp - pcrtable->base_pcrtime;
@@@ -1,6 -1,6 +1,6 @@@
  project('gst-plugins-bad', 'c', 'cpp',
-   version : '1.20.0',
+   version : '1.22.0',
 -  meson_version : '>= 0.62',
 +  meson_version : '>= 0.59',
    default_options : [ 'warning_level=1',
                        'buildtype=debugoptimized' ])
  
@@@ -7201,14 -7284,19 +7340,25 @@@ static const VideoFormat formats[] = 
        PLANE0, OFFS6420, SUB444, PACK_ABGR64_LE),
    MAKE_RGBA_FORMAT (ABGR64_BE, "raw video", DPTH16_16_16_16, PSTR8888, PLANE0,
        OFFS6420, SUB4444, PACK_ABGR64_BE),
-     MAKE_YUV_FORMAT (STV0, "raw video", GST_MAKE_FOURCC ('S', 'T', 'V', '0'),
-         DPTH888, PSTR111, PLANE012, OFFS0, SUB420, PACK_420),
-     MAKE_YUV_FORMAT (STV1, "raw video", GST_MAKE_FOURCC ('S', 'T', 'V', '1'),
-         DPTH888, PSTR111, PLANE012, OFFS0, SUB420, PACK_420),
+   MAKE_YUV_ST_FORMAT (NV12_16L32S, "raw video",
+       GST_MAKE_FOURCC ('M', 'M', '2', '1'), DPTH888, PSTR122, PLANE011,
+       OFFS001, SUB420, PACK_NV12_TILED, TILE_16x32s (LINEAR)),
+   MAKE_YUV_T_FORMAT (NV12_8L128, "raw video",
+       GST_MAKE_FOURCC ('N', 'A', '1', '2'), DPTH888, PSTR122, PLANE011,
+       OFFS001, SUB420, PACK_NV12_TILED, TILE_8x128 (LINEAR)),
+   MAKE_YUV_T_FORMAT (NV12_10BE_8L128, "raw video",
+       GST_MAKE_FOURCC ('N', 'T', '1', '2'), DPTH10_10_10, PSTR0, PLANE011,
+       OFFS001, SUB420, PACK_NV12_10BE_8L128, TILE_10bit_8x128 (LINEAR)),
 +#ifdef TIZEN_PROFILE_TV
++  MAKE_YUV_FORMAT (STV0, "raw video", GST_MAKE_FOURCC ('S', 'T', 'V', '0'),
++      DPTH888, PSTR111, PLANE012, OFFS0, SUB420, PACK_420),
++  MAKE_YUV_FORMAT (STV1, "raw video", GST_MAKE_FOURCC ('S', 'T', 'V', '1'),
++      DPTH888, PSTR111, PLANE012, OFFS0, SUB420, PACK_420),
 +#endif
  };
  
+ G_GNUC_END_IGNORE_DEPRECATIONS;
  static GstVideoFormat
  gst_video_format_from_rgb32_masks (int red_mask, int green_mask, int blue_mask)
  {
@@@ -386,8 -373,33 +389,35 @@@ typedef enum 
     * Since: 1.20
     */
    GST_VIDEO_FORMAT_ABGR64_BE,
+   /**
+    * GST_VIDEO_FORMAT_NV12_16L32S:
+    *
+    * NV12 with 16x32 Y tiles and 16x16 UV tiles.
+    *
+    * Since: 1.22
+    */
+   GST_VIDEO_FORMAT_NV12_16L32S,
+   /**
+    * GST_VIDEO_FORMAT_NV12_8L128:
+    *
+    * NV12 with 8x128 tiles in linear order.
+    *
+    * Since: 1.22
+    */
+   GST_VIDEO_FORMAT_NV12_8L128,
+   /**
+    * GST_VIDEO_FORMAT_NV12_10BE_8L128:
+    *
+    * NV12 10bit big endian with 8x128 tiles in linear order.
+    *
+    * Since: 1.22
+    */
+   GST_VIDEO_FORMAT_NV12_10BE_8L128,
 +  GST_VIDEO_FORMAT_STV0, /* TIZEN_PROFILE_TV */
 +  GST_VIDEO_FORMAT_STV1, /* TIZEN_PROFILE_TV */
  } GstVideoFormat;
  
  #define GST_VIDEO_MAX_PLANES 4
@@@ -761,10 -874,9 +892,10 @@@ gconstpointer  gst_video_format_get_pal
      "GBR_12BE, Y444_12LE, GBR_12LE, I422_12BE, I422_12LE, Y212_BE, Y212_LE, I420_12BE, " \
      "I420_12LE, P012_BE, P012_LE, Y444_10BE, GBR_10BE, Y444_10LE, GBR_10LE, r210, " \
      "I422_10BE, I422_10LE, NV16_10LE32, Y210, v210, UYVP, I420_10BE, I420_10LE, " \
-     "P010_10BE, P010_10LE, NV12_10LE32, NV12_10LE40, Y444, RGBP, GBR, BGRP, NV24, xBGR, BGRx, " \
+     "P010_10BE, P010_10LE, NV12_10LE32, NV12_10LE40, NV12_10BE_8L128, Y444, RGBP, GBR, BGRP, NV24, xBGR, BGRx, " \
      "xRGB, RGBx, BGR, IYU2, v308, RGB, Y42B, NV61, NV16, VYUY, UYVY, YVYU, YUY2, I420, " \
-     "YV12, NV21, NV12, NV12_64Z32, NV12_4L4, NV12_32L32, Y41B, IYU1, YVU9, YUV9, RGB16, " \
+     "YV12, NV21, NV12, NV12_8L128, NV12_64Z32, NV12_4L4, NV12_32L32, NV12_16L32S, Y41B, IYU1, YVU9, YUV9, RGB16, " \
 +      "S420, ITLV, SN12, ST12, SN21, INVZ, STV0, STV1, " \
      "BGR16, RGB15, BGR15, RGB8P, GRAY16_BE, GRAY16_LE, GRAY10_LE32, GRAY8 }"
  #elif G_BYTE_ORDER == G_LITTLE_ENDIAN
  #define GST_VIDEO_FORMATS_ALL "{ ABGR64_LE, BGRA64_LE, AYUV64, ARGB64_LE, ARGB64, " \
      "GBR_12LE, Y444_12BE, GBR_12BE, I422_12LE, I422_12BE, Y212_LE, Y212_BE, I420_12LE, " \
      "I420_12BE, P012_LE, P012_BE, Y444_10LE, GBR_10LE, Y444_10BE, GBR_10BE, r210, " \
      "I422_10LE, I422_10BE, NV16_10LE32, Y210, v210, UYVP, I420_10LE, I420_10BE, " \
-     "P010_10LE, NV12_10LE32, NV12_10LE40, P010_10BE, Y444, RGBP, GBR, BGRP, NV24, xBGR, BGRx, " \
+     "P010_10LE, NV12_10LE32, NV12_10LE40, P010_10BE, NV12_10BE_8L128, Y444, RGBP, GBR, BGRP, NV24, xBGR, BGRx, " \
      "xRGB, RGBx, BGR, IYU2, v308, RGB, Y42B, NV61, NV16, VYUY, UYVY, YVYU, YUY2, I420, " \
-     "YV12, NV21, NV12, NV12_64Z32, NV12_4L4, NV12_32L32, Y41B, IYU1, YVU9, YUV9, RGB16, " \
+     "YV12, NV21, NV12, NV12_8L128, NV12_64Z32, NV12_4L4, NV12_32L32, NV12_16L32S, Y41B, IYU1, YVU9, YUV9, RGB16, " \
 +      "S420, ITLV, SN12, ST12, SN21, INVZ, STV0, STV1, " \
      "BGR16, RGB15, BGR15, RGB8P, GRAY16_LE, GRAY16_BE, GRAY10_LE32, GRAY8 }"
  #endif
  
@@@ -607,33 -550,7 +598,34 @@@ gst_decodebin3_class_init (GstDecodebin
        g_param_spec_boxed ("caps", "Caps",
            "The caps on which to stop decoding. (NULL = default)",
            GST_TYPE_CAPS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-   /* FIXME : ADD SIGNALS ! */
 +#ifdef TIZEN_FEATURE_FORCE_SW_DECODER
 +  g_object_class_install_property (gobject_klass, PROP_FORCE_SW_DECODERS_FOR_VIDEO,
 +      g_param_spec_boolean ("force-sw-decoders-for-video", "Video Software Decoders Only",
 +          "Use only sofware decoders for video to process streams",
 +          DEFAULT_FORCE_SW_DECODERS,
 +          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 +  g_object_class_install_property (gobject_klass, PROP_FORCE_SW_DECODERS_FOR_AUDIO,
 +      g_param_spec_boolean ("force-sw-decoders-for-audio", "Audio Software Decoders Only",
 +          "Use only sofware decoders for audio to process streams",
 +          DEFAULT_FORCE_SW_DECODERS,
 +          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 +#else
 +  /**
 +   * GstDecodeBin::force-sw-decoders:
 +   *
 +   * While auto-plugging, if set to %TRUE, those decoders within
 +   * "Hardware" klass will be ignored. Otherwise they will be tried.
 +   *
 +   * Since: 1.18
 +   */
 +  g_object_class_install_property (gobject_klass, PROP_FORCE_SW_DECODERS,
 +      g_param_spec_boolean ("force-sw-decoders", "Software Decoders Only",
 +          "Use only sofware decoders to process streams",
 +          DEFAULT_FORCE_SW_DECODERS,
 +          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 +#endif
++
    /**
     * GstDecodebin3::select-stream
     * @decodebin: a #GstDecodebin3
@@@ -2097,11 -2479,9 +2615,11 @@@ multiqueue_src_probe (GstPad * pad, Gst
            GST_DEBUG_OBJECT (pad, "Got regular eos (all_inputs_are_eos)");
            /* drop current event as eos will be sent in check_all_slot_for_eos
             * when all output streams are also eos */
 +#ifndef TIZEN_FEATURE_DISABLE_EOS_DROP
            ret = GST_PAD_PROBE_DROP;
 +#endif
            SELECTION_LOCK (dbin);
-           check_all_slot_for_eos (dbin);
+           check_all_slot_for_eos (dbin, ev);
            SELECTION_UNLOCK (dbin);
          }
        }
@@@ -37,19 -34,8 +37,21 @@@ G_BEGIN_DECL
      "subpicture/x-xsub; " \
      "subpicture/x-pgs; " \
      "closedcaption/x-cea-608; " \
-     "closedcaption/x-cea-708"
+     "closedcaption/x-cea-708; " \
+     "application/x-onvif-metadata; "
 +#else
 +#define DEFAULT_RAW_CAPS \
 +    "video/x-raw(ANY); " \
 +    "audio/x-raw(ANY); " \
 +    "text/x-raw(ANY); " \
 +    "subpicture/x-dvd; " \
 +    "subpicture/x-dvb; " \
 +    "subpicture/x-xsub; " \
 +    "subpicture/x-pgs; " \
 +    "closedcaption/x-cea-608; " \
-     "closedcaption/x-cea-708"
- #endif        
++    "closedcaption/x-cea-708; " \
++    "application/x-onvif-metadata; "
++#endif
  
  G_END_DECLS
  
@@@ -196,28 -224,24 +224,25 @@@ struct _GstURIDecodeBin
    guint buffer_size;            /* When buffering, buffer size (bytes) */
    gboolean download;
    gboolean use_buffering;
 +  gboolean force_sw_decoders;
    guint64 ring_buffer_max_size;
+   gboolean instant_uri;         /* Whether URI changes should be applied immediately or not */
  
-   GList *play_items;            /* List of GstPlayItem ordered by time of
-                                  * creation. Head of list is therefore the
-                                  * current (or pending if initial) one being
-                                  * outputted */
-   GstPlayItem *current;         /* Currently active GstPlayItem. Can be NULL
-                                  * if no entry is active yet (i.e. no source
-                                  * pads) */
-   /* sources.
-    * FIXME : Replace by a more modular system later on */
-   GstSourceHandler *main_handler;
-   GstSourceHandler *sub_handler;
-   /* URI handling
-    * FIXME : Switch to a playlist-based API */
-   gchar *uri;
-   gboolean uri_changed;         /* TRUE if uri changed */
-   gchar *suburi;
-   gboolean suburi_changed;      /* TRUE if suburi changed */
+   /* Mutex to protect play_items/input_item/output_item */
+   GMutex play_items_lock;
+   /* Notify that the input_item sources have all drained */
+   GCond input_source_drained;
+   /* List of GstPlayItem ordered by time of creation (first is oldest, new ones
+    * are appended) */
+   GList *play_items;
+   /* Play item currently feeding decodebin3. */
+   GstPlayItem *input_item;
+   /* Play item currently outputted by decodebin3 */
+   GstPlayItem *output_item;
  
    /* A global decodebin3 that's used to actually do decoding */
    GstElement *decodebin;
@@@ -280,8 -298,8 +299,9 @@@ enu
  #define DEFAULT_BUFFER_SIZE         -1
  #define DEFAULT_DOWNLOAD            FALSE
  #define DEFAULT_USE_BUFFERING       FALSE
 +#define DEFAULT_FORCE_SW_DECODERS   FALSE
  #define DEFAULT_RING_BUFFER_MAX_SIZE 0
+ #define DEFAULT_INSTANT_URI         FALSE
  
  enum
  {
    PROP_BUFFER_DURATION,
    PROP_DOWNLOAD,
    PROP_USE_BUFFERING,
 +  PROP_FORCE_SW_DECODERS,
    PROP_RING_BUFFER_MAX_SIZE,
-   PROP_CAPS
+   PROP_CAPS,
+   PROP_INSTANT_URI
  };
  
  static guint gst_uri_decode_bin3_signals[LAST_SIGNAL] = { 0 };
@@@ -1884,11 -1642,36 +1860,51 @@@ check_initial_events (GstSubParse * sel
        gst_pad_push_event (self->srcpad, gst_event_new_tag (tags));
      }
    }
+   return GST_FLOW_OK;
+ }
+ static GstFlowReturn
+ handle_buffer (GstSubParse * self, GstBuffer * buf)
+ {
+   GstFlowReturn ret = GST_FLOW_OK;
+   gchar *line, *subtitle;
++#ifdef TIZEN_FEATURE_SUBPARSE_MODIFICATION
++  GstMessage *m = NULL;
++#endif
++#ifdef TIZEN_FEATURE_HLS_WEBVTT
++  GstClockTime fragment_timestamp = GST_CLOCK_TIME_NONE;
++#endif
+   GST_DEBUG_OBJECT (self, "%" GST_PTR_FORMAT, buf);
+   if (self->first_buffer) {
+     GstMapInfo map;
+     gst_buffer_map (buf, &map, GST_MAP_READ);
+     self->detected_encoding =
+         gst_sub_parse_detect_encoding ((gchar *) map.data, map.size);
+     gst_buffer_unmap (buf, &map);
+     self->first_buffer = FALSE;
+     self->state.fps_n = self->fps_n;
+     self->state.fps_d = self->fps_d;
+   }
++#ifdef TIZEN_FEATURE_HLS_WEBVTT
++  if (GST_BUFFER_IS_DISCONT (buf) && GST_BUFFER_PTS_IS_VALID (buf))
++    fragment_timestamp = GST_BUFFER_PTS (buf);
++#endif
+   feed_textbuf (self, buf);
+   ret = check_initial_events (self);
+   if (ret != GST_FLOW_OK)
+     return ret;
 +#ifdef TIZEN_FEATURE_HLS_WEBVTT
 +  if (self->parser_type == GST_SUB_PARSE_FORMAT_VTT)
 +    send_fragment_timestamp_event (self, fragment_timestamp);
 +#endif
 +
    while (!self->flushing && (line = get_next_line (self))) {
      guint offset = 0;
  
@@@ -2063,13 -1820,18 +2079,23 @@@ gst_sub_parse_sink_event (GstPad * pad
         * trigger sending of the saved requested seek segment
         * or the one taken here from upstream */
        self->need_segment = TRUE;
 +
 +#ifdef TIZEN_FEATURE_SUBPARSE_MODIFICATION
 +      SUBPARSE_SEEK_UNLOCK (self);
 +#endif
 +
        break;
      }
+     case GST_EVENT_GAP:
+     {
+       ret = check_initial_events (self);
+       if (ret == GST_FLOW_OK) {
+         ret = gst_pad_event_default (pad, parent, event);
+       } else {
+         gst_event_unref (event);
+       }
+       break;
+     }
      case GST_EVENT_FLUSH_START:
      {
        self->flushing = TRUE;
@@@ -701,16 -548,9 +712,16 @@@ html_context_parse (HtmlContext * ctxt
          return;
        }
  
 +#ifdef TIZEN_FEATURE_SUBPARSE_MODIFICATION
 +      /* after seeking,
 +         the subtitle file will be delivered from the start again. */
 +      if (strcasestr(next, "<SAMI>"))
 +        next = strcasestr(next, "<SAMI>");
 +#endif
 +
        next = string_token (next, ">", &element);
        next++;
-       if (g_str_has_suffix (next, "/")) {
+       if (g_str_has_suffix (element, "/")) {
          /* handle <blah/> */
          element[strlen (element) - 1] = '\0';
          html_context_handle_element (ctxt, element + 1, TRUE);
@@@ -1242,46 -892,20 +1253,46 @@@ parse_sami (ParserState * state, const 
    gchar *unescaped = unescape_string (line);
    html_context_parse (context->htmlctxt, (gchar *) unescaped,
        strlen (unescaped));
 +#ifdef TIZEN_FEATURE_SUBPARSE_MODIFICATION
 +  if (context->lang_list)
 +    state->language_list = context->lang_list;
 +
 +  if (context->desired_language && g_strcmp0(context->desired_language, state->current_language)) {
 +    g_free (state->current_language);
 +    state->current_language = g_strdup(context->desired_language);
 +    GST_WARNING("current lang is updated %s", state->current_language);
 +  }
 +#endif
    g_free (unescaped);
-           context->rubybuf = g_string_append_c (context->rubybuf, '\n');
 +#ifdef TIZEN_FEATURE_SUBPARSE_MODIFICATION
 +  if (context->desired_language && context->current_language) {
 +    if ((!strcmp(context->current_language, context->desired_language)) || context->end_body) {
 +#endif
 +      if (context->has_result) {
 +        if (context->rubybuf->len) {
-           context->rubybuf = g_string_truncate (context->rubybuf, 0);
++          g_string_append_c (context->rubybuf, '\n');
 +          g_string_prepend (context->resultbuf, context->rubybuf->str);
++          g_string_truncate (context->rubybuf, 0);
 +        }
  
 -  if (context->has_result) {
 -    if (context->rubybuf->len) {
 -      g_string_append_c (context->rubybuf, '\n');
 -      g_string_prepend (context->resultbuf, context->rubybuf->str);
 -      g_string_truncate (context->rubybuf, 0);
 +        ret = g_string_free (context->resultbuf, FALSE);
 +        context->resultbuf = g_string_new ("");
 +        state->start_time = context->time1;
 +#ifdef TIZEN_FEATURE_SUBPARSE_MODIFICATION
 +        if (!GST_CLOCK_TIME_IS_VALID(context->time2))
 +          state->duration = GST_CLOCK_TIME_NONE;
 +        else
 +          state->duration = context->time2 - context->time1;
 +#else
 +        state->duration = context->time2 - context->time1;
 +#endif
 +        context->has_result = FALSE;
 +      }
 +#ifdef TIZEN_FEATURE_SUBPARSE_MODIFICATION
 +      context->end_body = FALSE;
      }
 -
 -    ret = g_string_free (context->resultbuf, FALSE);
 -    context->resultbuf = g_string_new ("");
 -    state->start_time = context->time1;
 -    state->duration = context->time2 - context->time1;
 -    context->has_result = FALSE;
    }
 +#endif
 +
    return ret;
  }
@@@ -612,53 -655,27 +657,28 @@@ static gboolea
  xml_check_first_element (GstTypeFind * tf, const gchar * element, guint elen,
      gboolean strict)
  {
-   gboolean got_xmldec;
    const guint8 *data;
-   guint offset = 0;
-   guint pos = 0;
-   data = gst_type_find_peek (tf, 0, XML_BUFFER_SIZE);
-   if (!data)
-     return FALSE;
+   guint length;
  
-   /* look for the XMLDec
-    * see XML spec 2.8, Prolog and Document Type Declaration
-    * http://www.w3.org/TR/2004/REC-xml-20040204/#sec-prolog-dtd */
-   got_xmldec = (memcmp (data, "<?xml", 5) == 0);
+   length = gst_type_find_get_length (tf);
  
-   if (strict && !got_xmldec)
+   /* try a default that should be enough */
+   if (length == 0)
+     length = 512;
+   else if (length < 32)
      return FALSE;
+   else                          /* the first few bytes should be enough */
+     length = MIN (4096, length);
  
-   /* skip XMLDec in any case if we've got one */
-   if (got_xmldec) {
-     pos += 5;
-     data += 5;
-   }
-   /* look for the first element, it has to be the requested element. Bail
-    * out if it is not within the first 4kB. */
-   while (data && (offset + pos) < 4096) {
-     while (*data != '<' && (offset + pos) < 4096) {
-       XML_INC_BUFFER;
-     }
-     XML_INC_BUFFER;
-     if (!g_ascii_isalpha (*data)) {
-       /* if not alphabetic, it's a PI or an element / attribute declaration
-        * like <?xxx or <!xxx */
-       XML_INC_BUFFER;
-       continue;
-     }
-     /* the first normal element, check if it's the one asked for */
-     data = gst_type_find_peek (tf, offset + pos, elen + 1);
-     return (data && element && strncmp ((char *) data, element, elen) == 0);
-   }
+   data = gst_type_find_peek (tf, 0, length);
+   if (!data)
+     return FALSE;
  
-   return FALSE;
+   return xml_check_first_element_from_data (data, length, element, elen,
+       strict);
  }
  
 +#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
  static GstStaticCaps generic_xml_caps = GST_STATIC_CAPS ("application/xml");
  
  #define GENERIC_XML_CAPS (gst_static_caps_get(&generic_xml_caps))
index 7dc39fb,0000000..d5d6b9b
mode 100644,000000..100644
--- /dev/null
@@@ -1,14 -1,0 +1,14 @@@
-   dependencies : glib_deps + [video_dep, gst_dep, gst_base_dep],
 +videoscale_sources = [
 +  'gstvideoscale.c',
 +]
 +
 +gstvideoscale = library('gstvideoscale',
 +  videoscale_sources,
 +  c_args : gst_plugins_base_args,
 +  include_directories: [configinc, libsinc],
- pkgconfig.generate(gstvideoscale, install_dir : plugins_pkgconfig_install_dir)
++  dependencies : [video_dep, gst_dep, gst_base_dep],
 +  install : true,
 +  install_dir : plugins_install_dir,
 +)
++
 +plugins += [gstvideoscale]
@@@ -1,6 -1,6 +1,6 @@@
  project('gst-plugins-base', 'c',
-   version : '1.20.0',
+   version : '1.22.0',
 -  meson_version : '>= 0.62',
 +  meson_version : '>= 0.59',
    default_options : [ 'warning_level=1',
                        'buildtype=debugoptimized' ])
  
@@@ -375,39 -382,6 +382,38 @@@ els
    core_conf.set('DISABLE_ORC', 1)
  endif
  
- core_conf.set('TIZEN_FEATURE_U3_AVOID_DEADLOCK', true)
 +# TIZEN_BUILD_OPTION
 +core_conf.set('TIZEN_FEATURE_FIX_SEG_FAULT', true)
 +core_conf.set('TIZEN_FEATURE_WAYLAND_ENHANCEMENT', true)
 +core_conf.set('TIZEN_FEATURE_TYPEFIND_ENHANCEMENT', true)
 +core_conf.set('TIZEN_FEATURE_AUDIODECODER_MODIFICATION', true)
 +core_conf.set('TIZEN_FEATURE_DISABLE_MIME_TYPES', true)
 +core_conf.set('TIZEN_FEATURE_VIDEO_MODIFICATION', true)
 +core_conf.set('TIZEN_FEATURE_SUBPARSE_MODIFICATION', true)
 +core_conf.set('TIZEN_FEATURE_SUBPARSE_DROP_OUT_OF_SEGMENT', true)
 +core_conf.set('TIZEN_FEATURE_HLS_WEBVTT', true)
 +core_conf.set('TIZEN_FEATURE_VOLUME_MODIFICATION', true)
 +core_conf.set('TIZEN_FEATURE_FORCE_SW_DECODER', true)
 +core_conf.set('TIZEN_FEATURE_PLAYBIN3_MODIFICATION', true)
 +core_conf.set('TIZEN_FEATURE_DISABLE_EOS_DROP', true)
 +
 +tbm_dep = dependency('libtbm', required : get_option('tbm'))
 +if tbm_dep.found()
 +  core_conf.set('USE_TBM', true)
 +endif
 +
 +if get_option('tv-profile')
 +  core_conf.set('TIZEN_PROFILE_TV', true)
 +  core_conf.set('TIZEN_FEATURE_TRUSTZONE', true)
 +else
 +  core_conf.set('TIZEN_FEATURE_RESOURCE_MANAGER', true)
 +endif
 +
 +# TIZEN_GLOBAL_BUILD_OPTION
 +core_conf.set('TIZEN_FEATURE_BASEPARSE_MODIFICATION', true)
 +
 +# TIZEN_BUILD_OPTION end
 +
  # Used to build SSE* things in audio-resampler
  sse_args = '-msse'
  sse2_args = '-msse2'
@@@ -478,14 -452,14 +484,16 @@@ if get_option('default_library') == 'sh
    plugins_pkgconfig_install_dir = disabler()
  endif
  
 -pkgconfig_variables = [
 -  'exec_prefix=${prefix}',
 -  'toolsdir=${exec_prefix}/bin',
 -  'pluginsdir=${libdir}/gstreamer-1.0',
 -  'girdir=${datadir}/gir-1.0',
 -  'typelibdir=${libdir}/girepository-1.0',
 -  'pluginscannerdir=${libexecdir}/gstreamer-1.0'
 +pkgconfig_variables = ['exec_prefix=${prefix}',
 +    'toolsdir=${exec_prefix}/bin',
 +    'pluginsdir=${libdir}/gstreamer-1.0',
 +    'datarootdir=${prefix}/share',
 +    'datadir=${datarootdir}',
 +    'girdir=${datadir}/gir-1.0',
 +    'typelibdir=${libdir}/girepository-1.0',
-     'libexecdir=${prefix}/libexec']
++    'libexecdir=${prefix}/libexec',
++    'pluginscannerdir=${libexecdir}/gstreamer-1.0'
+ ]
  pkgconfig_subdirs = ['gstreamer-1.0']
  
  meson_pkg_config_file_fixup_script = find_program('scripts/meson-pkg-config-file-fixup.py')
@@@ -46,9 -46,8 +46,10 @@@ option('rawparse', type : 'feature', va
  option('subparse', type : 'feature', value : 'auto')
  option('tcp', type : 'feature', value : 'auto')
  option('typefind', type : 'feature', value : 'auto')
 -option('videoconvertscale', type : 'feature', value : 'auto')
++option('videoconvertscale', type : 'feature', value : 'disabled')
 +option('videoconvert', type : 'feature', value : 'auto')
- option('videorate', type : 'feature', value : 'auto')
 +option('videoscale', type : 'feature', value : 'auto')
+ option('videorate', type : 'feature', value : 'auto')
  option('videotestsrc', type : 'feature', value : 'auto')
  option('volume', type : 'feature', value : 'auto')
  
@@@ -69,8 -69,8 +71,8 @@@ option('xi', type : 'feature', value : 
  # Common feature options
  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('tools', type : 'feature', value : 'disabled', yield : false)
 +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,
@@@ -346,12 -323,7 +346,12 @@@ gst_pulsering_destroy_stream (GstPulseR
      pa_stream_set_write_callback (pbuf->stream, NULL, NULL);
      pa_stream_set_underflow_callback (pbuf->stream, NULL, NULL);
      pa_stream_set_overflow_callback (pbuf->stream, NULL, NULL);
- #ifdef TIZEN_FEATURE_PULSE_MODIFICATION
      pa_stream_set_latency_update_callback (pbuf->stream, NULL, NULL);
++#ifdef TIZEN_FEATURE_PULSE_MODIFICATION
 +    pa_stream_set_suspended_callback (pbuf->stream, NULL, NULL);
 +    pa_stream_set_started_callback (pbuf->stream, NULL, NULL);
 +    pa_stream_set_event_callback (pbuf->stream, NULL, NULL);
 +#endif
  
      pa_stream_unref (pbuf->stream);
      pbuf->stream = NULL;
@@@ -266,54 -231,40 +268,53 @@@ gst_aac_parse_set_src_caps (GstAacPars
    if (stream_format)
      gst_structure_set (s, "stream-format", G_TYPE_STRING, stream_format, NULL);
  
 +#ifdef TIZEN_FEATURE_AACPARSE_MODIFICATION
 +  if (!gst_structure_get_value (s, "codec_data")) {
 +    GstBuffer *codec_data_buffer;
 +    GST_WARNING("Insert codec_data to src_caps");
 +    /* The codec_data data is according to AudioSpecificConfig,
 +       ISO/IEC 14496-3, 1.6.2.1 */
 +    codec_data_buffer = gst_buffer_new_and_alloc (2);
 +    gst_buffer_fill (codec_data_buffer, 0, codec_data, 2);
 +    gst_caps_set_simple (src_caps, "codec_data", GST_TYPE_BUFFER, codec_data_buffer, NULL);
 +    gst_buffer_unref (codec_data_buffer);
 +  }
 +#endif
 +
    peercaps = gst_pad_peer_query_caps (GST_BASE_PARSE_SRC_PAD (aacparse), NULL);
    if (peercaps && !gst_caps_can_intersect (src_caps, peercaps)) {
-     GST_DEBUG_OBJECT (GST_BASE_PARSE (aacparse)->srcpad,
-         "Caps can not intersect");
+     GstCaps *convcaps = gst_caps_copy (src_caps);
+     GstStructure *cs = gst_caps_get_structure (convcaps, 0);
+     GST_DEBUG_OBJECT (aacparse, "Caps do not intersect: parsed %" GST_PTR_FORMAT
+         " and peer %" GST_PTR_FORMAT, src_caps, peercaps);
      if (aacparse->header_type == DSPAAC_HEADER_ADTS) {
-       GST_DEBUG_OBJECT (GST_BASE_PARSE (aacparse)->srcpad,
-           "Input is ADTS, trying raw");
-       gst_caps_set_simple (src_caps, "stream-format", G_TYPE_STRING, "raw",
-           NULL);
-       if (gst_caps_can_intersect (src_caps, peercaps)) {
-         GstBuffer *codec_data_buffer;
-         GST_DEBUG_OBJECT (GST_BASE_PARSE (aacparse)->srcpad,
-             "Caps can intersect, we will drop the ADTS layer");
-         aacparse->output_header_type = DSPAAC_HEADER_NONE;
+       GstBuffer *codec_data_buffer = gst_buffer_new_and_alloc (2);
+       gst_buffer_fill (codec_data_buffer, 0, codec_data, 2);
+       gst_structure_set (cs, "stream-format", G_TYPE_STRING, "raw",
+           "codec_data", GST_TYPE_BUFFER, codec_data_buffer, NULL);
  
-         /* The codec_data data is according to AudioSpecificConfig,
-            ISO/IEC 14496-3, 1.6.2.1 */
-         codec_data_buffer = gst_buffer_new_and_alloc (2);
-         gst_buffer_fill (codec_data_buffer, 0, codec_data, 2);
-         gst_caps_set_simple (src_caps, "codec_data", GST_TYPE_BUFFER,
-             codec_data_buffer, NULL);
-         gst_buffer_unref (codec_data_buffer);
+       if (gst_caps_can_intersect (convcaps, peercaps)) {
+         GST_DEBUG_OBJECT (aacparse, "Converting from ADTS to raw");
+         aacparse->output_header_type = DSPAAC_HEADER_NONE;
+         gst_caps_replace (&src_caps, convcaps);
        }
+       gst_buffer_unref (codec_data_buffer);
      } else if (aacparse->header_type == DSPAAC_HEADER_NONE) {
-       GST_DEBUG_OBJECT (GST_BASE_PARSE (aacparse)->srcpad,
-           "Input is raw, trying ADTS");
-       gst_caps_set_simple (src_caps, "stream-format", G_TYPE_STRING, "adts",
-           NULL);
-       if (gst_caps_can_intersect (src_caps, peercaps)) {
-         GST_DEBUG_OBJECT (GST_BASE_PARSE (aacparse)->srcpad,
-             "Caps can intersect, we will prepend ADTS headers");
+       gst_structure_set (cs, "stream-format", G_TYPE_STRING, "adts", NULL);
+       gst_structure_remove_field (cs, "codec_data");
+       if (gst_caps_can_intersect (convcaps, peercaps)) {
+         GST_DEBUG_OBJECT (aacparse, "Converting from raw to ADTS");
          aacparse->output_header_type = DSPAAC_HEADER_ADTS;
+         gst_caps_replace (&src_caps, convcaps);
        }
      }
+     gst_caps_unref (convcaps);
    }
    if (peercaps)
      gst_caps_unref (peercaps);
@@@ -95,10 -103,14 +103,18 @@@ struct _GstMpegAudioParse 
    /* LAME info */
    guint32      encoder_delay;
    guint32      encoder_padding;
+   /* Gapless playback states */
+   guint32      decoder_delay;
+   guint64      start_of_actual_samples;
+   guint64      end_of_actual_samples;
+   GstClockTime start_padding_time;
+   GstClockTime end_padding_time;
+   GstClockTime total_padding_time;
 +#ifdef TIZEN_FEATURE_MP3PARSE_MODIFICATION
 +  /* Additional info */
 +  gboolean     http_seek_flag;
 +#endif
  };
  
  /**
@@@ -417,11 -430,11 +430,16 @@@ G_BEGIN_DECL
  #define FOURCC_aavd     GST_MAKE_FOURCC('a','a','v','d')
  #define FOURCC_adrm     GST_MAKE_FOURCC('a','d','r','m')
  
+ #define FOURCC_metx     GST_MAKE_FOURCC('m','e','t','x')
+ /* ONVIF Export File Format */
+ #define FOURCC_cstb     GST_MAKE_FOURCC('c','s','t','b')
 +#ifdef TIZEN_FEATURE_QTDEMUX_MODIFICATION
 +/* Spatial Audio */
 +#define FOURCC_SA3D     GST_MAKE_FOURCC('S','A','3','D')
 +#endif /* TIZEN_FEATURE_QTDEMUX_MODIFICATION */
 +
  G_END_DECLS
  
  #endif /* __FOURCC_H__ */
@@@ -411,11 -392,9 +420,13 @@@ static void gst_qtdemux_append_protecti
      const gchar * id);
  static void qtdemux_gst_structure_free (GstStructure * gststructure);
  static void gst_qtdemux_reset (GstQTDemux * qtdemux, gboolean hard);
+ static void qtdemux_clear_protection_events_on_all_streams (GstQTDemux *
+     qtdemux);
  
 +#ifdef TIZEN_FEATURE_QTDEMUX_MODIFICATION
 +static void gst_tag_register_spherical_tags (void);
 +#endif /* TIZEN_FEATURE_QTDEMUX_MODIFICATION */
 +
  static void
  gst_qtdemux_class_init (GstQTDemuxClass * klass)
  {
@@@ -353,9 -355,9 +355,12 @@@ enu
  #define DEFAULT_MAX_STREAMS          G_MAXUINT
  #define DEFAULT_MAX_TS_OFFSET_ADJUSTMENT G_GUINT64_CONSTANT(0)
  #define DEFAULT_MAX_TS_OFFSET        G_GINT64_CONSTANT(3000000000)
+ #define DEFAULT_MIN_TS_OFFSET        MIN_TS_OFFSET_ROUND_OFF_COMP
+ #define DEFAULT_TS_OFFSET_SMOOTHING_FACTOR  0
+ #define DEFAULT_UPDATE_NTP64_HEADER_EXT TRUE
 +#ifdef TIZEN_FEATURE_RTSP_MODIFICATION
 +#define DEFAULT_RTSP_USE_BUFFERING  FALSE
 +#endif
  
  enum
  {
    PROP_MAX_STREAMS,
    PROP_MAX_TS_OFFSET_ADJUSTMENT,
    PROP_MAX_TS_OFFSET,
+   PROP_MIN_TS_OFFSET,
+   PROP_TS_OFFSET_SMOOTHING_FACTOR,
    PROP_FEC_DECODERS,
    PROP_FEC_ENCODERS,
+   PROP_UPDATE_NTP64_HEADER_EXT,
 +#ifdef TIZEN_FEATURE_RTSP_MODIFICATION
 +  PROP_USE_RTSP_BUFFERING       /* use for player RTSP buffering */
 +#endif
  };
  
  #define GST_RTP_BIN_RTCP_SYNC_TYPE (gst_rtp_bin_rtcp_sync_get_type())
@@@ -1841,11 -1939,10 +1957,13 @@@ create_stream (GstRtpBinSession * sessi
  
    stream->have_sync = FALSE;
    stream->rt_delta = 0;
+   stream->avg_ts_offset = 0;
+   stream->is_initialized = FALSE;
    stream->rtp_delta = 0;
    stream->percent = 100;
 +#ifdef TIZEN_FEATURE_RTSP_MODIFICATION
 +  stream->prev_percent = 0;
 +#endif
    stream->clock_base = -100 * GST_SECOND;
    session->streams = g_slist_prepend (session->streams, stream);
  
    if (g_object_class_find_property (jb_class, "max-ts-offset-adjustment"))
      g_object_set (buffer, "max-ts-offset-adjustment",
          rtpbin->max_ts_offset_adjustment, NULL);
+   if (g_object_class_find_property (jb_class, "sync-interval"))
+     g_object_set (buffer, "sync-interval", rtpbin->rtcp_sync_interval, NULL);
  
 +#ifdef TIZEN_FEATURE_RTSP_MODIFICATION
 +  /* configure queue2 to use live buffering */
 +  if (queue2) {
 +    g_object_set_data (G_OBJECT (queue2), "GstRTPBin.stream", stream);
 +    g_object_set (queue2, "use-buffering", TRUE, NULL);
 +    g_object_set (queue2, "buffer-mode", GST_BUFFERING_LIVE, NULL);
 +  }
 +#endif
    g_signal_emit (rtpbin, gst_rtp_bin_signals[SIGNAL_NEW_JITTERBUFFER], 0,
        buffer, session->id, ssrc);
  
@@@ -2858,14 -2986,22 +3047,30 @@@ gst_rtp_bin_class_init (GstRtpBinClass 
            "fec-encoders='fec,0=\"rtpst2022-1-fecenc\\ rows\\=5\\ columns\\=5\";'",
            GST_TYPE_STRUCTURE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  
+   /**
+    * GstRtpBin:update-ntp64-header-ext:
+    *
+    * Whether RTP NTP header extension should be updated with actual
+    * NTP time. If not, use the NTP time from buffer timestamp metadata
+    *
+    * Since: 1.22
+    */
+   g_object_class_install_property (gobject_class,
+       PROP_UPDATE_NTP64_HEADER_EXT,
+       g_param_spec_boolean ("update-ntp64-header-ext",
+           "Update NTP-64 RTP Header Extension",
+           "Whether RTP NTP header extension should be updated with actual NTP time",
+           DEFAULT_UPDATE_NTP64_HEADER_EXT,
+           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 +#ifdef TIZEN_FEATURE_RTSP_MODIFICATION
 +  g_object_class_install_property (gobject_class, PROP_USE_RTSP_BUFFERING,
 +      g_param_spec_boolean ("use-rtsp-buffering", "Use RTSP buffering",
 +          "Use RTSP buffering in RTP_JITTER_BUFFER_MODE_SLAVE buffer mode",
 +          DEFAULT_RTSP_USE_BUFFERING,
 +          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 +#endif
 +
    gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_rtp_bin_change_state);
    gstelement_class->request_new_pad =
        GST_DEBUG_FUNCPTR (gst_rtp_bin_request_new_pad);
@@@ -2952,9 -3089,10 +3158,13 @@@ gst_rtp_bin_init (GstRtpBin * rtpbin
    rtpbin->max_ts_offset_adjustment = DEFAULT_MAX_TS_OFFSET_ADJUSTMENT;
    rtpbin->max_ts_offset = DEFAULT_MAX_TS_OFFSET;
    rtpbin->max_ts_offset_is_set = FALSE;
+   rtpbin->min_ts_offset = DEFAULT_MIN_TS_OFFSET;
+   rtpbin->min_ts_offset_is_set = FALSE;
+   rtpbin->ts_offset_smoothing_factor = DEFAULT_TS_OFFSET_SMOOTHING_FACTOR;
+   rtpbin->update_ntp64_header_ext = DEFAULT_UPDATE_NTP64_HEADER_EXT;
 +#ifdef TIZEN_FEATURE_RTSP_MODIFICATION
 +  rtpbin->use_rtsp_buffering = FALSE;
 +#endif
  
    /* some default SDES entries */
    cname = g_strdup_printf ("user%u@host-%x", g_random_int (), g_random_int ());
@@@ -78,9 -79,10 +79,13 @@@ struct _GstRtpBin 
    guint64         max_ts_offset_adjustment;
    gint64          max_ts_offset;
    gboolean        max_ts_offset_is_set;
+   guint64         min_ts_offset;
+   gboolean        min_ts_offset_is_set;
+   guint           ts_offset_smoothing_factor;
 +#ifdef TIZEN_FEATURE_RTSP_MODIFICATION
 +  gboolean        use_rtsp_buffering;
 +#endif
    /* a list of session */
    GSList         *sessions;
  
@@@ -6059,13 -6034,9 +6209,14 @@@ connect_error
  
      src->conninfo.connected = FALSE;
      if (res != GST_RTSP_EINTR) {
+       gchar *str = gst_rtsp_strresult (res);
 +#ifdef TIZEN_FEATURE_RTSP_MODIFICATION
 +      gst_rtspsrc_post_error_message (src, GST_RTSPSRC_ERROR_CONNECTION_FAIL,
 +          "Could not connect to server.");
 +#else
        GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ_WRITE, (NULL),
            ("Could not connect to server. (%s)", str));
 +#endif
        g_free (str);
        ret = GST_FLOW_ERROR;
      } else {
@@@ -6094,14 -6059,9 +6244,15 @@@ handle_request_failed
  
      gst_rtsp_message_unset (&message);
      if (res != GST_RTSP_EINTR) {
+       gchar *str = gst_rtsp_strresult (res);
 +#ifdef TIZEN_FEATURE_RTSP_MODIFICATION
 +      gst_rtspsrc_post_error_message (src,
 +          GST_RTSPSRC_ERROR_SERVICE_UNAVAILABLE,
 +          "Could not handle server message.");
 +#else
        GST_ELEMENT_ERROR (src, RESOURCE, WRITE, (NULL),
            ("Could not handle server message. (%s)", str));
 +#endif
        g_free (str);
        ret = GST_FLOW_ERROR;
      } else {
@@@ -6657,19 -6582,15 +6815,20 @@@ no_auth_available
    {
      /* Output an error indicating that we couldn't connect because there were
       * no supported authentication protocols */
 +#ifdef TIZEN_FEATURE_RTSP_MODIFICATION
 +    gst_rtspsrc_post_error_message (src, GST_RTSPSRC_ERROR_NOT_AUTHORIZED,
 +        "No supported authentication protocol was found");
 +#else
      GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ, (NULL),
          ("No supported authentication protocol was found"));
 +#endif
      return FALSE;
    }
- no_user_pass:
+ propagate_error:
    {
      /* We don't fire an error message, we just return FALSE and let the
-      * normal NOT_AUTHORIZED error be propagated */
+      * normal error be propagated */
      return FALSE;
    }
  }
@@@ -1,6 -1,6 +1,6 @@@
  project('gst-plugins-good', 'c',
-   version : '1.20.0',
+   version : '1.22.0',
 -  meson_version : '>= 0.62',
 +  meson_version : '>= 0.59',
    default_options : [ 'warning_level=1',
                        'buildtype=debugoptimized' ])
  
@@@ -418,53 -438,6 +438,50 @@@ if host_cpu == 'x86_64
    endif
  endif
  
- # TIZEN_FEATURE_XXX can be generally used for all of modules in this subproject
- cdata.set('TIZEN_FEATURE_FIX_SEG_FAULT', true)
 +# TIZEN_BUILD_OPTION
 +
 +# TIZEN_FEATURE_[MODULE]_XXX should be used for a particular module
 +tbm_dep = dependency('libtbm', required : get_option('tbm'))
 +if tbm_dep.found()
 +  cdata.set('TIZEN_FEATURE_V4L2_TBM_SUPPORT', 1)
 +endif
 +cdata.set('TIZEN_FEATURE_V4L2SRC_AUTO_SCAN_DEVICE_NODE', true)
 +cdata.set('TIZEN_FEATURE_V4L2SRC_SUPPORT_CAMERA_ID', true)
 +cdata.set('TIZEN_FEATURE_V4L2VIDEO_ADJ_RANK', true)
 +cdata.set('TIZEN_FEATURE_WAVPARSE_MODIFICATION', true)
 +cdata.set('TIZEN_FEATURE_MP3PARSE_MODIFICATION', true)
 +cdata.set('TIZEN_FEATURE_AACPARSE_MODIFICATION', true)
 +cdata.set('TIZEN_FEATURE_QTDEMUX_MODIFICATION', true)
 +cdata.set('TIZEN_FEATURE_QTDEMUX_DURATION', true)
 +cdata.set('TIZEN_FEATURE_FLVDEMUX_MODIFICATION', true)
 +cdata.set('TIZEN_FEATURE_RTSP_MODIFICATION', true)
 +cdata.set('TIZEN_FEATURE_SOUP_MODIFICATION', true)
 +cdata.set('TIZEN_FEATURE_RGVOLUME_MODIFICATION', true)
 +cdata.set('TIZEN_FEATURE_DISABLE_V4L2_DEPENDENCY', true)
 +cdata.set('TIZEN_FEATURE_AVIDEMUX_MODIFICATION', true)
 +cdata.set('TIZEN_FEATURE_USE_LIBV4L2', true)
 +cdata.set('TIZEN_FEATURE_V4L2_ADDITIONAL_CID_SUPPORT', true)
 +cdata.set('TIZEN_FEATURE_VPX_MODIFICATION', true)
 +cdata.set('TIZEN_FEATURE_RTP_MODIFICATION', true)
 +cdata.set('TIZEN_FEATURE_PULSE_MODIFICATION', true)
 +cdata.set('TIZEN_FEATURE_V4L2_SKIP_ADD_COLORSPACE', true)
 +cdata.set('TIZEN_FEATURE_GST_MUX_ENHANCEMENT', true)
 +cdata.set('TIZEN_FEATURE_V4L2_DISABLE_COLORIMETRY', true)
 +cdata.set('TIZEN_FEATURE_V4L2_DECODER_DRC_SUPPORT', true)
 +
 +if get_option('tv-profile')
 +  cdata.set('TIZEN_PROFILE_TV', true)
 +  cdata.set('TIZEN_FEATURE_TRUSTZONE', true)
 +endif
 +
 +# TIZEN_GLOBAL_BUILD_OPTION
 +cdata.set('TIZEN_FEATURE_BASEPARSE_MODIFICATION', true)
 +cdata.set('TIZEN_FEATURE_WAYLAND_ENHANCEMENT', true)
 +
 +gio_dep = dependency('gio-2.0')
 +
 +# TIZEN_BUILD_OPTION end
 +
  # Disable compiler warnings for unused variables and args if gst debug system is disabled
  if gst_dep.type_name() == 'internal'
    gst_debug_disabled = not subproject('gstreamer').get_variable('gst_debug')
  #include <gstv4l2bufferpool.h>
  
  #include "gstv4l2object.h"
- #include "gst/gst-i18n-plugin.h"
+ #include <glib/gi18n-lib.h>
  #include <gst/glib-compat-private.h>
 +#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
 +#include <gst/allocators/gsttizenmemory.h>
 +
 +#define TIZEN_BUFFER_DUMP_PATH "/tmp/v4l2_output.raw"
 +#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
  
  GST_DEBUG_CATEGORY_STATIC (v4l2bufferpool_debug);
  GST_DEBUG_CATEGORY_STATIC (CAT_PERFORMANCE);
@@@ -2239,15 -2045,12 +2258,17 @@@ gst_v4l2_buffer_pool_process (GstV4l2Bu
              gst_v4l2_buffer_pool_complete_release_buffer (bpool, tmp, FALSE);
  
              /* Legacy M2M devices return empty buffer when drained */
-             if (GST_V4L2_IS_M2M (obj->device_caps))
+             if (GST_V4L2_IS_M2M (obj->device_caps)) {
+               gst_v4l2_buffer_pool_resize_buffer (bpool, *buf);
                goto eos;
+             }
            }
 -
 +#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
 +          if (pool->obj->tbm_output && pool->obj->mode == GST_V4L2_IO_DMABUF) {
 +            gst_buffer_unref (*buf);
 +            *buf = tmp;
 +          } else {
 +#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
            ret = gst_v4l2_buffer_pool_copy_buffer (pool, *buf, tmp);
  
            /* an queue the buffer again after the copy */
@@@ -2498,16 -2299,18 +2519,22 @@@ gst_v4l2_buffer_pool_copy_at_threshold 
  }
  
  gboolean
- gst_v4l2_buffer_pool_flush (GstBufferPool * bpool)
+ gst_v4l2_buffer_pool_flush (GstV4l2Object * v4l2object)
  {
-   GstV4l2BufferPool *pool = GST_V4L2_BUFFER_POOL (bpool);
+   GstBufferPool *bpool = gst_v4l2_object_get_buffer_pool (v4l2object);
+   GstV4l2BufferPool *pool;
    gboolean ret = TRUE;
  
+   if (!bpool)
+     return FALSE;
+   pool = GST_V4L2_BUFFER_POOL (bpool);
 +#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
 +  gst_v4l2_buffer_pool_streamoff (pool, FALSE);
 +#else
    gst_v4l2_buffer_pool_streamoff (pool);
 +#endif
  
    if (!V4L2_TYPE_IS_OUTPUT (pool->obj->type))
      ret = gst_v4l2_buffer_pool_streamon (pool);
@@@ -72,12 -72,11 +72,17 @@@ enu
  {
    PROP_0,
    V4L2_STD_OBJECT_PROPS,
+   PROP_CROP_TOP,
+   PROP_CROP_LEFT,
+   PROP_CROP_BOTTOM,
+   PROP_CROP_RIGHT,
+   PROP_CROP_BOUNDS,
 +#ifdef TIZEN_FEATURE_V4L2SRC_SUPPORT_CAMERA_ID
 +  PROP_CAMERA_ID,
 +#endif /* TIZEN_FEATURE_V4L2SRC_SUPPORT_CAMERA_ID */
 +#ifdef TIZEN_FEATURE_V4L2SRC_AUTO_SCAN_DEVICE_NODE
 +  PROP_AUTO_SCAN_DEVICE,
 +#endif /* TIZEN_FEATURE_V4L2SRC_AUTO_SCAN_DEVICE_NODE */
    PROP_LAST
  };
  
@@@ -163,37 -162,81 +168,112 @@@ gst_v4l2src_class_init (GstV4l2SrcClas
    gst_v4l2_object_install_properties_helper (gobject_class,
        DEFAULT_PROP_DEVICE);
  
+   /**
+    * GstV4l2Src:crop-top:
+    *
+    * Number of pixels to crop from the top edge of captured video
+    * stream
+    *
+    * Since: 1.22
+    */
+   g_object_class_install_property (gobject_class, PROP_CROP_TOP,
+       g_param_spec_uint ("crop-top", "Crop top",
+           "Pixels to crop at top of video capture input",
+           0, G_MAXUINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+   /**
+    * GstV4l2Src:crop-left:
+    *
+    * Number of pixels to crop from the left edge of captured video
+    * stream
+    *
+    * Since: 1.22
+    */
+   g_object_class_install_property (gobject_class, PROP_CROP_LEFT,
+       g_param_spec_uint ("crop-left", "Crop left",
+           "Pixels to crop at left of video capture input",
+           0, G_MAXUINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+   /**
+    * GstV4l2Src:crop-bottom:
+    *
+    * Number of pixels to crop from the bottom edge of captured video
+    * stream
+    *
+    * Since: 1.22
+    */
+   g_object_class_install_property (gobject_class, PROP_CROP_BOTTOM,
+       g_param_spec_uint ("crop-bottom", "Crop bottom",
+           "Pixels to crop at bottom of video capture input",
+           0, G_MAXUINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+   /**
+    * GstV4l2Src:crop-right:
+    *
+    * Number of pixels to crop from the right edge of captured video
+    * stream
+    *
+    * Since: 1.22
+    */
+   g_object_class_install_property (gobject_class, PROP_CROP_RIGHT,
+       g_param_spec_uint ("crop-right", "Crop right",
+           "Pixels to crop at right of video capture input",
+           0, G_MAXUINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+   /**
+    * GstV4l2Src:crop-bounds:
+    *
+    * Crop bounding region.  All crop regions must lie within this region.
+    * The bounds are represented as a four element array, that descibes the
+    * [x, y, width, height] of the area.
+    *
+    * The size and position of the crop
+    * bounds will only be known, once the v4l2 device is opened and the
+    * input source selected. Applications can connect to the
+    * "notify::crop-bounds" signal to be notified when the bounding region is
+    * updated, and set an appropriate crop region.
+    *
+    * Since: 1.22
+    */
+   g_object_class_install_property (gobject_class, PROP_CROP_BOUNDS,
+       gst_param_spec_array ("crop-bounds", "Crop bounds",
+           "The bounding region for crop rectangles ('<x, y, width, height>').",
+           g_param_spec_int ("rect-value", "Rectangle Value",
+               "One of x, y, width or height value.", G_MININT, G_MAXINT, -1,
+               G_PARAM_READABLE | G_PARAM_STATIC_STRINGS),
+           G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
 +#ifdef TIZEN_FEATURE_V4L2SRC_SUPPORT_CAMERA_ID
 +  /**
 +   * GstV4l2Src:camera-id:
 +   *
 +   * The value which is set by application will be used as a number of device node.
 +   * ex) 1 -> /dev/video1
 +   */
 +  g_object_class_install_property (gobject_class, PROP_CAMERA_ID,
 +      g_param_spec_uint ("camera-id", "Camera ID",
 +          "Camera ID for device node", 0, G_MAXUINT, 0,
 +          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 +#endif /* TIZEN_FEATURE_V4L2SRC_SUPPORT_CAMERA_ID */
 +#ifdef TIZEN_FEATURE_V4L2SRC_AUTO_SCAN_DEVICE_NODE
 +  /**
 +   * GstV4l2Src:auto-scan-device:
 +   */
 +  g_object_class_install_property (gobject_class, PROP_AUTO_SCAN_DEVICE,
 +      g_param_spec_boolean ("auto-scan-device", "Scan device automatically",
 +          "Scan all device nodes automatically until device open success.",
 +          TRUE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 +#endif /* TIZEN_FEATURE_V4L2SRC_AUTO_SCAN_DEVICE_NODE */
 +#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
 +  /**
 +   * GstV4l2Src:tbm-output
 +   */
 +  g_object_class_install_property (gobject_class, PROP_TBM_OUTPUT,
 +      g_param_spec_boolean ("tbm-output", "Enable TBM for output buffer",
 +          "It works for only DMABUF mode.",
 +          FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 +#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
 +
    /**
     * GstV4l2Src::prepare-format:
     * @v4l2src: the v4l2src instance
@@@ -276,28 -316,18 +356,40 @@@ gst_v4l2src_set_property (GObject * obj
    if (!gst_v4l2_object_set_property_helper (v4l2src->v4l2object,
            prop_id, value, pspec)) {
      switch (prop_id) {
+       case PROP_CROP_TOP:
+         v4l2src->crop_top = g_value_get_uint (value);
+         break;
+       case PROP_CROP_LEFT:
+         v4l2src->crop_left = g_value_get_uint (value);
+         break;
+       case PROP_CROP_BOTTOM:
+         v4l2src->crop_bottom = g_value_get_uint (value);
+         break;
+       case PROP_CROP_RIGHT:
+         v4l2src->crop_right = g_value_get_uint (value);
+         break;
 +#ifdef TIZEN_FEATURE_V4L2SRC_SUPPORT_CAMERA_ID
 +      case PROP_CAMERA_ID:
 +        g_free (v4l2src->v4l2object->videodev);
 +
 +        v4l2src->camera_id = g_value_get_uint (value);
 +        v4l2src->v4l2object->videodev = g_strdup_printf ("/dev/video%u", v4l2src->camera_id);
 +
 +        GST_INFO_OBJECT (v4l2src, "videodev [%s]", v4l2src->v4l2object->videodev);
 +        break;
 +#endif /* TIZEN_FEATURE_V4L2SRC_SUPPORT_CAMERA_ID */
 +#ifdef TIZEN_FEATURE_V4L2SRC_AUTO_SCAN_DEVICE_NODE
 +      case PROP_AUTO_SCAN_DEVICE:
 +        v4l2src->v4l2object->auto_scan_device = g_value_get_boolean (value);
 +        GST_INFO_OBJECT (v4l2src, "auto scan device [%d]", v4l2src->v4l2object->auto_scan_device);
 +        break;
 +#endif /* TIZEN_FEATURE_V4L2SRC_AUTO_SCAN_DEVICE_NODE */
 +#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
 +      case PROP_TBM_OUTPUT:
 +        v4l2src->v4l2object->tbm_output = g_value_get_boolean (value);
 +        GST_INFO_OBJECT (v4l2src, "tbm output [%d]", v4l2src->v4l2object->tbm_output);
 +        break;
 +#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
        default:
          G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
          break;
@@@ -314,23 -367,21 +429,38 @@@ gst_v4l2src_get_property (GObject * obj
    if (!gst_v4l2_object_get_property_helper (v4l2src->v4l2object,
            prop_id, value, pspec)) {
      switch (prop_id) {
+       case PROP_CROP_TOP:
+         g_value_set_uint (value, v4l2src->crop_top);
+         break;
+       case PROP_CROP_LEFT:
+         g_value_set_uint (value, v4l2src->crop_left);
+         break;
+       case PROP_CROP_BOTTOM:
+         g_value_set_uint (value, v4l2src->crop_bottom);
+         break;
+       case PROP_CROP_RIGHT:
+         g_value_set_uint (value, v4l2src->crop_right);
+         break;
+       case PROP_CROP_BOUNDS:
+         gst_v4l2src_set_rect_value (value, &v4l2src->crop_bounds);
+         break;
 +#ifdef TIZEN_FEATURE_V4L2SRC_SUPPORT_CAMERA_ID
 +      case PROP_CAMERA_ID:
 +        g_value_set_uint (value, v4l2src->camera_id);
 +        break;
 +#endif /* TIZEN_FEATURE_V4L2SRC_SUPPORT_CAMERA_ID */
 +#ifdef TIZEN_FEATURE_V4L2SRC_AUTO_SCAN_DEVICE_NODE
 +      case PROP_AUTO_SCAN_DEVICE:
 +        GST_INFO_OBJECT (v4l2src, "auto scan device [%d]", v4l2src->v4l2object->auto_scan_device);
 +        g_value_set_boolean (value, v4l2src->v4l2object->auto_scan_device);
 +        break;
 +#endif /* TIZEN_FEATURE_V4L2SRC_AUTO_SCAN_DEVICE_NODE */
 +#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
 +      case PROP_TBM_OUTPUT:
 +        GST_INFO_OBJECT (v4l2src, "tbm output [%d]", v4l2src->v4l2object->tbm_output);
 +        g_value_set_boolean (value, v4l2src->v4l2object->tbm_output);
 +        break;
 +#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
        default:
          G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
          break;
@@@ -396,12 -350,8 +395,11 @@@ gst_v4l2_video_dec_flush (GstVideoDecod
    gst_v4l2_object_unlock_stop (self->v4l2output);
    gst_v4l2_object_unlock_stop (self->v4l2capture);
  
-   if (self->v4l2output->pool)
-     gst_v4l2_buffer_pool_flush (self->v4l2output->pool);
+   gst_v4l2_buffer_pool_flush (self->v4l2output);
  
 +#ifdef TIZEN_FEATURE_V4L2_TBM_SUPPORT
 +  gst_v4l2_video_dec_flush_buffer_event (decoder);
 +#endif /* TIZEN_FEATURE_V4L2_TBM_SUPPORT */
    /* gst_v4l2_buffer_pool_flush() calls streamon the capture pool and must be
     * called after gst_v4l2_object_unlock_stop() stopped flushing the buffer
     * pool. */
@@@ -776,15 -742,21 +790,28 @@@ gst_v4l2_video_dec_loop (GstVideoDecode
        goto beach;
  
      GST_LOG_OBJECT (decoder, "Process output buffer");
-     ret = gst_v4l2_buffer_pool_process (v4l2_pool, &buffer, NULL);
+     {
+       GstV4l2BufferPool *cpool =
+           GST_V4L2_BUFFER_POOL (gst_v4l2_object_get_buffer_pool
+           (self->v4l2capture));
+       ret = gst_v4l2_buffer_pool_process (cpool, &buffer, NULL);
+       if (cpool)
+         gst_object_unref (cpool);
+     }
+     if (ret == GST_V4L2_FLOW_RESOLUTION_CHANGE) {
+       GST_INFO_OBJECT (decoder, "Received resolution change");
+       g_atomic_int_set (&self->capture_configuration_change, TRUE);
+       return;
+     }
    } while (ret == GST_V4L2_FLOW_CORRUPTED_BUFFER);
 +#ifdef TIZEN_FEATURE_V4L2_DECODER_DRC_SUPPORT
 +  if (ret == GST_V4L2_FLOW_RESOLUTION_CHANGE) {
 +    GST_WARNING_OBJECT (decoder, "Received resolution change");
 +    g_atomic_int_set (&self->capture_configuration_change, TRUE);
 +    return;
 +  }
 +#endif
  
    if (ret != GST_FLOW_OK)
      goto beach;
  #include "gstv4l2sink.h"
  #include "gstv4l2videodec.h"
  
- #include "gst/gst-i18n-plugin.h"
+ #include <glib/gi18n-lib.h>
  
 +#ifdef TIZEN_FEATURE_V4L2SRC_AUTO_SCAN_DEVICE_NODE
 +enum {
 +  V4L2_OPEN_ERROR = 0,
 +  V4L2_OPEN_ERROR_STAT_FAILED,
 +  V4L2_OPEN_ERROR_NO_DEVICE,
 +  V4L2_OPEN_ERROR_NOT_OPEN,
 +  V4L2_OPEN_ERROR_NOT_CAPTURE,
 +  V4L2_OPEN_ERROR_NOT_OUTPUT
 +};
 +#endif /* TIZEN_FEATURE_V4L2SRC_AUTO_SCAN_DEVICE_NODE */
 +
  GST_DEBUG_CATEGORY_EXTERN (v4l2_debug);
  #define GST_CAT_DEFAULT v4l2_debug
  
@@@ -16,9 -16,8 +16,8 @@@ if a52_dep.found(
        install : true,
        install_dir : plugins_install_dir,
      )
-     pkgconfig.generate(a52dec, install_dir : plugins_pkgconfig_install_dir)
      plugins += [a52dec]
    elif a52dec_opt.enabled()
 -    error('a52dec plugin enabled but a52.h not found')  
 +    error('a52dec plugin enabled but a52.h not found')
    endif
  endif
@@@ -1,6 -1,6 +1,6 @@@
  project('gst-plugins-ugly', 'c',
-   version : '1.20.0',
+   version : '1.22.0',
 -  meson_version : '>= 0.62',
 +  meson_version : '>= 0.59',
    default_options : [ 'warning_level=1',
                        'buildtype=debugoptimized' ])
  
@@@ -217,8 -217,7 +217,9 @@@ enu
    SIGNAL_UNPREPARED,
    SIGNAL_TARGET_STATE,
    SIGNAL_NEW_STATE,
+   SIGNAL_HANDLE_MESSAGE,
 +  SIGNAL_PREPARING,
 +  SIGNAL_UNPREPARING,
    SIGNAL_LAST
  };
  
@@@ -455,18 -452,23 +456,36 @@@ gst_rtsp_media_class_init (GstRTSPMedia
        G_STRUCT_OFFSET (GstRTSPMediaClass, new_state), NULL, NULL, NULL,
        G_TYPE_NONE, 1, G_TYPE_INT);
  
++
+   /**
+    * GstRTSPMedia::handle-message:
+    * @media: a #GstRTSPMedia
+    * @message: a #GstMessage
+    *
+    * Will be emitted when a message appears on the pipeline bus.
+    *
+    * Returns: a #gboolean indicating if the call was successful or not.
+    *
+    * Since: 1.22
+    */
+   gst_rtsp_media_signals[SIGNAL_HANDLE_MESSAGE] =
+       g_signal_new ("handle-message", G_TYPE_FROM_CLASS (klass),
+       G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED, G_STRUCT_OFFSET (GstRTSPMediaClass,
+           handle_message), NULL, NULL, NULL, G_TYPE_BOOLEAN, 1,
+       GST_TYPE_MESSAGE);
 +  gst_rtsp_media_signals[SIGNAL_PREPARING] =
 +      g_signal_new ("preparing", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
 +      G_STRUCT_OFFSET (GstRTSPMediaClass, preparing), NULL, NULL,
 +      NULL, G_TYPE_NONE, 2, GST_TYPE_RTSP_STREAM,
 +      G_TYPE_UINT);
 +
 +  gst_rtsp_media_signals[SIGNAL_UNPREPARING] =
 +      g_signal_new ("unpreparing", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
 +      G_STRUCT_OFFSET (GstRTSPMediaClass, unpreparing), NULL, NULL,
 +      NULL, G_TYPE_NONE, 2, GST_TYPE_RTSP_STREAM,
 +      G_TYPE_UINT);
 +
    GST_DEBUG_CATEGORY_INIT (rtsp_media_debug, "rtspmedia", 0, "GstRTSPMedia");
  
    klass->handle_message = default_handle_message;
@@@ -1,6 -1,6 +1,6 @@@
  project('gst-rtsp-server', 'c',
-   version : '1.20.0',
+   version : '1.22.0',
 -  meson_version : '>= 0.62',
 +  meson_version : '>= 0.59',
    default_options : ['warning_level=1', 'buildtype=debugoptimized'])
  
  gst_version = meson.project_version()
@@@ -8,12 -8,20 +8,21 @@@ if meson.is_cross_build(
      subdir_done()
  endif
  
+ if static_build
+     if get_option('doc').enabled()
+         error('Documentation enabled but not supported when building statically.')
+     endif
+     message('Building statically, can\'t build the documentation')
+     subdir_done()
+ endif
  hotdoc_plugin_scanner = executable('gst-hotdoc-plugins-scanner',
    'gst-hotdoc-plugins-scanner.c',
 +  pie : true,
    c_args : gst_c_args,
    include_directories : [configinc],
-   dependencies : [gobject_dep, gmodule_dep, glib_dep, gio_dep, gst_dep],
+   dependencies : [gst_dep, gmodule_dep, gio_dep],
    install_dir : helpers_install_dir,
    link_with: [printf_lib],
    install: true,
Simple merge
@@@ -1331,12 -1553,10 +1563,12 @@@ gst_debug_log_default (GstDebugCategor
  {
    gint pid;
    GstClockTime elapsed;
-   gchar *obj = NULL;
+   const gchar *object_id;
    GstDebugColorMode color_mode;
    const gchar *message_str;
 +#if defined(G_OS_WIN32) || !defined(TIZEN_DLOG)
    FILE *log_file = user_data ? user_data : stderr;
 +#endif
  #ifdef G_OS_WIN32
  #define FPRINTF_DEBUG _gst_debug_fprintf
  /* _gst_debug_fprintf will do fflush if it's required */
        g_sprintf (pidcolor, "\033[%02dm", pid % 6 + 31);
        levelcolor = levelcolormap[level];
  
- #define PRINT_FMT " %s"PID_FMT"%s "PTR_FMT" %s%s%s %s"CAT_FMT"%s %s\n"
 +#if defined(TIZEN_DLOG)
-     GST_SLOGW("%" GST_TIME_FORMAT "%s "PTR_FMT" %s%s%s %s"CAT_FMT"%s %s\n", GST_TIME_ARGS (elapsed),
-         clear, g_thread_self (), levelcolor,
-         gst_debug_level_get_name (level), clear, color,
-         gst_debug_category_get_name (category), file, line, function, obj,
-         clear, message_str);
- #else
-       FPRINTF_DEBUG (log_file, "%" GST_TIME_FORMAT PRINT_FMT,
-           GST_TIME_ARGS (elapsed), pidcolor, pid, clear, g_thread_self (),
-           levelcolor, gst_debug_level_get_name (level), clear, color,
-           gst_debug_category_get_name (category), file, line, function, obj,
++      GST_SLOGW("%" GST_TIME_FORMAT "%s "PTR_FMT" %s%s%s %s"CAT_FMT"%s %s\n", GST_TIME_ARGS (elapsed),
++          clear, g_thread_self (), levelcolor,
++          gst_debug_level_get_name (level), clear, color,
++          gst_debug_category_get_name (category), file, line, function, object_id,
 +          clear, message_str);
++#else
+       if (object_id) {
+ #define PRINT_FMT_ID " %s"PID_FMT"%s "PTR_FMT" %s%s%s %s"CAT_FMT_ID"%s %s\n"
+         FPRINTF_DEBUG (log_file, "%" GST_TIME_FORMAT PRINT_FMT_ID,
+             GST_TIME_ARGS (elapsed), pidcolor, pid, clear, g_thread_self (),
+             levelcolor, gst_debug_level_get_name (level), clear, color,
+             gst_debug_category_get_name (category), file, line, function,
+             object_id, clear, message_str);
+       } else {
+ #define PRINT_FMT " %s"PID_FMT"%s "PTR_FMT" %s%s%s %s"CAT_FMT"%s %s\n"
+         FPRINTF_DEBUG (log_file, "%" GST_TIME_FORMAT PRINT_FMT,
+             GST_TIME_ARGS (elapsed), pidcolor, pid, clear, g_thread_self (),
+             levelcolor, gst_debug_level_get_name (level), clear, color,
+             gst_debug_category_get_name (category), file, line, function, "",
+             clear, message_str);
+       }
        FFLUSH_DEBUG (log_file);
- #endif
  #undef PRINT_FMT
-       g_free (color);
+ #undef PRINT_FMT_ID
++#endif
  #ifdef G_OS_WIN32
      } else {
        /* colors, windows. */
  #endif
    } else {
      /* no color, all platforms */
-         gst_debug_category_get_name (category), file, line, function, obj,
 +#if defined(TIZEN_DLOG) && !defined(G_OS_WIN32)
 +    GST_SLOGW("%" GST_TIME_FORMAT " "PTR_FMT" %s "CAT_FMT" %s\n", GST_TIME_ARGS (elapsed),
 +        g_thread_self (), gst_debug_level_get_name (level),
-     FPRINTF_DEBUG (log_file, "%" GST_TIME_FORMAT NOCOLOR_PRINT_FMT,
-         GST_TIME_ARGS (elapsed), pid, g_thread_self (),
-         gst_debug_level_get_name (level),
-         gst_debug_category_get_name (category), file, line, function, obj,
-         message_str);
++        gst_debug_category_get_name (category), file, line, function, object_id,
 +        message_str);
 +#else
+     if (object_id) {
+       FPRINTF_DEBUG (log_file, "%" GST_TIME_FORMAT NOCOLOR_PRINT_FMT_ID,
+           GST_TIME_ARGS (elapsed), pid, g_thread_self (),
+           gst_debug_level_get_name (level),
+           gst_debug_category_get_name (category), file, line, function,
+           object_id, message_str);
+     } else {
+       FPRINTF_DEBUG (log_file, "%" GST_TIME_FORMAT NOCOLOR_PRINT_FMT,
+           GST_TIME_ARGS (elapsed), pid, g_thread_self (),
+           gst_debug_level_get_name (level),
+           gst_debug_category_get_name (category), file, line, function, "",
+           message_str);
+     }
      FFLUSH_DEBUG (log_file);
 +#endif
    }
-   if (object != NULL)
-     g_free (obj);
  }
  
  /**
Simple merge
Simple merge
Simple merge
@@@ -231,12 -231,9 +231,14 @@@ typedef enum _GstQuarkI
    GST_QUARK_PLUGIN_API = 200,
    GST_QUARK_PLUGIN_API_FLAGS = 201,
    GST_QUARK_GAP_FLAGS = 202,
-   GST_QUARK_MAX = 203
+   GST_QUARK_QUERY_SELECTABLE = 203,
+   GST_QUARK_SELECTABLE = 204,
 +#ifndef TIZEN_PROFILE_TV
-   GST_QUARK_QUERY_RESOURCE = 203,
-   GST_QUARK_MAX = 204
+   GST_QUARK_MAX = 205
 +#else
++  GST_QUARK_QUERY_RESOURCE = 205,
++  GST_QUARK_MAX = 206
 +#endif
  } GstQuarkId;
  
  extern GQuark _priv_gst_quark_table[GST_QUARK_MAX];
Simple merge
@@@ -126,9 -127,15 +127,17 @@@ typedef enum 
    GST_QUERY_DRAIN        = GST_QUERY_MAKE_TYPE (180, _FLAG(DOWNSTREAM) | _FLAG(SERIALIZED)),
    GST_QUERY_CONTEXT      = GST_QUERY_MAKE_TYPE (190, _FLAG(BOTH)),
    GST_QUERY_BITRATE      = GST_QUERY_MAKE_TYPE (200, _FLAG(DOWNSTREAM)),
 -
 +#ifdef TIZEN_PROFILE_TV
 +  GST_QUERY_RESOURCE     = GST_QUERY_MAKE_TYPE (210, _FLAG (BOTH)), /*< skip >*/
 +#endif
+   /**
+    * GST_QUERY_SELECTABLE:
+    *
+    * Query stream selection capability.
+    *
+    * Since: 1.22
+    */
+   GST_QUERY_SELECTABLE   = GST_QUERY_MAKE_TYPE (210, _FLAG(BOTH)),
  } GstQueryType;
  #undef _FLAG
  
  #include "gstparse.h"
  #include "gstvalue.h"
  #include "gstquark.h"
- #include "gst-i18n-lib.h"
+ #include <glib/gi18n-lib.h>
  #include "glib-compat-private.h"
  #include <math.h>
 +#ifdef TIZEN_PROFILE_TV
 +#include "gstchildproxy.h"
 +#endif
  
  
  static void
Simple merge
@@@ -1820,16 -1805,10 +1829,13 @@@ gst_base_parse_convert_default (GstBase
      if (dest_format == GST_FORMAT_TIME) {
        /* BYTES -> TIME conversion */
        GST_DEBUG_OBJECT (parse, "converting bytes -> time");
 +#ifdef TIZEN_FEATURE_BASEPARSE_MODIFICATION
 +      src_value = src_value - parse->priv->remove_from_total;
 +#endif
        *dest_value = gst_util_uint64_scale (src_value, duration, bytes);
- #ifdef TIZEN_FEATURE_BASEPARSE_MODIFICATION
-       *dest_value /= GST_USECOND;
- #endif
-       *dest_value *= GST_MSECOND;
-       GST_DEBUG_OBJECT (parse, "conversion result: %" G_GINT64_FORMAT " ms",
-           *dest_value / GST_MSECOND);
+       GST_DEBUG_OBJECT (parse,
+           "converted %" G_GINT64_FORMAT " bytes to %" GST_TIME_FORMAT,
+           src_value, GST_TIME_ARGS (*dest_value));
        ret = TRUE;
      } else {
        GST_DEBUG_OBJECT (parse, "converting bytes -> other not implemented");
@@@ -48,14 -46,9 +48,14 @@@ gst_base = library('gstbase-@0@'.format
    darwin_versions : osxversion,
    install : true,
    include_directories : [configinc, libsinc],
-   dependencies : [gobject_dep, glib_dep, gst_dep],
+   dependencies : [gst_dep],
  )
  
 +extra_defs += ['-DTIZEN_FEATURE_BASEPARSE_MODIFICATION']
 +if get_option('tv-profile')
 +  extra_defs += ['-DTIZEN_PROFILE_TV', '-DTIZEN_FEATURE_TRUSTZONE']
 +endif
 +
  library_def = {'lib': gst_base}
  pkg_name = 'gstreamer-base-1.0'
  gst_base_gen_sources = []
@@@ -1,9 -1,8 +1,9 @@@
- executable('gst-plugin-scanner',
+ exe = executable('gst-plugin-scanner',
    'gst-plugin-scanner.c',
 +  pie : true,
    c_args : gst_c_args,
    include_directories : [configinc],
-   dependencies : [gobject_dep, gmodule_dep, glib_dep, mathlib, gst_dep],
+   dependencies : [gst_dep, mathlib, gmodule_dep,],
    install_dir : helpers_install_dir,
    install: true,
  )
@@@ -110,11 -112,10 +113,11 @@@ if have_pt
      error('Unexpected ptp helper permissions value: ' + with_ptp_helper_permissions)
    endif
  
-   executable('gst-ptp-helper', 'gst-ptp-helper.c',
+   exe = executable('gst-ptp-helper', 'gst-ptp-helper.c',
 +    pie : true,
      c_args : gst_c_args,
      include_directories : [configinc, libsinc],
-     dependencies : [gio_dep, gobject_dep, glib_dep, mathlib, gst_dep, cap_dep],
+     dependencies : [gst_dep, gio_dep, mathlib, cap_dep],
      install_dir : helpers_install_dir,
      install : true)
  
@@@ -1,6 -1,6 +1,6 @@@
  project('gstreamer', 'c',
-   version : '1.20.0',
+   version : '1.22.0',
 -  meson_version : '>= 0.62',
 +  meson_version : '>= 0.59',
    default_options : [ 'warning_level=1',
                        'buildtype=debugoptimized' ])
  
@@@ -26,15 -30,26 +30,27 @@@ foreach tool : tool
      extra_c_args += extra_launch_arg
    endif
  
-   executable(exe_name,
-     src_file,
-     pie : true,
-     install: true,
-     include_directories : [configinc],
-     dependencies : [glib_dep, gobject_dep, gmodule_dep, mathlib, gst_dep] + extra_deps,
-     c_args: gst_c_args + extra_c_args + ['-DG_LOG_DOMAIN="@0@"'.format(exe_name)],
-   )
-   man_page = '@0@-1.0.1'.format(tool)
-   install_man(man_page)
+   man_page = files('@0@-1.0.1'.format(tool))
+   if not get_option('tools').disabled()
+     executable(exe_name,
+       src_file,
++      pie : true,
+       install: true,
+       install_tag: 'bin',
+       include_directories : [configinc],
+       dependencies : [glib_dep, gobject_dep, gmodule_dep, mathlib, gst_dep] + extra_deps,
+       c_args: gst_c_args + extra_c_args + ['-DG_LOG_DOMAIN="@0@"'.format(exe_name)],
+     )
+     install_man(man_page)
+   endif
+   gst_tools += {tool:
+     {
+       'files': files(src_file),
+       'deps': [glib_dep, gobject_dep, gmodule_dep, mathlib, gst_dep] + extra_deps,
+       'extra_c_args': extra_c_args,
+       'man_page': man_page,
+     }
+   }
  endforeach