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 651294 - WBMP images are not supported by typefind
WBMP images are not supported by typefind
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: 0.10.36
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-05-27 22:02 UTC by Patrick McCarty
Modified: 2011-06-15 17:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch to fix the issue (1.55 KB, patch)
2011-05-27 22:03 UTC, Patrick McCarty
needs-work Details | Review
patch that adds a description of this file type (942 bytes, patch)
2011-05-27 22:04 UTC, Patrick McCarty
reviewed Details | Review
typefinding: add typefinder for WAP WBMP bitmaps (2.48 KB, patch)
2011-06-02 00:01 UTC, Tim-Philipp Müller
none Details | Review

Description Patrick McCarty 2011-05-27 22:02:01 UTC
The WBMP image format is supported by the gdkpixbufdec plugin, but typefind does not currently support WBMP files.  As far as I can see, typefind must support WBMP before decodebin2 can successfully decode this filetype.
Comment 1 Patrick McCarty 2011-05-27 22:03:01 UTC
Created attachment 188785 [details] [review]
proposed patch to fix the issue
Comment 2 Patrick McCarty 2011-05-27 22:04:01 UTC
Created attachment 188786 [details] [review]
patch that adds a description of this file type
Comment 3 Tim-Philipp Müller 2011-05-27 22:55:58 UTC
Comment on attachment 188785 [details] [review]
proposed patch to fix the issue

>+  TYPE_FIND_REGISTER_START_WITH (plugin, "image/vnd.wap.wbmp",
>+      GST_RANK_SECONDARY, wbmp_exts, "\000\000", 2,
>+      GST_TYPE_FIND_LIKELY);

Every file with two zero bytes at the beginning is likely to be a wbmp file? :-)
Comment 4 Patrick McCarty 2011-05-27 23:36:43 UTC
(In reply to comment #3)
> (From update of attachment 188785 [details] [review])
> >+  TYPE_FIND_REGISTER_START_WITH (plugin, "image/vnd.wap.wbmp",
> >+      GST_RANK_SECONDARY, wbmp_exts, "\000\000", 2,
> >+      GST_TYPE_FIND_LIKELY);
> 
> Every file with two zero bytes at the beginning is likely to be a wbmp file?
> :-)

Of course not :-)

I assume that using the TYPE_FIND_REGISTER macro would be more appropriate in this case?
Comment 5 David Schleef 2011-05-28 06:24:36 UTC
yes.
Comment 6 Matthias Clasen 2011-05-28 23:33:07 UTC
I wouldn't recommend taking the existence of the wbmp image loader as a sign of any level of 'support'. It is barely functional, and the image format is pretty fringe.
Comment 7 Sebastian Dröge (slomo) 2011-05-30 06:24:52 UTC
Adding a reliable typefinder for wbmp will be almost impossible, the header only contains the 2 zero-bytes and the width/height of the image.
Comment 8 Tim-Philipp Müller 2011-06-02 00:01:48 UTC
Created attachment 189052 [details] [review]
typefinding: add typefinder for WAP WBMP bitmaps

> Adding a reliable typefinder for wbmp will be almost
> impossible, the header only contains the 2 zero-bytes
> and the width/height of the image.

True, though this patch seems to work well enough. Not sure how 'reliable' it has to be. If it's plausible enough and no other typefinder claims it, we may just as well go for it. Worst case scenario is that the user gets to see an image with random black and white snow.

gdkpixbufdec doesn't actually seem to decode it though (might be a problem in the plugin, however).
Comment 9 Tim-Philipp Müller 2011-06-02 13:41:30 UTC
Added the rudimentary typefinder nevertheless, mostly just "because we can":

 commit a9a85bbac1c6bf6807a8ef7280336e339d70d006
 Author: Patrick McCarty <patrick.mccarty@intel.com>
 Date:   Fri May 27 14:41:39 2011 -0700

    pbutils: add description for wbmp images.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=651294

 commit d10a7b439b1dfe84be0c3c4f3e8823ceac002765
 Author: Tim-Philipp Müller <tim.muller@collabora.co.uk>
 Date:   Thu Jun 2 00:55:41 2011 +0100

    typefinding: add typefinder for WAP WBMP bitmaps
    
    https://bugzilla.gnome.org/show_bug.cgi?id=651294