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

Proposed by Sebastien Bacher on 2014-03-27
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) 2014-03-27 Approve on 2014-03-31
Iain Lane (community) 2014-03-27 Approve on 2014-03-28
Sebastian Heinlein 2014-03-27 Pending
Michael Vogt 2014-03-27 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.
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
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)

Iain Lane (laney) wrote :

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

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
1=== modified file 'sessioninstaller/core.py'
2--- sessioninstaller/core.py 2013-06-13 09:37:08 +0000
3+++ sessioninstaller/core.py 2014-03-27 22:37:33 +0000
4@@ -1341,14 +1341,14 @@
5 score -= 10
6 provides = []
7 for struct in structures:
8- if pkg.candidate.record["Gstreamer-Version"] != struct.version:
9+ if pkg.candidate.record["Gstreamer-Version"].split(".")[0] != struct.version.split(".")[0]:
10 continue
11 if struct.caps:
12 try:
13 pkg_caps = Gst.Caps.from_string(pkg.candidate.record[struct.record])
14 except KeyError:
15 continue
16- if not pkg_caps.intersect(struct.caps):
17+ if pkg_caps.intersect(struct.caps).is_empty():
18 continue
19 else:
20 try:

Subscribers

People subscribed via source and target branches