Merge lp:~seb128/sessioninstaller/current-gstreamer-tweaks into lp:sessioninstaller

Proposed by Sebastien Bacher
Status: Merged
Merged at revision: 142
Proposed branch: lp:~seb128/sessioninstaller/current-gstreamer-tweaks
Merge into: lp:sessioninstaller
Diff against target: 20 lines (+2/-2)
1 file modified
sessioninstaller/core.py (+2/-2)
To merge this branch: bzr merge lp:~seb128/sessioninstaller/current-gstreamer-tweaks
Reviewer Review Type Date Requested Status
Martin Pitt (community) Approve
Iain Lane (community) Approve
Sebastian Heinlein Pending
Michael Vogt Pending
Review via email: mp+213163@code.launchpad.net

Commit message

Tweaks to work with the current gstreamer version

Description of the change

Tweaks to work with the current gstreamer version

The issue there is that Gstreamer-Version=1.2 but struct.version=1.0, one easy way to filter 0.10or1.0 is to split(".")[0]. There might be a better way but that works for the current issue.

Once that fixed the code hit another issue where "pkg_caps.intersect(struct.caps)" returns a caps even when there is no intersect, the api has a is_empty() api, using it fixes the issue

To post a comment you must log in.
Revision history for this message
Iain Lane (laney) wrote :

Ok, I think a Gstreamer-Interface-Version field or whatever would be ideal, but major is what they use anyway so fine.

review: Approve
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks, I've uploaded that to trusty (not sure who handle trunk but there is no debian dir there so I guess it's not one project where upstream=packaging vcs)

Revision history for this message
Iain Lane (laney) wrote :

Probably not, seems barry mvo or pitti could commit to trunk for you though if necessary

Revision history for this message
Martin Pitt (pitti) wrote :

Committed upstream, thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'sessioninstaller/core.py'
--- sessioninstaller/core.py 2013-06-13 09:37:08 +0000
+++ sessioninstaller/core.py 2014-03-27 22:37:33 +0000
@@ -1341,14 +1341,14 @@
1341 score -= 101341 score -= 10
1342 provides = []1342 provides = []
1343 for struct in structures:1343 for struct in structures:
1344 if pkg.candidate.record["Gstreamer-Version"] != struct.version:1344 if pkg.candidate.record["Gstreamer-Version"].split(".")[0] != struct.version.split(".")[0]:
1345 continue1345 continue
1346 if struct.caps:1346 if struct.caps:
1347 try:1347 try:
1348 pkg_caps = Gst.Caps.from_string(pkg.candidate.record[struct.record])1348 pkg_caps = Gst.Caps.from_string(pkg.candidate.record[struct.record])
1349 except KeyError:1349 except KeyError:
1350 continue1350 continue
1351 if not pkg_caps.intersect(struct.caps):1351 if pkg_caps.intersect(struct.caps).is_empty():
1352 continue1352 continue
1353 else:1353 else:
1354 try:1354 try:

Subscribers

People subscribed via source and target branches