[0.11] gst-plugins-base: typefind: extract SOF marker in jpeg typefinder

Wim Taymans wtay at kemper.freedesktop.org
Fri Oct 28 02:37:13 PDT 2011


Module: gst-plugins-base
Branch: 0.11
Commit: 88491ff2e7822c5ad09b648dd4bae0844ac22946
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=88491ff2e7822c5ad09b648dd4bae0844ac22946

Author: Philip Jägenstedt <philipj at opera.com>
Date:   Tue Apr 26 22:20:29 2011 +0200

typefind: extract SOF marker in jpeg typefinder

The SOF types are defined by http://www.w3.org/Graphics/JPEG/itu-t81.pdf

This is needed to make sure that we plug a jpeg decoder that
can handle the type of JPEG we have (e.g. lossless JPEG)

https://bugzilla.gnome.org/show_bug.cgi?id=556648

---

 gst/typefind/gsttypefindfunctions.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/gst/typefind/gsttypefindfunctions.c b/gst/typefind/gsttypefindfunctions.c
index 2e2a567..1675add 100644
--- a/gst/typefind/gsttypefindfunctions.c
+++ b/gst/typefind/gsttypefindfunctions.c
@@ -3012,7 +3012,9 @@ jpeg_type_find (GstTypeFind * tf, gpointer unused)
         prob = GST_TYPE_FIND_LIKELY;
 
       gst_caps_set_simple (caps, "width", G_TYPE_INT, w,
-          "height", G_TYPE_INT, h, NULL);
+          "height", G_TYPE_INT, h, "sof-marker", G_TYPE_INT, marker & 0xf,
+          NULL);
+
       break;
     } else {
       GST_WARNING ("bad length or unexpected JPEG marker 0xff 0x%02x", marker);



More information about the gstreamer-commits mailing list