[SCM] morituri/master: Add patch 1001 cherry-picked from Github fork, to (crudely, for now) migrate to GStreamer 1.0.

js at users.alioth.debian.org js at users.alioth.debian.org
Sun Nov 29 17:51:03 UTC 2015


The following commit has been merged in the master branch:
commit f15c1e860f78a6e06c7ae86bc8c59c31dd7e2d5d
Author: Jonas Smedegaard <dr at jones.dk>
Date:   Sun Nov 29 17:50:37 2015 +0100

    Add patch 1001 cherry-picked from Github fork, to (crudely, for now) migrate to GStreamer 1.0.

diff --git a/debian/patches/1001_modernize_gstreamer.patch b/debian/patches/1001_modernize_gstreamer.patch
new file mode 100644
index 0000000..98e4bfb
--- /dev/null
+++ b/debian/patches/1001_modernize_gstreamer.patch
@@ -0,0 +1,82 @@
+Description: Use GStreamer 1.x
+Origin: https://github.com/alexvong1995/morituri/commit/607f3e9
+Author: Alex Vong <alexvong1995 at gmail.com>
+Last-Update: 2015-11-29
+
+--- a/morituri/common/gstreamer.py
++++ b/morituri/common/gstreamer.py
+@@ -31,8 +31,10 @@
+ def removeAudioParsers():
+     log.debug('gstreamer', 'Removing buggy audioparsers plugin if needed')
+ 
+-    import gst
+-    registry = gst.registry_get_default()
++    import gi
++    gi.require_version('Gst', '1.0')
++    from gi.repository import Gst
++    registry = Gst.Registry.get()
+ 
+     plugin = registry.find_plugin("audioparsersbad")
+     if plugin:
+@@ -54,16 +56,22 @@
+         registry.remove_plugin(plugin)
+ 
+ def gstreamerVersion():
+-    import gst
+-    return _versionify(gst.version())
+-
+-def gstPythonVersion():
+-    import gst
+-    return _versionify(gst.pygst_version)
++    import gi
++    gi.require_version('Gst', '1.0')
++    from gi.repository import Gst
++    return _versionify(Gst.version())
++
++def pyGIVersion():
++    import gi
++    gi.require_version('Gst', '1.0')
++    from gi.repository import Gst
++    return _versionify(gi.version_info)
+ 
+ _VERSION_RE = re.compile(
+     "Version:\s*(?P<version>[\d.]+)")
+ 
++# FIXME: gstreamer 1.x should have fix this bug
++# FIXME: find a less hackish way in gstreamer 1.x to make this work
+ def elementFactoryVersion(name):
+     # surprisingly, there is no python way to get from an element factory
+     # to its plugin and its version directly; you can only compare
+--- a/morituri/result/result.py
++++ b/morituri/result/result.py
+@@ -106,7 +106,7 @@
+     cdparanoiaDefeatsCache = None
+ 
+     gstreamerVersion = None
+-    gstPythonVersion = None
++    pyGIVersion = None
+     encoderVersion = None
+ 
+     profileName = None
+--- a/morituri/rip/cd.py
++++ b/morituri/rip/cd.py
+@@ -274,7 +274,7 @@
+         self.program.result.profilePipeline = profile.pipeline
+         elementFactory = profile.pipeline.split(' ')[0]
+         self.program.result.gstreamerVersion = gstreamer.gstreamerVersion()
+-        self.program.result.gstPythonVersion = gstreamer.gstPythonVersion()
++        self.program.result.PYGIVersion = gstreamer.PYGIVersion()
+         self.program.result.encoderVersion = gstreamer.elementFactoryVersion(
+             elementFactory)
+ 
+--- a/morituri/test/test_common_gstreamer.py
++++ b/morituri/test/test_common_gstreamer.py
+@@ -13,7 +13,7 @@
+         self.failUnless(version.startswith('0.'))
+ 
+     def testGSTPython(self):
+-        version = gstreamer.gstPythonVersion()
++        version = gstreamer.pyGIVersion()
+         self.failUnless(version.startswith('0.'))
+ 
+     def testFlacEnc(self):
diff --git a/debian/patches/series b/debian/patches/series
index 15e222f..f240bbc 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,5 +4,6 @@
 020141102-1117~d81dd33.patch
 020141102-1118~7bf7554.patch
 020150905~4bfbc90.patch
+1001_modernize_gstreamer.patch
 1002_improve_manpage_sections.patch
 2001_fix_python_hashbang.patch

-- 
morituri packaging



More information about the pkg-multimedia-commits mailing list