gst/typefind/gsttypefindfunctions.c: Bump rank of jpeg and png typefinders, which...
authorTim-Philipp Müller <tim@centricular.net>
Mon, 11 Feb 2008 13:03:13 +0000 (13:03 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Mon, 11 Feb 2008 13:03:13 +0000 (13:03 +0000)
Original commit message from CVS:
* gst/typefind/gsttypefindfunctions.c:
Bump rank of jpeg and png typefinders, which will return maximum
probability in the most common cases (thus short-circuiting more
expensive typefinders like the mp3 one for these two quite common
image types).

ChangeLog
gst/typefind/gsttypefindfunctions.c

index f69be8e..7600ec4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-02-11  Tim-Philipp Müller  <tim at centricular dot net>
+
+       * gst/typefind/gsttypefindfunctions.c:
+         Bump rank of jpeg and png typefinders, which will return maximum
+         probability in the most common cases (thus short-circuiting more
+         expensive typefinders like the mp3 one for these two quite common
+         image types).
+
 2008-02-11  Sebastian Dröge  <slomo@circular-chaos.org>
 
        * ext/theora/theoraparse.c:
index 926c33d..c7374aa 100644 (file)
@@ -2898,11 +2898,11 @@ plugin_init (GstPlugin * plugin)
       GST_TYPE_FIND_MAXIMUM);
   TYPE_FIND_REGISTER (plugin, "video/x-fli", GST_RANK_MARGINAL, flx_type_find,
       flx_exts, FLX_CAPS, NULL, NULL);
-  TYPE_FIND_REGISTER (plugin, "application/x-id3v2", GST_RANK_PRIMARY + 3,
+  TYPE_FIND_REGISTER (plugin, "application/x-id3v2", GST_RANK_PRIMARY + 103,
       id3v2_type_find, id3_exts, ID3_CAPS, NULL, NULL);
-  TYPE_FIND_REGISTER (plugin, "application/x-id3v1", GST_RANK_PRIMARY + 1,
+  TYPE_FIND_REGISTER (plugin, "application/x-id3v1", GST_RANK_PRIMARY + 101,
       id3v1_type_find, id3_exts, ID3_CAPS, NULL, NULL);
-  TYPE_FIND_REGISTER (plugin, "application/x-apetag", GST_RANK_PRIMARY + 2,
+  TYPE_FIND_REGISTER (plugin, "application/x-apetag", GST_RANK_PRIMARY + 102,
       apetag_type_find, apetag_exts, APETAG_CAPS, NULL, NULL);
   TYPE_FIND_REGISTER (plugin, "audio/x-ttafile", GST_RANK_PRIMARY,
       tta_type_find, tta_exts, TTA_CAPS, NULL, NULL);
@@ -2980,11 +2980,11 @@ plugin_init (GstPlugin * plugin)
       shn_type_find, shn_exts, SHN_CAPS, NULL, NULL);
   TYPE_FIND_REGISTER (plugin, "application/x-ape", GST_RANK_SECONDARY,
       ape_type_find, ape_exts, APE_CAPS, NULL, NULL);
-  TYPE_FIND_REGISTER (plugin, "image/jpeg", GST_RANK_PRIMARY, jpeg_type_find,
-      jpeg_exts, JPEG_CAPS, NULL, NULL);
+  TYPE_FIND_REGISTER (plugin, "image/jpeg", GST_RANK_PRIMARY + 15,
+      jpeg_type_find, jpeg_exts, JPEG_CAPS, NULL, NULL);
   TYPE_FIND_REGISTER_START_WITH (plugin, "image/gif", GST_RANK_PRIMARY,
       gif_exts, "GIF8", 4, GST_TYPE_FIND_MAXIMUM);
-  TYPE_FIND_REGISTER_START_WITH (plugin, "image/png", GST_RANK_PRIMARY,
+  TYPE_FIND_REGISTER_START_WITH (plugin, "image/png", GST_RANK_PRIMARY + 14,
       png_exts, "\211PNG\015\012\032\012", 8, GST_TYPE_FIND_MAXIMUM);
   TYPE_FIND_REGISTER (plugin, "image/bmp", GST_RANK_PRIMARY, bmp_type_find,
       bmp_exts, BMP_CAPS, NULL, NULL);