From: Jonathan Matthew Date: Sat, 30 Aug 2008 15:55:06 +0000 (+0000) Subject: gst/typefind/gsttypefindfunctions.c: Add typefinder for PDF documents (which is nice... X-Git-Tag: 1.19.3~511^2~10298 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=686a893a0f0b1d703e697e7d53b727cf2ffe4a64;p=platform%2Fupstream%2Fgstreamer.git gst/typefind/gsttypefindfunctions.c: Add typefinder for PDF documents (which is nice to have, since it's a common for... Original commit message from CVS: Patch by: Jonathan Matthew * gst/typefind/gsttypefindfunctions.c: (plugin_init): Add typefinder for PDF documents (which is nice to have, since it's a common format, but also helps prevent false positives). Fixes #549814. --- diff --git a/ChangeLog b/ChangeLog index 9bcf808..ffb171b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-08-30 Tim-Philipp Müller + + Patch by: Jonathan Matthew + + * gst/typefind/gsttypefindfunctions.c: (plugin_init): + Add typefinder for PDF documents (which is nice to have, since it's a + common format, but also helps prevent false positives). Fixes #549814. + 2008-08-27 Wim Taymans * gst/playback/gstplaybin2.c: (selector_blocked), (pad_added_cb), diff --git a/gst/typefind/gsttypefindfunctions.c b/gst/typefind/gsttypefindfunctions.c index 8c05db1..071dc6d 100644 --- a/gst/typefind/gsttypefindfunctions.c +++ b/gst/typefind/gsttypefindfunctions.c @@ -3013,6 +3013,7 @@ plugin_init (GstPlugin * plugin) static gchar *nsf_exts[] = { "nsf", NULL }; static gchar *mid_exts[] = { "mid", "midi", NULL }; static gchar *imelody_exts[] = { "imy", "ime", "imelody", NULL }; + static gchar *pdf_exts[] = { "pdf", NULL }; GST_DEBUG_CATEGORY_INIT (type_find_debug, "typefindfunctions", GST_DEBUG_FG_GREEN | GST_DEBUG_BG_RED, "generic type find functions"); @@ -3220,6 +3221,8 @@ plugin_init (GstPlugin * plugin) vivo_type_find, vivo_exts, VIVO_CAPS, NULL, NULL); TYPE_FIND_REGISTER_START_WITH (plugin, "audio/x-nsf", GST_RANK_SECONDARY, nsf_exts, "NESM\x1a", 5, GST_TYPE_FIND_MAXIMUM); + TYPE_FIND_REGISTER_START_WITH (plugin, "application/pdf", + GST_RANK_SECONDARY, pdf_exts, "%PDF-", 5, GST_TYPE_FIND_LIKELY); return TRUE; }