Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package gstreamer.16413 for
openSUSE:Leap:15.2:Update checked in at 2021-06-01 17:52:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2:Update/gstreamer.16413 (Old)
and /work/SRC/openSUSE:Leap:15.2:Update/.gstreamer.16413.new.1898 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gstreamer.16413"
Tue Jun 1 17:52:20 2021 rev:1 rq:896678 version:1.16.3
Changes:
--------
New Changes file:
--- /dev/null 2021-05-27 11:03:55.685848939 +0200
+++
/work/SRC/openSUSE:Leap:15.2:Update/.gstreamer.16413.new.1898/gstreamer.changes
2021-06-01 17:52:20.662084181 +0200
@@ -0,0 +1,2820 @@
+-------------------------------------------------------------------
+Wed May 19 09:37:15 UTC 2021 - Jia Zhaocong <[email protected]>
+
+- Update to version 1.16.3 (bsc#1181255):
+ - delay creation of threadpools
+ - bin: Fix `deep-element-removed` log message
+ - buffer: fix meta sequence number fallback on rpi
+ - bufferlist: foreach: always remove as parent if buffer is changed
+ - bus: Make setting/replacing/clearing the sync handler thread-safe
+ - elementfactory: Fix missing features in case a feature moves to another
filename
+ - element: When removing a ghost pad also unset its target
+ - meta: intern registered impl string
+ - registry: Use a toolchain-specific registry file on Windows
+ - systemclock: Invalid internal time calculation causes non-increasing clock
time on Windows
+ - value: don't write to `const char *`
+ - value: Fix segfault comparing empty GValueArrays
+ - Revert floating enforcing
+ - aggregator: fix iteration direction in skip_buffers
+ - sparsefile: fix possible crash when seeking
+ - baseparse: cache fix
+ - baseparse: fix memory leak when subclass skips whole input buffer
+ - baseparse: Set the private duration before posting a duration-changed
message
+ - basetransform: allow not passthrough if generate_output is implemented
+ - identity: Fix a minor leak using meta_str
+ - queue: protect against lost wakeups for iterm_del condition
+ - queue2: Avoid races when posting buffering messages
+ - queue2: Fix missing/dropped buffering messages at startup
+ - identity: Unblock condition variable on FLUSH_START
+ - check: Use `g_thread_yield()` instead of `g_usleep(1)`
+ - tests: use cpu_family for arch checks
+ - gst-launch: Follow up to missing `s/g_print/gst_print/g`
+ - gst-inspect: Add define guard for `g_log_writer_supports_color()`
+ - gst-launch: go back down to `GST_STATE_NULL` in one step.
+ - device-monitor: list hidden providers before listing devices
+ - autotools build fixes for GNU make 4.3
+
+-------------------------------------------------------------------
+Wed Dec 4 10:20:33 UTC 2019 - Bj??rn Lie <[email protected]>
+
+- Update to version 1.16.2:
+ + Interlaced video scaling fixes
+ + CineForm video support in AVI
+ + audioresample: avoid glitches due to rounding errors after
+ changing rate
+ + Command line tool output printing improvements on Windows
+ + various performance improvements, memory leak fixes and
+ security fixes
+ + VP9 decoding fixes
+ + wasapi: bug fixes and stability improvements
+ + tsdemux: improved handling of certain discontinuities
+ + vaapi h265 decoder: wait for I-frame before trying to decode
+ + tee: Make sure to actually deactivate pads that are released
+ + bin: Drop need-context messages without source instead of
+ crashing
+ + gst: Don't pass miniobjects to GST_DEBUG_OBJECT() and similar
+ macros
+ + tracers: Don't leak temporary GstStructure
+
+-------------------------------------------------------------------
+Tue Sep 24 07:29:25 UTC 2019 - Bj??rn Lie <[email protected]>
+
+- Update to version 1.16.1:
+ + GStreamer-vaapi: fix green frames and decoding artefacts in
+ some cases.
+ + OpenGL: fix wayland event source burning CPU in certain
+ circumstances.
+ + Memory leak fixes and memory footprint improvements.
+ + Performance improvements.
+ + Stability and security fixes.
+ + Fix enum for GST_MESSAGE_DEVICE_CHANGED which is technically an
+ API break, but this is only used internally in GStreamer and
+ duplicated another message enum.
+ + hls: Make crypto dependency optional when hls-crypto is auto.
+ + player: fix switching back and forth between forward and
+ reverse playback.
+ + decklinkaudiosink: Drop late buffers.
+ + openh264enc: Fix compilation with openh264 v2.0.
+ + wasapisrc: fix segtotal value being always 2.
+
+-------------------------------------------------------------------
+Wed Jul 10 13:16:43 UTC 2019 - Dominique Leuenberger <[email protected]>
+
+- Fix meson script using sed: since we rename gst-plugin-helper for
+ multi arch purpose, we also need to fix meson.build to make the
+ code look for the correct name (boo#1140998).
+
+-------------------------------------------------------------------
+Mon Jul 1 09:45:51 UTC 2019 - Andreas Schwab <[email protected]>
+
+- Use libunwind only if available
+
+-------------------------------------------------------------------
+Wed Jun 12 20:08:46 UTC 2019 - [email protected]
+
+- Update to version 1.16.0:
+ + Highlights
+ - GStreamer WebRTC stack gained support for data channels for
+ peer-to-peer communication based on SCTP, BUNDLE support,
+ as well as support for multiple TURN servers.
+ - AV1 video codec support for Matroska and QuickTime/MP4
+ containers and more configuration options and supported
+ input formats for the AOMedia AV1 encoder
+ - Support for Closed Captions and other Ancillary Data in video
+ - Support for planar (non-interleaved) raw audio
+ - GstVideoAggregator, compositor and OpenGL mixer elements are
+ now in -base
+ - New alternate fields interlace mode where each buffer carries
+ a single field
+ - WebM and Matroska ContentEncryption support in the Matroska
+ demuxer
+ - new WebKit WPE-based web browser source element
+ - Video4Linux: HEVC encoding and decoding, JPEG encoding, and
+ improved dmabuf import/export
+ - Hardware-accelerated Nvidia video decoder gained support for
+ VP8/VP9 decoding, whilst the encoder gained support for
+ H.265/HEVC encoding.
+ - Many improvements to the Intel Media SDK based
+ hardware-accelerated video decoder and encoder plugin
+ (msdk): dmabuf import/export for zero-copy integration with
+ other components; VP9 decoding; 10-bit HEVC encoding; video
+ post-processing (vpp) support including deinterlacing; and
+ the video decoder now handles dynamic resolution changes.
+ - The ASS/SSA subtitle overlay renderer can now handle multiple
+ subtitles that overlap in time and will show them on screen
+ simultaneously
+ - The Meson build is now feature-complete (*) and it is now the
+ recommended build system on all platforms. The Autotools
+ build is scheduled to be removed in the next cycle.
+ - The GStreamer Rust bindings and Rust plugins module are now
+ officially part of upstream GStreamer.
+ - The GStreamer Editing Services gained a gesdemux element
+ that allows directly playing back serialized edit list with
+ playbin or (uri)decodebin
+ - Many performance improvements
+- Switch to meson on Tumbleweed.
+- Rebase gstreamer-rpm-prov.patch.
+- Require libdw. Helps with generating backtraces.
+- Place gdb autoload files in -devel package.
+- Add gstreamer-pie.patch to generate position-independent
+ executables. Previously done through CFLAGS/LDFLAGS, but this
+ makes ninja pass -pie when linking libraries as well, causing
+ the link to fail.
+- Now requires glib2 >= 2.40.0.
+
+-------------------------------------------------------------------
+Fri May 31 21:23:20 UTC 2019 - Bj??rn Lie <[email protected]>
+
+- Update to version 1.14.5:
+ + aggregator:
+ - Take the pad lock around queue gap event removal.
+ - Don???t leak gap buffer when out of segment.
+ + buffer: fix possible memory corruption in
+ gst_buffer_foreach_meta() when removing metas.
+ + bus:
+ - Make removing of signal/bus watches thread-safe.
+ - Don???t allow removing signal watches with
+ gst_bus_remove_watch().
+ + controlbinding: Check if the weak pointer was cleared before
+ explicitly removing it.
+ + ptp clock: Wait for ANNOUNCE before selecting a master;
+ increase tolerance for late follow-up and delay-resp.
+ + segment: Allow stop == -1 in gst_segment_to_running_time() and
+ negative rate.
+ + g-i: annotations fixes.
+
+-------------------------------------------------------------------
+Wed Oct 03 00:54:38 UTC 2018 - [email protected]
+
+- Update to version 1.14.4:
+ + glviewconvert: wait and set the gl sync meta on buffers.
+ + glviewconvert: copy composition meta from the primary buffer to
+ both outputs.
+ + glcolorconvert: don't copy overlay composition meta over to
+ NULL outbufs.
+ + matroskademux: add functionality needed for MSE use case fixing
+ youtube playback in epiphany/webkit-gtk.
+ + tagdemux: Use upstream GST_EVENT_STREAM_START (and stream-id)
+ if present.
+ + vorbisdec: fix header handling regression: init decoder
+ immediately once we have headers.
+ + wasapisink: recover from low buffer levels in shared mode.
+ + fix GstSegment unit test which would fail on some 32-bit x86
+ CPUs.
+
+-------------------------------------------------------------------
+Wed Sep 26 20:18:24 UTC 2018 - [email protected]
+
+- Update to version 1.14.3:
+ + opusenc: fix crash on 32-bit platforms.
+ + compositor: fix major buffer leak when doing crossfading on
+ some but not all pads.
+ + wasapi: various fixes for wasapisrc and wasapisink regressions.
+ + x264enc: Set bit depth to fix "This build of x264 requires
+ 8-bit depth. Rebuild to..." runtime errors with x264 version
+ ??? 153.
+ + audioaggregator, audiomixer: caps negotiation fixes.
+ + input-selector: latency handling fixes.
++++ 2623 more lines (skipped)
++++ between /dev/null
++++ and
/work/SRC/openSUSE:Leap:15.2:Update/.gstreamer.16413.new.1898/gstreamer.changes
New:
----
baselibs.conf
gstreamer-1.16.3.tar.xz
gstreamer-pie.patch
gstreamer-rpm-prov.patch
gstreamer.changes
gstreamer.macros
gstreamer.prov
gstreamer.spec
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ gstreamer.spec ++++++
#
# spec file for package gstreamer
#
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%if 0%{?suse_version} > 1500
%define use_meson 1
%else
%define use_meson 0
%endif
%define gst_branch 1.0
Name: gstreamer
Version: 1.16.3
Release: 0
Summary: Streaming-Media Framework Runtime
License: LGPL-2.1-or-later
Group: Productivity/Multimedia/Other
URL: http://gstreamer.freedesktop.org/
Source0:
https://gstreamer.freedesktop.org/src/gstreamer/%{name}-%{version}.tar.xz
Source1: gstreamer.macros
Source2: gstreamer.prov
Source99: baselibs.conf
# PATCH-FEATURE-UPSTREAM gstreamer-rpm-prov.patch bgo#588784
[email protected] -- Add --rpm parameter to allow creation of rpm provides,
patch from fedora
Patch1: gstreamer-rpm-prov.patch
# PATCH-FIX-OPENSUSE gstreamer-pie.patch [email protected] -- create
position-independent executables.
Patch2: gstreamer-pie.patch
BuildRequires: bison >= 2.4
BuildRequires: check-devel
BuildRequires: fdupes
BuildRequires: flex >= 2.5.31
BuildRequires: gnome-patch-translation
BuildRequires: gobject-introspection-devel >= 1.31.1
BuildRequires: gtk-doc >= 1.12
BuildRequires: libcap-devel
BuildRequires: libcap-progs
%if %{use_meson}
BuildRequires: meson >= 0.47.0
%else
BuildRequires: libtool
%endif
BuildRequires: pkgconfig
BuildRequires: python3-base
BuildRequires: python3-xml
BuildRequires: translation-update-upstream
BuildRequires: pkgconfig(bash-completion) >= 2.0
BuildRequires: pkgconfig(gio-2.0)
BuildRequires: pkgconfig(gio-unix-2.0)
BuildRequires: pkgconfig(glib-2.0) >= 2.40.0
BuildRequires: pkgconfig(gmodule-2.0)
BuildRequires: pkgconfig(gobject-2.0)
BuildRequires: pkgconfig(libdw)
%define libunwind_archs %{ix86} ia64 x86_64 %{arm} ppc ppc64 ppc64le aarch64
%ifarch %{libunwind_archs}
BuildRequires: pkgconfig(libunwind)
%endif
# Ensure that the documentation corresponds with the installed version:
Requires: libgstreamer-1_0-0 = %{version}
# Core modules may depend on new enough libraries:
Requires: libgstreamer-1_0-0 >= %{version}
Requires(pre): permissions
Recommends: %{name}-lang = %{version}
# Generic name, never used in SuSE:
Provides: gstreamer-doc = %{version}
%description
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 libgstreamer-1_0-0
Summary: Streaming-Media Framework Runtime
# We want to have core modules installed:
Group: System/Libraries
Requires: %{name}
%description -n libgstreamer-1_0-0
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 typelib-1_0-Gst-1_0
Summary: Streaming-Media Framework Runtime -- Introspection bindings
Group: System/Libraries
%description -n typelib-1_0-Gst-1_0
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.
This package provides the GObject Introspection bindings for GStreamer.
%package doc
Summary: GStreamer Streaming-Media Framework Plug-Ins
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
%description doc
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.
%package utils
Summary: Streaming-Media Framework Runtime
# Generic name, never used in SuSE:
Group: Productivity/Multimedia/Other
Provides: gstreamer:%{_bindir}/gst-launch-%{gst_branch} = %{version}
# Symbol for unversioned wrappers:
Provides: gstreamer-utils_versioned = %{version}
%description 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 devel
Summary: Include Files and Libraries mandatory for Development
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
# gstreamer-utils is required for the gstreamer-provides rpm magic.
Requires: gstreamer-utils = %{version}
Requires: libgstreamer-1_0-0 = %{version}
Requires: typelib-1_0-Gst-1_0 = %{version}
%description devel
This package contains all necessary include files and libraries needed
to develop applications that require these.
%lang_package
%prep
%setup -q -n gstreamer-%{version}
translation-update-upstream po gstreamer-%{gst_branch}
gnome-patch-translation-prepare po gstreamer-%{gst_branch}
# The order matters. Only run gnome-patch-translation-update after patching!
%patch1 -p1
%patch2 -p1
gnome-patch-translation-update po gstreamer-%{gst_branch}
%build
export PYTHON=%{_bindir}/python3
%if %{use_meson}
sed -i
"s/^executable('gst-plugin-scanner',/executable('gst-plugin-scanner-%{_target_cpu}',/"
libs/gst/helpers/meson.build
sed -i "s/gst-plugin-scanner/gst-plugin-scanner-%{_target_cpu}/" meson.build
# TODO: enable dbghelp
%{meson} \
-Dptp-helper-permissions=capabilities \
-Dpackage-name='openSUSE GStreamer package' \
-Dpackage-origin='http://download.opensuse.org' \
-Dgtk_doc=enabled \
-Dintrospection=enabled \
-Dbenchmarks=disabled \
-Dexamples=disabled \
-Dtests=disabled \
-Ddbghelp=disabled \
%ifnarch %{libunwind_archs}
-Dlibunwind=disabled \
%endif
%{nil}
%{meson_build}
%else
export CFLAGS="%{optflags} -fPIE"
export LDFLAGS="-pie"
%configure \
--with-ptp-helper-permissions=capabilities \
--with-package-name='openSUSE GStreamer package' \
--with-package-origin='http://download.opensuse.org' \
--enable-gtk-doc \
--enable-introspection \
--disable-benchmarks \
--disable-examples \
--disable-static \
--disable-tests \
--program-transform-name='s/gst-plugin-scanner/gst-plugin-scanner-%{_target_cpu}/'
\
%{nil}
%make_build
%endif
%install
%if %{use_meson}
%{meson_install}
%else
%make_install
%endif
%find_lang %{name}-%{gst_branch}
find %{buildroot} -type f -name "*.la" -delete -print
mkdir -p %{buildroot}%{_datadir}/gstreamer-%{gst_branch}/presets
# Install the rpm macros
install -m644 -D %{SOURCE1}
%{buildroot}%{_libexecdir}/rpm/fileattrs/gstreamer.attr
install -m755 -D %{SOURCE2} %{buildroot}%{_libexecdir}/rpm/gstreamer-provides
%fdupes %{buildroot}%{_datadir}/gtk-doc
%verifyscript
%verify_permissions -e %{_libexecdir}/gstreamer-%{gst_branch}/gst-ptp-helper
%post
%set_permissions %{_libexecdir}/gstreamer-%{gst_branch}/gst-ptp-helper
%post -n libgstreamer-1_0-0 -p /sbin/ldconfig
%postun -n libgstreamer-1_0-0 -p /sbin/ldconfig
%files
%license COPYING
%dir %{_datadir}/gstreamer-%{gst_branch}
%dir %{_datadir}/gstreamer-%{gst_branch}/presets
%dir %{_libdir}/gstreamer-%{gst_branch}
%{_libdir}/gstreamer-%{gst_branch}/libgstcoreelements.so
%{_libdir}/gstreamer-%{gst_branch}/libgstcoretracers.so
%dir %{_libexecdir}/gstreamer-%{gst_branch}
%{_libexecdir}/gstreamer-%{gst_branch}/gst-completion-helper
%{_libexecdir}/gstreamer-%{gst_branch}/gst-plugin-scanner-%{_target_cpu}
%verify(not mode caps) %{_libexecdir}/gstreamer-%{gst_branch}/gst-ptp-helper
%{_datadir}/bash-completion/completions/
%{_datadir}/bash-completion/helpers/
%files -n libgstreamer-1_0-0
%{_libdir}/*.so.*
%files -n typelib-1_0-Gst-1_0
%{_libdir}/girepository-1.0/Gst-1.0.typelib
%{_libdir}/girepository-1.0/GstBase-1.0.typelib
%{_libdir}/girepository-1.0/GstCheck-1.0.typelib
%{_libdir}/girepository-1.0/GstController-1.0.typelib
%{_libdir}/girepository-1.0/GstNet-1.0.typelib
%files utils
%{_bindir}/*-%{gst_branch}
%{_mandir}/man?/*-%{gst_branch}*%{ext_man}
%files devel
%{_datadir}/aclocal/*.m4
# Own these directories to avoid build requirement on gdb
# only for directories ownership
%dir %{_datadir}/gdb
%dir %{_datadir}/gdb/auto-load
%dir %{_datadir}/gdb/auto-load%{_prefix}
%dir %{_datadir}/gdb/auto-load%{_libdir}
%{_datadir}/gdb/auto-load%{_libdir}/lib%{name}*.py
%dir %{_datadir}/gstreamer-%{gst_branch}/gdb
%{_datadir}/gstreamer-%{gst_branch}/gdb/glib_gobject_helper.py
%{_datadir}/gstreamer-%{gst_branch}/gdb/gst_gdb.py
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%{_libexecdir}/rpm/gstreamer-provides
%{_libexecdir}/rpm/fileattrs/gstreamer.attr
%{_datadir}/gir-1.0/*.gir
%files doc
%doc AUTHORS ChangeLog NEWS README RELEASE
%{_datadir}/gtk-doc/html/*
%files lang -f %{name}-%{gst_branch}.lang
%changelog
++++++ baselibs.conf ++++++
gstreamer
+/usr/lib/gstreamer-.*/gst-plugin-scanner-.*
libgstreamer-1_0-0
requires "gstreamer-<targettype>"
++++++ gstreamer-pie.patch ++++++
diff -urp gstreamer-1.16.0.orig/libs/gst/helpers/meson.build
gstreamer-1.16.0/libs/gst/helpers/meson.build
--- gstreamer-1.16.0.orig/libs/gst/helpers/meson.build 2019-01-26
19:10:08.000000000 -0600
+++ gstreamer-1.16.0/libs/gst/helpers/meson.build 2019-06-12
15:06:33.120486636 -0500
@@ -5,6 +5,7 @@ executable('gst-plugin-scanner',
dependencies : [gobject_dep, gmodule_dep, glib_dep, mathlib, gst_dep],
install_dir : helpers_install_dir,
install: true,
+ pie: true,
)
# Used in test env setup to make tests find plugin scanner in build tree
@@ -18,6 +19,7 @@ if bashcomp_found
dependencies : [gobject_dep, glib_dep, gst_dep],
install_dir : helpers_install_dir,
install: true,
+ pie: true,
)
endif
@@ -118,7 +120,8 @@ if have_ptp
include_directories : [configinc, libsinc],
dependencies : [gio_dep, gobject_dep, glib_dep, mathlib, gst_dep, cap_dep],
install_dir : helpers_install_dir,
- install : true)
+ install : true,
+ pie : true)
meson.add_install_script('ptp_helper_post_install.sh',
helpers_install_dir, with_ptp_helper_permissions,
++++++ gstreamer-rpm-prov.patch ++++++
diff -urp gstreamer-1.16.0.orig/tools/gst-inspect.c
gstreamer-1.16.0/tools/gst-inspect.c
--- gstreamer-1.16.0.orig/tools/gst-inspect.c 2019-04-11 17:58:09.000000000
-0500
+++ gstreamer-1.16.0/tools/gst-inspect.c 2019-06-12 09:28:27.004257869
-0500
@@ -1730,7 +1730,224 @@ print_tracer_info (GstPluginFeature * fe
* is meant for machines, not humans.
*/
static void
-print_plugin_automatic_install_info_codecs (GstElementFactory * factory)
+print_gst_structure_append_field (GList * strings, const char *field)
+{
+ GList *s;
+
+ //g_message ("adding '%s' to the string", field);
+
+ for (s = strings; s != NULL; s = s->next) {
+ g_string_append (s->data, field);
+ }
+}
+
+static void
+print_gst_structure_append_field_index (GList * strings, const char *field,
+ guint num_items, guint offset)
+{
+ GList *s;
+ guint i;
+
+ //g_message ("adding '%s' to the string (num: %d offset: %d)", field,
num_items, offset);
+
+ for (s = strings, i = 0; s != NULL; s = s->next, i++) {
+ if (i == offset) {
+ //g_message ("adding '%s' at '%d'", field, i);
+ g_string_append (s->data, field);
+ }
+ if (i == num_items)
+ i = 0;
+ }
+
+}
+
+static GList *
+print_gst_structure_dup_fields (GList * strings, guint num_items)
+{
+ guint new_items, i;
+
+ if (num_items == 1)
+ return strings;
+
+ //g_message ("creating %d new items", num_items);
+
+ new_items = g_list_length (strings) * (num_items - 1);
+ for (i = 0; i < new_items; i++) {
+ GString *s, *first;
+
+ first = strings->data;
+ s = g_string_new_len (first->str, first->len);
+ strings = g_list_prepend (strings, s);
+ }
+
+ return strings;
+}
+
+enum
+{
+ FIELD_VERSION = 0,
+ FIELD_LAYER,
+ FIELD_VARIANT,
+ FIELD_SYSTEMSTREAM
+};
+
+static int
+field_get_type (const char *field_name)
+{
+ if (strstr (field_name, "version") != NULL)
+ return FIELD_VERSION;
+ if (strcmp (field_name, "layer") == 0)
+ return FIELD_LAYER;
+ if (strcmp (field_name, "systemstream") == 0)
+ return FIELD_SYSTEMSTREAM;
+ if (strcmp (field_name, "variant") == 0)
+ return FIELD_VARIANT;
+
+ return -1;
+}
+
+static gint
+fields_type_compare (const char *a, const char *b)
+{
+ gint a_type, b_type;
+
+ a_type = field_get_type (a);
+ b_type = field_get_type (b);
+ if (a_type < b_type)
+ return -1;
+ if (b_type < a_type)
+ return 1;
+ return 0;
+}
+
+static void
+print_gst_structure_for_rpm (const char *type_name, GstStructure * s)
+{
+ guint i, num_fields;
+ const char *name;
+ GList *fields, *l, *strings;
+ GString *string;
+
+ name = gst_structure_get_name (s);
+ strings = NULL;
+ num_fields = gst_structure_n_fields (s);
+ fields = NULL;
+
+ for (i = 0; i < num_fields; i++) {
+ const char *field_name;
+
+ field_name = gst_structure_nth_field_name (s, i);
+ if (field_get_type (field_name) < 0) {
+ //g_message ("ignoring field named %s", field_name);
+ continue;
+ }
+
+ fields =
+ g_list_insert_sorted (fields, g_strdup (field_name),
+ (GCompareFunc) fields_type_compare);
+ }
+
+ /* Example:
+ * gstreamer1(decoder-video/mpeg)(mpegversion=1)()(64bit) */
+ string = g_string_new ("gstreamer1");
+ g_string_append_c (string, '(');
+ g_string_append (string, type_name);
+ g_string_append_c (string, '-');
+ g_string_append (string, name);
+ g_string_append_c (string, ')');
+
+ strings = g_list_append (strings, string);
+
+ for (l = fields; l != NULL; l = l->next) {
+ char *field_name;
+ GType type;
+
+ field_name = l->data;
+
+ type = gst_structure_get_field_type (s, field_name);
+ //g_message ("field is: %s, type: %s", field_name, g_type_name (type));
+
+ if (type == G_TYPE_INT) {
+ char *field;
+ int value;
+
+ gst_structure_get_int (s, field_name, &value);
+ field = g_strdup_printf ("(%s=%d)", field_name, value);
+ print_gst_structure_append_field (strings, field);
+ g_free (field);
+ } else if (type == G_TYPE_BOOLEAN) {
+ char *field;
+ int value;
+
+ gst_structure_get_boolean (s, field_name, &value);
+ field = g_strdup_printf ("(%s=%s)", field_name, value ? "true" :
"false");
+ print_gst_structure_append_field (strings, field);
+ g_free (field);
+ } else if (type == GST_TYPE_INT_RANGE) {
+ const GValue *value;
+ int min, max;
+
+ value = gst_structure_get_value (s, field_name);
+ min = gst_value_get_int_range_min (value);
+ max = gst_value_get_int_range_max (value);
+
+ strings = print_gst_structure_dup_fields (strings, max - min + 1);
+
+ for (i = min; i <= max; i++) {
+ char *field;
+
+ field = g_strdup_printf ("(%s=%d)", field_name, i);
+ print_gst_structure_append_field_index (strings, field, max - min + 1,
+ i - min);
+ g_free (field);
+ }
+ } else if (type == GST_TYPE_LIST) {
+ const GValue *value;
+ int num_items;
+
+ value = gst_structure_get_value (s, field_name);
+ num_items = gst_value_list_get_size (value);
+
+ strings = print_gst_structure_dup_fields (strings, num_items);
+
+ for (i = 0; i < num_items; i++) {
+ char *field;
+ const GValue *item_value;
+
+ item_value = gst_value_list_get_value (value, i);
+ field = g_strdup_printf ("(%s=%d)", field_name,
+ g_value_get_int (item_value));
+ print_gst_structure_append_field_index (strings, field, num_items, i);
+ g_free (field);
+ }
+ } else if (type == G_TYPE_STRING) {
+ char *field;
+ const char *value;
+
+ value = gst_structure_get_string (s, field_name);
+ field = g_strdup_printf ("(%s=%s)", field_name, value);
+ print_gst_structure_append_field (strings, field);
+ g_free (field);
+ } else {
+ g_warning ("unhandled type! %s", g_type_name (type));
+ }
+
+ g_free (field_name);
+ }
+
+ g_list_free (fields);
+
+ for (l = strings; l != NULL; l = l->next) {
+ string = l->data;
+ g_print ("%s\n", string->str);
+ g_string_free (string, TRUE);
+ }
+ g_list_free (strings);
+}
+
+static void
+print_plugin_automatic_install_info_codecs (GstElementFactory * factory,
+ gboolean rpm_format)
{
GstPadDirection direction;
const gchar *type_name;
@@ -1756,6 +1973,13 @@ print_plugin_automatic_install_info_code
return;
}
+ if (rpm_format) {
+ /* Ignore NONE ranked plugins */
+ if ((gst_plugin_feature_get_rank (GST_PLUGIN_FEATURE (factory))) ==
+ GST_RANK_NONE)
+ return;
+ }
+
/* decoder/demuxer sink pads should always be static and there should only
* be one, the same applies to encoders/muxers and source pads */
static_templates = gst_element_factory_get_static_pad_templates (factory);
@@ -1792,15 +2016,20 @@ print_plugin_automatic_install_info_code
gst_structure_remove_field (s, "rate");
gst_structure_remove_field (s, "depth");
gst_structure_remove_field (s, "clock-rate");
- s_str = gst_structure_to_string (s);
- g_print ("%s-%s\n", type_name, s_str);
- g_free (s_str);
+ if (!rpm_format) {
+ s_str = gst_structure_to_string (s);
+ g_print ("%s-%s\n", type_name, s_str);
+ g_free (s_str);
+ } else {
+ print_gst_structure_for_rpm (type_name, s);
+ }
}
gst_caps_unref (caps);
}
static void
-print_plugin_automatic_install_info_protocols (GstElementFactory * factory)
+print_plugin_automatic_install_info_protocols (GstElementFactory * factory,
+ gboolean rpm_format)
{
const gchar *const *protocols;
@@ -1809,13 +2038,19 @@ print_plugin_automatic_install_info_prot
switch (gst_element_factory_get_uri_type (factory)) {
case GST_URI_SINK:
while (*protocols != NULL) {
- g_print ("urisink-%s\n", *protocols);
+ if (!rpm_format)
+ g_print ("urisink-%s\n", *protocols);
+ else
+ g_print ("gstreamer1(urisink-%s)\n", *protocols);
++protocols;
}
break;
case GST_URI_SRC:
while (*protocols != NULL) {
- g_print ("urisource-%s\n", *protocols);
+ if (!rpm_format)
+ g_print ("urisource-%s\n", *protocols);
+ else
+ g_print ("gstreamer1(urisource-%s)\n", *protocols);
++protocols;
}
break;
@@ -1826,7 +2061,7 @@ print_plugin_automatic_install_info_prot
}
static void
-print_plugin_automatic_install_info (GstPlugin * plugin)
+print_plugin_automatic_install_info (GstPlugin * plugin, gboolean rpm_format)
{
GList *features, *l;
@@ -1845,11 +2080,15 @@ print_plugin_automatic_install_info (Gst
if (feature_plugin == plugin) {
GstElementFactory *factory;
- g_print ("element-%s\n", gst_plugin_feature_get_name (feature));
+ if (!rpm_format)
+ g_print ("element-%s\n", gst_plugin_feature_get_name (feature));
+ else
+ g_print ("gstreamer1(element-%s)\n",
+ gst_plugin_feature_get_name (feature));
factory = GST_ELEMENT_FACTORY (feature);
- print_plugin_automatic_install_info_protocols (factory);
- print_plugin_automatic_install_info_codecs (factory);
+ print_plugin_automatic_install_info_protocols (factory, rpm_format);
+ print_plugin_automatic_install_info_codecs (factory, rpm_format);
}
if (feature_plugin)
gst_object_unref (feature_plugin);
@@ -1871,7 +2110,7 @@ print_all_plugin_automatic_install_info
plugin = (GstPlugin *) (plugins->data);
plugins = g_list_next (plugins);
- print_plugin_automatic_install_info (plugin);
+ print_plugin_automatic_install_info (plugin, FALSE);
}
gst_plugin_list_free (orig_plugins);
}
@@ -1938,6 +2177,7 @@ main (int argc, char *argv[])
gboolean do_print_blacklist = FALSE;
gboolean plugin_name = FALSE;
gboolean print_aii = FALSE;
+ gboolean print_aii_rpm = FALSE;
gboolean uri_handlers = FALSE;
gboolean check_exists = FALSE;
gchar *min_version = NULL;
@@ -1958,6 +2198,9 @@ main (int argc, char *argv[])
"or all plugins provide.\n
"
"Useful in connection with external automatic plugin "
"installation mechanisms"), NULL},
+ {"rpm", '\0', 0, G_OPTION_ARG_NONE, &print_aii_rpm,
+ N_("Print the machine-parsable list of features of a plugin in RPM "
+ "Provides compatible-format"), NULL},
{"plugin", '\0', 0, G_OPTION_ARG_NONE, &plugin_name,
N_("List the plugin contents"), NULL},
{"types", 't', 0, G_OPTION_ARG_STRING, &types,
@@ -2113,7 +2356,7 @@ main (int argc, char *argv[])
/* if there is such a plugin, print out info */
if (plugin) {
if (print_aii) {
- print_plugin_automatic_install_info (plugin);
+ print_plugin_automatic_install_info (plugin, print_aii_rpm);
} else {
print_plugin_info (plugin);
print_plugin_features (plugin);
@@ -2126,13 +2369,17 @@ main (int argc, char *argv[])
if (plugin) {
if (print_aii) {
- print_plugin_automatic_install_info (plugin);
+ print_plugin_automatic_install_info (plugin, print_aii_rpm);
} else {
print_plugin_info (plugin);
print_plugin_features (plugin);
}
} else {
- g_printerr (_("Could not load plugin file: %s\n"), error->message);
+ if (!print_aii_rpm)
+ g_print (_("Could not load plugin file: %s\n"), error->message);
+ else
+ g_printerr (_("Could not load plugin file: %s\n"),
+ error->message);
g_clear_error (&error);
exit_code = -1;
goto done;
++++++ gstreamer.macros ++++++
%__gstreamer_provides %{_rpmconfigdir}/gstreamer-provides
%__gstreamer_path libgst
%__gstreamer_magic ELF.*(shared object|executable)
%__gstreamer_flags magic_and_path
++++++ gstreamer.prov ++++++
#!/bin/bash
#
# Script to install in:
# /usr/lib/rpm/redhat/find-provides.d
#
# Transform GStreamer auto install info into RPM provides
#
# Author: Bastien Nocera <[email protected]>
# Based on other provides scripts from RPM
#
# We need a way to disable automatic gst provides.
# Simply "%define SKIP_GSTPROVIDES 1" anywhere in the spec file
grep -q -E '^[^#]?%define\s+SKIP_GSTPROVIDES\s.*[^0\s].*' "$RPMBUILD_SPECFILE"
&& exit 0
filelist=`grep -e '.so$' | sed "s/['\"]/\\\&/g"`
# --- Alpha does not mark 64bit dependencies???????
case `uname -m` in
alpha*) mark64="" ;;
*) mark64="()(64bit)" ;;
esac
solist=$(echo $filelist | grep "libgst" | \
xargs file -L 2>/dev/null | grep -E "ELF.*(shared object|executable)" |
cut -d: -f1 )
function getmark()
{
lib64=`if file -L $1 2>/dev/null | \
grep "ELF 64-bit" >/dev/null; then echo -n "$mark64"; fi`
}
function libdir()
{
buildlibdir=`dirname $1`
buildlibdir=`dirname $buildlibdir`
}
for so in $solist ; do
getmark $so
libdir $so
LD_LIBRARY_PATH=$buildlibdir gst-inspect-1.0
--print-plugin-auto-install-info --rpm $so 2> /dev/null | while read line ; do
echo -n "$line";
echo -n "$lib64"
echo
done
done