After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 575157 - xdgmime typefinder: make more conservative
xdgmime typefinder: make more conservative
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal blocker
: 0.10.11
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-03-13 00:17 UTC by Tim-Philipp Müller
Modified: 2009-03-13 22:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (2.96 KB, patch)
2009-03-13 00:18 UTC, Tim-Philipp Müller
none Details | Review
same as before, just without abusing the priority value as typefind probability (2.42 KB, patch)
2009-03-13 19:50 UTC, Tim-Philipp Müller
committed Details | Review

Description Tim-Philipp Müller 2009-03-13 00:17:26 UTC
I'm a bit uncomfortable with the xdg mime typefinder. I would like to change it to make it less likely that we end up with MIME types trumping GStreamer media types in some scenarios.

Since the xdgmime typefinder's stated aim is to avoid false positives of non-media formats (for which are typefinding is likely to suck), I think we should not report any audio/video stuff it typefinds to make sure our typefinders are prefered (they're likely to be better *and* return GStreamer *media* types).

For all other types, we should take into account the probability reported IMHO, instead of suggesting everything with the same probability. The probabilities xdg reports seem quite conservative at first glance. They should nevertheless be clamped to make sure only strong xdg results trump weak gst typefind results.

But maybe this is not an issue at all (media tests ran fine, didn't they?)
Comment 1 Tim-Philipp Müller 2009-03-13 00:18:04 UTC
Created attachment 130562 [details] [review]
proposed patch
Comment 2 Edward Hervey 2009-03-13 07:20:23 UTC
I did see some 'failures' with xdgmime when runnning the QA testsuite... but those were for previously failing files (not because of xdgmime obviously) so I didn't raise my voice more than that.

+1 from me to commit this in the prerelease
Comment 3 Sebastian Dröge (slomo) 2009-03-13 09:34:18 UTC
I don't think the prio of xdgmime has anything to do with the probability... if you take a look at the freedesktop.xml mime database you'll notice that the priority is more or less a random value for the <magic> blocks, which only makes sure that, if more than one <magic> block is matching, that the one with the highest priority is chosen.

Blacklisting audio/* and video/* sounds good to me though :)
Comment 4 Tim-Philipp Müller 2009-03-13 19:50:41 UTC
Created attachment 130602 [details] [review]
same as before, just without abusing the priority value as typefind probability
Comment 5 Jan Schmidt 2009-03-13 22:02:39 UTC
Grand so - plz commit.
Comment 6 Tim-Philipp Müller 2009-03-13 22:56:22 UTC
(In reply to comment #4)
> Created an attachment (id=130602) [edit]
> same as before, just without abusing the priority value as typefind probability
>