Accepting request 78457 from home:dimstar:branches:multimedia:libs

Gstreamer 0.11 develepmont branch. Parallel installable to 0.10; Package renamed from gstreamer-0_10 to gstreamer; the version should just not be part of the name

OBS-URL: https://build.opensuse.org/request/show/78457
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/gstreamer?expand=0&rev=1
This commit is contained in:
Cristian Rodríguez 2011-08-17 21:41:16 +00:00 committed by Git OBS Bridge
commit 22c9973931
13 changed files with 2562 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

2
baselibs.conf Normal file
View File

@ -0,0 +1,2 @@
gstreamer
libgstreamer-0_11-1

3
gstreamer-0.11.0.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0e59859fd27ae635af880d9dca6aa74991b11a5fda5f9060e05186d079ec09f9
size 3516801

230
gstreamer-doc.changes Normal file
View File

@ -0,0 +1,230 @@
-------------------------------------------------------------------
Sun Jan 16 14:21:19 UTC 2011 - aj@suse.de
- Remove buildrequire on pyxml and add python instead for doc
package only, changelog of package with date 2008-03-21 contains:
"Don't depend on PyXML and use only XML modules that are shipped
with python."
-------------------------------------------------------------------
Sat Sep 11 18:18:02 UTC 2010 - dimstar@opensuse.org
- Add gstreamer-0_10-make382.patch: Fix build with make 3.82.
Generally, the -doc package is affected.
-------------------------------------------------------------------
Tue Sep 7 23:16:34 CEST 2010 - vuntz@opensuse.org
- Fix build: remove the macros.gstreamer and gstreamer-provides
from the doc package.
-------------------------------------------------------------------
Sat Mar 13 19:20:30 UTC 2010 - dimstar@opensuse.org
- Fix build: remove gst-plugin-scanner from the doc-package.
-------------------------------------------------------------------
Sun Dec 6 13:37:39 CET 2009 - vuntz@opensuse.org
- Fix build: the introspection files need to be removed for the doc
package.
-------------------------------------------------------------------
Mon Oct 26 16:59:30 CET 2009 - sbrabec@suse.cz
- Added support for translation-update-upstream (FATE#301344).
-------------------------------------------------------------------
Wed Aug 5 13:22:08 CEST 2009 - vuntz@novell.com
- Update to version 0.10.24:
+ Changes:
- Fully support nested structures in caps
- Support frame-by-frame stepping in sinks
- Add support for buffer-lists to pass around groups of buffers
- Use TaskPools for managing worker threads
- New stream-status API for finer thread control
- Code optimisations
- Many other bug-fixes and enhancements
+ Bugs fixed: bgo#580579, bgo#527488, bgo#570233, bgo#584389,
bgo#534208, bgo#545787, bgo#554460, bgo#559643, bgo#560345,
bgo#560442, bgo#572285, bgo#577926, bgo#578908, bgo#580177,
bgo#580716, bgo#581198, bgo#581281, bgo#582010, bgo#582564,
bgo#582588, bgo#582878, bgo#583187, bgo#583419, bgo#583456,
bgo#583554, bgo#584835, bgo#584838, bgo#585039, bgo#585075,
bgo#585137, bgo#585592, bgo#585733, bgo#585748, bgo#586566,
bgo#586568, bgo#587973, bgo#587976, bgo#588744, bgo#588745,
bgo#589127, bgo#590056, bgo#590622, bgo#579177, bgo#581321,
bgo#584118, bgo#585433, bgo#585569, bgo#585834, bgo#585960,
bgo#587052
+ API additions.
-------------------------------------------------------------------
Mon May 18 00:54:01 CEST 2009 - vuntz@novell.com
- Update to version 0.10.23:
+ Support files > 4GB on Windows
+ Controller interpolation fixes
+ Add timer support to GstPoll and use it for clocking
+ Attempt to typefind contents from the file extension if all
else fails
+ GStreamer revision control switched to Git
+ Many other bug fixes and improvements
+ Bugs fixed: bgo#579177, bgo#163577, bgo#574160, bgo#575598,
bgo#575922, bgo#576842, bgo#555978, bgo#565607, bgo#566936,
bgo#567692, bgo#567725, bgo#568289, bgo#568438, bgo#568481,
bgo#568632, bgo#568678, bgo#570910, bgo#571227, bgo#571559,
bgo#572480, bgo#573623, bgo#574024, bgo#574211, bgo#574213,
bgo#574241, bgo#574484, bgo#574623, bgo#574805, bgo#575695,
bgo#575814, bgo#576381, bgo#576563, bgo#576582, bgo#577887,
bgo#577891, bgo#578114, bgo#578201, bgo#579127, bgo#580121,
bgo#361155, bgo#517231, bgo#572591, bgo#573823, bgo#574163,
bgo#575682, bgo#575988
+ API additions:
- New FIXME and MEMDUMP debug levels
- gst_tag_list_get_buffer() and gst_tag_list_get_buffer_index()
- New tags: GST_TAG_SUBTITLE_CODEC, GST_TAG_HOMEPAGE
- gst_util_array_binary_search()
- gst_message_new_request_state(),
gst_message_parse_request_state(), GST_MESSAGE_REQUEST_STATE
- GstPoll::gst_poll_new_timer()
- GstPoll::gst_poll_write_control()
- GstPoll::gst_poll_read_control()
-------------------------------------------------------------------
Thu Apr 23 17:18:34 CEST 2009 - sbrabec@suse.cz
- Don't call autogen in older products.
-------------------------------------------------------------------
Tue Oct 21 17:42:51 CDT 2008 - maw@suse.de
- Update to version 0.10.21:
+ Basetransform rework
+ Basesink synchronisation extensions
+ New documentation
+ Bugs fixed: bgo#481169, bgo#520694, bgo#538201, bgo#544855,
bgo#339795, bgo#348114, bgo#361718, bgo#533856, bgo#536978,
bgo#537804, bgo#537812, bgo#538568, bgo#539772, bgo#542175,
bgo#543444, bgo#543853, bgo#544174, bgo#544776, bgo#545352,
bgo#545603, bgo#545605, bgo#545607, bgo#545853, bgo#546328,
bgo#546822, bgo#547277, bgo#547728, bgo#548394, bgo#548652,
bgo#549504, bgo#551952, bgo#551978, bgo#547835, bgo#538628,
bgo#546883, and bgo#551509
+ API added:
* Add GST_TAG_ATTACHMENT for generic file attachments to streams.
* Add gst_base_sink_set_render_delay()
* Add gst_base_sink_get_render_delay()
* Add gst_check_setup_src_pad_by_name
* Add gst_check_setup_sink_pad_by_name
* Add gst_check_teardown_pad_by_name
* Add GstBaseTransform::gst_base_transform_suggest()
* GstBaseTransform::gst_base_transform_reconfigure()
* GstPad::gst_pad_set_iterate_internal_links_function()
* GstPad::GstPadIterIntLinkFunction
* GstPad::gst_pad_iterate_internal_links()
* GstPad::gst_pad_iterate_internal_links_default()
+ API deprecated:
* gst_pad_get_internal_links()
* gst_pad_set_internal_link_function()
* gst_pad_get_internal_links_default()
- Add gstreamer-0_10-no-gtk-doc-for-reals.patch.
-------------------------------------------------------------------
Thu Sep 04 15:49:43 CEST 2008 - mboman@novell.com
- Update to version 0.10.20:
+ Add the Presets interface
+ Use the binary registry by default
+ Deprecate gst_element_get_pad and don't use it anywhere any more.
+ Reverse playback fixes
+ API to get missing element messages from parse_launch parsing.
+ Fixes in latency calculations
+ BaseTransform negotiation fixes
+ New Buffering query and messages
+ Fix multiqueue deadlocks when changing limits
+ Remove pre-generated parser hacks and require newer flex/bison
+ Use GSlice in more places
+ Use static strings in property declarations everywhere to save memory
allocations
+ Fix unaligned memory accesses with the binary registry and add CRC
checks
+ Lots of other bug fixes
-------------------------------------------------------------------
Mon Apr 14 14:14:41 CEST 2008 - sbrabec@suse.cz
- Updated to version 0.10.19:
* Fix a regression in raw fd handling
* Fixed: bgo#524041
- Fixed Obsoletes (bnc#357153).
-------------------------------------------------------------------
Wed Apr 2 17:17:19 CEST 2008 - maw@suse.de
- Update to version 0.10.18:
+ New GstPoll abstraction simplifies operations on multiple
file descriptors
+ Bugs fixed: bgo#516187, bgo#516395, bgo#520756, bgo#498222,
bgo#499127, bgo#505417, bgo#509559, bgo#510194, bgo#511783,
bgo#513964, bgo#515469, bgo#519584, bgo#519698, bgo#520152,
bgo#520671, bgo#520808, bgo#520877, bgo#521740, and bgo#522741.
-------------------------------------------------------------------
Tue Jan 22 15:20:12 CET 2008 - sbrabec@suse.cz
- Updated to version 0.10.15:
* Changes for asynchronous sink management
* New ts-offset property on basesink for adjusting clock synchronisation
* New GstController LFO feature
* Fixes and improvements in latency measurement for live pipelines
* Additional documentation and docs fixes
* Faster typefinding
* More tag types added
* Improvements in various core elements and parent classes
* New unit tests
* Allow dumping pipelines as dot graphs
* GstStructures now support nesting
* URIHandler interface can now be implemented in bindings
* Many other bug-fixes and improvements
* API additions
- Split package according to shared library packaging policy
(#223286).
-------------------------------------------------------------------
Mon Sep 17 15:04:01 CEST 2007 - sbrabec@suse.cz
- Updated to version 0.10.14:
* State change handling improvements
* New improved GstController API
* Multi-queue fixes and enhancements
* Fewer dynamic library relocations
* Various other fixes and improvements
* Parallel installability with 0.8.x series
* Threadsafe design and API
* Add GstParamSpecFraction, so elements can have fraction
properties without lots of painful string parsing.
* Add fail_unless_equals_float() and assert_equals_float()
* Add gst_type_register_static_full
* Add gst_element_class_set_details_simple
* Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
* add GST_TAG_LICENSE_URI and GST_TAG_COPYRIGHT_URI
* gst_element_factory_has_interface()
* Many bugs fixed.
-------------------------------------------------------------------
Wed Aug 15 09:27:52 CEST 2007 - coolo@suse.de
- fix requires
-------------------------------------------------------------------
Sat Jul 21 22:10:15 CEST 2007 - aj@suse.de
- Fix duplicate subpackage.
-------------------------------------------------------------------
Sat Jul 21 07:56:22 CEST 2007 - aj@suse.de
- Separate spec file for just doc package.

260
gstreamer-doc.spec Normal file
View File

@ -0,0 +1,260 @@
#
# spec file for package gstreamer-0_11
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#
Name: gstreamer-doc
%define build_doc 1
Version: 0.11.0
Release: 1
%define gst_branch 0.11
License: LGPLv2.1+
Summary: Streaming-Media Framework Runtime
Url: http://gstreamer.freedesktop.org/
Group: Productivity/Multimedia/Other
Source0: http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-%{version}.tar.bz2
Source1: gstreamer.macros
Source2: gstreamer.prov
Source99: baselibs.conf
# PATCH-FIX-OPENSUSE gstreamer-no-gtk-doc-for-reals.patch maw@novell.com -- to build without gtk-doc, like totally for reals
Patch0: gstreamer-no-gtk-doc-for-reals.patch
# PATCH-FEATURE-UPSTREAM gstreamer-rpm-prov.patch bgo#588783 dimstar@opensuse.org -- Add --rpm parameter to allow creation of rpm provides, patch from fedora
Patch1: gstreamer-rpm-prov.patch
BuildRequires: bison
BuildRequires: check-devel
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: glib2-devel >= 2.26
BuildRequires: libxml2-devel
BuildRequires: translation-update-upstream
%ifarch %ix86 ppc x86_64
BuildRequires: valgrind-devel
%endif
%if %suse_version >= 1120
BuildRequires: gobject-introspection-devel >= 0.6.8
%endif
%if %build_doc
BuildRequires: docbook-toys
BuildRequires: docbook-utils
BuildRequires: gtk-doc
BuildRequires: python
BuildRequires: transfig
BuildRequires: texlive-latex
BuildRequires: texlive-latex-doc
# Ensure that the documentation corresponds with the installed version:
Requires: libgstreamer-0_11-0 = %{version}
# Generic name, never used in SuSE:
Provides: gstreamer-doc = %{version}
%else
# Core modules may depend on new enough libraries:
Requires: libgstreamer-0_11-0 >= %{version}
Recommends: %{name}-lang = %{version}
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%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.
%if !%build_doc
%package -n libgstreamer-0_11-0
License: LGPLv2.1+
Summary: Streaming-Media Framework Runtime
Group: System/Libraries
# We want to have core modules installed:
Requires: %{name}
%description -n libgstreamer-0_11-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 utils
License: LGPLv2.1+
Summary: Streaming-Media Framework Runtime
Group: Productivity/Multimedia/Other
# Generic name, never used in SuSE:
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
License: LGPLv2.1+
Summary: Include Files and Libraries mandatory for Development
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
Requires: check-devel
Requires: glib2-devel
Requires: libxml2-devel
Requires: popt-devel
%description devel
This package contains all necessary include files and libraries needed
to develop applications that require these.
%endif
%lang_package
%prep
%setup -q -n gstreamer-%{version}
#translation-update-upstream po gstreamer-0.10
%if ! %build_doc
%patch0 -p1
%endif
%patch1 -p1
%build
# FIXME: GTKDOC_CFLAGS, GST_OBJ_CFLAGS:
# Silently ignored compilation of uninstalled gtk-doc scanners without RPM_OPT_FLAGS.
export V=1
%if %suse_version >= 1110
NOCONFIGURE=1 ./autogen.sh
%endif
export CFLAGS="%{optflags} -fno-strict-aliasing"
%configure\
%if %build_doc
--enable-gtk-doc\
--enable-docbook\
%endif
%if %suse_version >= 1120
--enable-introspection\
%endif
--disable-static
make %{?_smp_mflags}
%install
%makeinstall
mkdir -p %{buildroot}%{_datadir}/gstreamer-%{gst_branch}/presets
mkdir -p %{buildroot}%{_docdir}/%{name}
%if %build_doc
mv %{buildroot}%{_datadir}/doc/gstreamer-*/* %{buildroot}%{_docdir}/%{name}
rmdir %{buildroot}%{_datadir}/doc/gstreamer-*
%else
# TODO is empty
cp AUTHORS COPYING ChangeLog NEWS README RELEASE %{buildroot}%{_docdir}/%{name}
%find_lang %{name}-%{gst_branch}
rm %{buildroot}%{_libdir}/gstreamer-*/*.*a
%endif
%if %build_doc
rm -rf %{buildroot}%{_bindir}/*
rm -rf %{buildroot}%{_libdir}
rm -rf %{buildroot}%{_datadir}/aclocal
rm -rf %{buildroot}%{_includedir}/*
rm -rf %{buildroot}%{_datadir}/locale
rm -rf %{buildroot}%{_mandir}
rm -rf %{buildroot}%{_datadir}/gir-1.0/
rm -rf %{buildroot}%{_datadir}/gstreamer-%{gst_branch}
rm -rf %{buildroot}%{_libexecdir}/gstreamer-%{gst_branch}/gst-plugin-scanner
%else
rm -rf %{buildroot}%{_datadir}/gtk-doc
rm -rf %{buildroot}%{_docdir}/%{name}/manual
rm -rf %{buildroot}%{_docdir}/%{name}/pwg
mkdir -p %{buildroot}%{_datadir}/gstreamer-%{gst_branch}/presets
# Install the rpm macros
%if 0%?suse_version >= 1210
%__install -m644 -D %{S:1} %{buildroot}%{_libexecdir}/rpm/fileattrs/gstreamer.attr
%else
%__install -m644 -D %{S:1} %{buildroot}%{_sysconfdir}/rpm/macros.gstreamer
%endif
%__install -m755 -D %{S:2} %{buildroot}%{_libexecdir}/rpm/gstreamer-provides
%endif
%fdupes %{buildroot}
%clean
rm -rf %{buildroot}
%if ! %build_doc
%post -n libgstreamer-0_11-0 -p /sbin/ldconfig
%postun -n libgstreamer-0_11-0 -p /sbin/ldconfig
%endif
%if %build_doc
%files
%defattr(-,root,root)
%doc %dir %{_docdir}/%{name}
%{_datadir}/gtk-doc/html/*
%doc %{_docdir}/%{name}/manual
%doc %{_docdir}/%{name}/pwg
%doc %{_docdir}/%{name}/faq
%else
%files
%defattr(-, root, root)
%dir %{_datadir}/gstreamer-%{gst_branch}
%dir %{_datadir}/gstreamer-%{gst_branch}/presets
%doc %dir %{_docdir}/%{name}
%doc %{_docdir}/%{name}/AUTHORS
%doc %{_docdir}/%{name}/COPYING
%doc %{_docdir}/%{name}/ChangeLog
%doc %{_docdir}/%{name}/NEWS
%doc %{_docdir}/%{name}/README
%doc %{_docdir}/%{name}/RELEASE
%dir %{_libdir}/gstreamer-%{gst_branch}
%{_libdir}/gstreamer-%{gst_branch}/*.so
%dir %{_libexecdir}/gstreamer-%{gst_branch}
%{_libexecdir}/gstreamer-%{gst_branch}/gst-plugin-scanner
%files lang -f %{name}-%{gst_branch}.lang
%files -n libgstreamer-0_11-0
%defattr(-, root, root)
%{_libdir}/*.so.*
%if %suse_version >= 1120
%{_libdir}/girepository-1.0/*.typelib
%endif
%files utils
%defattr(-, root, root)
%{_bindir}/*-%{gst_branch}
%doc %{_mandir}/man?/*-%{gst_branch}.*
%files devel
%defattr(-, root, root)
%{_datadir}/aclocal/*.m4
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/*.*a
%{_libdir}/pkgconfig/*.pc
%{_libexecdir}/rpm/gstreamer-provides
%if 0%?suse_version >= 1210
%{_libexecdir}/rpm/fileattrs/gstreamer.attr
%else
%{_sysconfdir}/rpm/macros.gstreamer
%endif
%if %suse_version >= 1120
%{_datadir}/gir-1.0/*.gir
%endif
%endif
%changelog

View File

@ -0,0 +1,48 @@
Index: gstreamer-0.10.29/docs/gst/Makefile.am
===================================================================
--- gstreamer-0.10.29.orig/docs/gst/Makefile.am
+++ gstreamer-0.10.29/docs/gst/Makefile.am
@@ -1,5 +1,5 @@
## Process this file with automake to produce Makefile.in
-
+if ENABLE_GTK_DOC
# The name of the module, e.g. 'glib'.
# DOC_MODULE=gstreamer-@GST_MAJORMINOR@
DOC_MODULE=gstreamer
@@ -106,4 +106,5 @@ include $(top_srcdir)/common/gtk-doc.mak
# gtk-doc.mak defines CLEANFILES
CLEANFILES += gst-universe.svg
+endif
Index: gstreamer-0.10.29/docs/libs/Makefile.am
===================================================================
--- gstreamer-0.10.29.orig/docs/libs/Makefile.am
+++ gstreamer-0.10.29/docs/libs/Makefile.am
@@ -1,3 +1,4 @@
+if ENABLE_GTK_DOC
## Process this file with automake to produce Makefile.in
# The name of the module, e.g. 'glib'.
@@ -103,3 +104,5 @@ GTKDOC_EXTRA_ENVIRONMENT= \
DOC_OVERRIDES = $(DOC_MODULE)-overrides.txt
include $(top_srcdir)/common/gtk-doc.mak
+
+endif
\ No newline at end of file
Index: gstreamer-0.10.29/docs/plugins/Makefile.am
===================================================================
--- gstreamer-0.10.29.orig/docs/plugins/Makefile.am
+++ gstreamer-0.10.29/docs/plugins/Makefile.am
@@ -1,3 +1,4 @@
+if ENABLE_GTK_DOC
GST_DOC_SCANOBJ = $(top_srcdir)/common/gstdoc-scangobj
## Process this file with automake to produce Makefile.in
@@ -115,3 +116,4 @@ GTKDOC_LD=$(LIBTOOL) --tag=CC --mode=lin
DOC_OVERRIDES =
include $(top_srcdir)/common/gtk-doc-plugins.mak
+endif
\ No newline at end of file

373
gstreamer-rpm-prov.patch Normal file
View File

@ -0,0 +1,373 @@
Index: gstreamer-0.10.33/tools/gst-inspect.c
===================================================================
--- gstreamer-0.10.33.orig/tools/gst-inspect.c
+++ gstreamer-0.10.33/tools/gst-inspect.c
@@ -1408,9 +1408,225 @@ print_element_info (GstElementFactory *
return 0;
}
+static void
+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_plugin_automatic_install_info_codecs (GstElementFactory * factory)
+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:
+ * gstreamer0.10(decoder-video/mpeg)(mpegversion=1)()(64bit) */
+ string = g_string_new ("gstreamer0.10");
+ 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;
@@ -1435,6 +1651,12 @@ print_plugin_automatic_install_info_code
return;
}
+ if (rpm_format) {
+ /* Ignore NONE ranked plugins */
+ if (GST_PLUGIN_FEATURE (factory)->rank == 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);
@@ -1471,15 +1693,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)
{
gchar **protocols, **p;
@@ -1488,11 +1715,17 @@ print_plugin_automatic_install_info_prot
switch (gst_element_factory_get_uri_type (factory)) {
case GST_URI_SINK:
for (p = protocols; *p != NULL; ++p)
- g_print ("urisink-%s\n", *p);
+ if (!rpm_format)
+ g_print ("urisink-%s\n", *p);
+ else
+ g_print ("gstreamer0.10(urisink-%s)\n", *p);
break;
case GST_URI_SRC:
for (p = protocols; *p != NULL; ++p)
- g_print ("urisource-%s\n", *p);
+ if (!rpm_format)
+ g_print ("urisource-%s\n", *p);
+ else
+ g_print ("gstreamer0.10(urisource-%s)\n", *p);
break;
default:
break;
@@ -1502,7 +1735,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)
{
const gchar *plugin_name;
GList *features, *l;
@@ -1522,11 +1755,15 @@ print_plugin_automatic_install_info (Gst
if (g_str_equal (plugin_name, feature->plugin_name)) {
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 ("gstreamer0.10(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);
}
}
@@ -1546,7 +1783,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);
}
@@ -1558,6 +1795,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;
#ifndef GST_DISABLE_OPTION_PARSING
GOptionEntry options[] = {
@@ -1570,6 +1808,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},
{"uri-handlers", 'u', 0, G_OPTION_ARG_NONE, &uri_handlers,
@@ -1658,7 +1899,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);
@@ -1671,13 +1912,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_print (_("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_error_free (error);
return -1;
}

1291
gstreamer.changes Normal file

File diff suppressed because it is too large Load Diff

4
gstreamer.macros Normal file
View File

@ -0,0 +1,4 @@
%__gstreamer_provides %{_rpmconfigdir}/gstreamer-provides
%__gstreamer_path libgst
%__gstreamer_magic ELF.*shared object
%__gstreamer_flags magic_and_path

49
gstreamer.prov Normal file
View File

@ -0,0 +1,49 @@
#!/bin/sh
#
# Script to install in:
# /usr/lib/rpm/redhat/find-provides.d
#
# Transform GStreamer auto install info into RPM provides
#
# Author: Bastien Nocera <hadess@hadess.net>
# 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 "ELF.*shared object" | 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-0.11 --print-plugin-auto-install-info --rpm $so 2> /dev/null | while read line ; do
echo -n "$line";
echo -n "$lib64"
echo
done
done

260
gstreamer.spec Normal file
View File

@ -0,0 +1,260 @@
#
# spec file for package gstreamer-0_11
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#
Name: gstreamer
%define build_doc 0
Version: 0.11.0
Release: 1
%define gst_branch 0.11
License: LGPLv2.1+
Summary: Streaming-Media Framework Runtime
Url: http://gstreamer.freedesktop.org/
Group: Productivity/Multimedia/Other
Source0: http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-%{version}.tar.bz2
Source1: gstreamer.macros
Source2: gstreamer.prov
Source99: baselibs.conf
# PATCH-FIX-OPENSUSE gstreamer-no-gtk-doc-for-reals.patch maw@novell.com -- to build without gtk-doc, like totally for reals
Patch0: gstreamer-no-gtk-doc-for-reals.patch
# PATCH-FEATURE-UPSTREAM gstreamer-rpm-prov.patch bgo#588783 dimstar@opensuse.org -- Add --rpm parameter to allow creation of rpm provides, patch from fedora
Patch1: gstreamer-rpm-prov.patch
BuildRequires: bison
BuildRequires: check-devel
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: glib2-devel >= 2.26
BuildRequires: libxml2-devel
BuildRequires: translation-update-upstream
%ifarch %ix86 ppc x86_64
BuildRequires: valgrind-devel
%endif
%if %suse_version >= 1120
BuildRequires: gobject-introspection-devel >= 0.6.8
%endif
%if %build_doc
BuildRequires: docbook-toys
BuildRequires: docbook-utils
BuildRequires: gtk-doc
BuildRequires: python
BuildRequires: transfig
BuildRequires: texlive-latex
BuildRequires: texlive-latex-doc
# Ensure that the documentation corresponds with the installed version:
Requires: libgstreamer-0_11-0 = %{version}
# Generic name, never used in SuSE:
Provides: gstreamer-doc = %{version}
%else
# Core modules may depend on new enough libraries:
Requires: libgstreamer-0_11-0 >= %{version}
Recommends: %{name}-lang = %{version}
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%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.
%if !%build_doc
%package -n libgstreamer-0_11-0
License: LGPLv2.1+
Summary: Streaming-Media Framework Runtime
Group: System/Libraries
# We want to have core modules installed:
Requires: %{name}
%description -n libgstreamer-0_11-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 utils
License: LGPLv2.1+
Summary: Streaming-Media Framework Runtime
Group: Productivity/Multimedia/Other
# Generic name, never used in SuSE:
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
License: LGPLv2.1+
Summary: Include Files and Libraries mandatory for Development
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
Requires: check-devel
Requires: glib2-devel
Requires: libxml2-devel
Requires: popt-devel
%description devel
This package contains all necessary include files and libraries needed
to develop applications that require these.
%endif
%lang_package
%prep
%setup -q -n gstreamer-%{version}
#translation-update-upstream po gstreamer-0.10
%if ! %build_doc
%patch0 -p1
%endif
%patch1 -p1
%build
# FIXME: GTKDOC_CFLAGS, GST_OBJ_CFLAGS:
# Silently ignored compilation of uninstalled gtk-doc scanners without RPM_OPT_FLAGS.
export V=1
%if %suse_version >= 1110
NOCONFIGURE=1 ./autogen.sh
%endif
export CFLAGS="%{optflags} -fno-strict-aliasing"
%configure\
%if %build_doc
--enable-gtk-doc\
--enable-docbook\
%endif
%if %suse_version >= 1120
--enable-introspection\
%endif
--disable-static
make %{?_smp_mflags}
%install
%makeinstall
mkdir -p %{buildroot}%{_datadir}/gstreamer-%{gst_branch}/presets
mkdir -p %{buildroot}%{_docdir}/%{name}
%if %build_doc
mv %{buildroot}%{_datadir}/doc/gstreamer-*/* %{buildroot}%{_docdir}/%{name}
rmdir %{buildroot}%{_datadir}/doc/gstreamer-*
%else
# TODO is empty
cp AUTHORS COPYING ChangeLog NEWS README RELEASE %{buildroot}%{_docdir}/%{name}
%find_lang %{name}-%{gst_branch}
rm %{buildroot}%{_libdir}/gstreamer-*/*.*a
%endif
%if %build_doc
rm -rf %{buildroot}%{_bindir}/*
rm -rf %{buildroot}%{_libdir}
rm -rf %{buildroot}%{_datadir}/aclocal
rm -rf %{buildroot}%{_includedir}/*
rm -rf %{buildroot}%{_datadir}/locale
rm -rf %{buildroot}%{_mandir}
rm -rf %{buildroot}%{_datadir}/gir-1.0/
rm -rf %{buildroot}%{_datadir}/gstreamer-%{gst_branch}
rm -rf %{buildroot}%{_libexecdir}/gstreamer-%{gst_branch}/gst-plugin-scanner
%else
rm -rf %{buildroot}%{_datadir}/gtk-doc
rm -rf %{buildroot}%{_docdir}/%{name}/manual
rm -rf %{buildroot}%{_docdir}/%{name}/pwg
mkdir -p %{buildroot}%{_datadir}/gstreamer-%{gst_branch}/presets
# Install the rpm macros
%if 0%?suse_version >= 1210
%__install -m644 -D %{S:1} %{buildroot}%{_libexecdir}/rpm/fileattrs/gstreamer.attr
%else
%__install -m644 -D %{S:1} %{buildroot}%{_sysconfdir}/rpm/macros.gstreamer
%endif
%__install -m755 -D %{S:2} %{buildroot}%{_libexecdir}/rpm/gstreamer-provides
%endif
%fdupes %{buildroot}
%clean
rm -rf %{buildroot}
%if ! %build_doc
%post -n libgstreamer-0_11-0 -p /sbin/ldconfig
%postun -n libgstreamer-0_11-0 -p /sbin/ldconfig
%endif
%if %build_doc
%files
%defattr(-,root,root)
%doc %dir %{_docdir}/%{name}
%{_datadir}/gtk-doc/html/*
%doc %{_docdir}/%{name}/manual
%doc %{_docdir}/%{name}/pwg
%doc %{_docdir}/%{name}/faq
%else
%files
%defattr(-, root, root)
%dir %{_datadir}/gstreamer-%{gst_branch}
%dir %{_datadir}/gstreamer-%{gst_branch}/presets
%doc %dir %{_docdir}/%{name}
%doc %{_docdir}/%{name}/AUTHORS
%doc %{_docdir}/%{name}/COPYING
%doc %{_docdir}/%{name}/ChangeLog
%doc %{_docdir}/%{name}/NEWS
%doc %{_docdir}/%{name}/README
%doc %{_docdir}/%{name}/RELEASE
%dir %{_libdir}/gstreamer-%{gst_branch}
%{_libdir}/gstreamer-%{gst_branch}/*.so
%dir %{_libexecdir}/gstreamer-%{gst_branch}
%{_libexecdir}/gstreamer-%{gst_branch}/gst-plugin-scanner
%files lang -f %{name}-%{gst_branch}.lang
%files -n libgstreamer-0_11-0
%defattr(-, root, root)
%{_libdir}/*.so.*
%if %suse_version >= 1120
%{_libdir}/girepository-1.0/*.typelib
%endif
%files utils
%defattr(-, root, root)
%{_bindir}/*-%{gst_branch}
%doc %{_mandir}/man?/*-%{gst_branch}.*
%files devel
%defattr(-, root, root)
%{_datadir}/aclocal/*.m4
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/*.*a
%{_libdir}/pkgconfig/*.pc
%{_libexecdir}/rpm/gstreamer-provides
%if 0%?suse_version >= 1210
%{_libexecdir}/rpm/fileattrs/gstreamer.attr
%else
%{_sysconfdir}/rpm/macros.gstreamer
%endif
%if %suse_version >= 1120
%{_datadir}/gir-1.0/*.gir
%endif
%endif
%changelog

18
pre_checkin.sh Normal file
View File

@ -0,0 +1,18 @@
#!/bin/sh
function fail {
echo Something failed. Too bad.
exit 1
}
rm -f gstreamer-doc.spec.tmp
cat gstreamer.spec \
| sed 's/^Name: *gstreamer*/Name: gstreamer-doc/g' \
| sed 's/^%define *build_doc 0/%define build_doc 1/g' \
> gstreamer-doc.spec.tmp || fail
mv gstreamer-doc.spec.tmp gstreamer-doc.spec || fail
echo Fixed up gstreamer-doc.spec.