From: <ar...@fr...> - 2004-08-25 14:13:09
|
CVS Root: /cvs/gstreamer Module: gst-plugins Changes by: arwed Date: Wed Aug 25 2004 07:13:06 PDT Log message: Typefinding for TTA files, fixes bug #148711. Modified files: . : ChangeLog gst/typefind : gsttypefindfunctions.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins/ChangeLog.diff?r1=1.1021&r2=1.1022 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins/gst/typefind/gsttypefindfunctions.c.diff?r1=1.45&r2=1.46 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-plugins/ChangeLog,v retrieving revision 1.1021 retrieving revision 1.1022 diff -u -d -r1.1021 -r1.1022 --- ChangeLog 25 Aug 2004 12:27:59 -0000 1.1021 +++ ChangeLog 25 Aug 2004 14:12:52 -0000 1.1022 @@ -2,6 +2,8 @@ * gst/matroska/matroska-demux.c: (gst_matroska_demux_parse_blockgroup), send vorbis headers at the beginning of a stream, fixes bug #141554. + * gst/typefind/gsttypefindfunctions.c: (tta_type_find), (plugin_init), + enable typefinding for TTA audio files, fixes bug #148711. 2004-08-24 Sebastien Cote <sc...@he...> Index: gsttypefindfunctions.c RCS file: /cvs/gstreamer/gst-plugins/gst/typefind/gsttypefindfunctions.c,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- gsttypefindfunctions.c 3 Aug 2004 14:28:12 -0000 1.45 +++ gsttypefindfunctions.c 25 Aug 2004 14:12:54 -0000 1.46 @@ -190,6 +190,24 @@ } } +/*** audio/x-tta *************************************************************/ + +static GstStaticCaps tta_caps = GST_STATIC_CAPS ("audio/x-tta"); +#define TTA_CAPS gst_static_caps_get(&tta_caps) +static void +tta_type_find (GstTypeFind * tf, gpointer unused) +{ + guint8 *data = gst_type_find_peek (tf, 0, 3); + if (data) { + if (memcmp (data, "TTA", 3) == 0) { + gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, TTA_CAPS); + return; + } + } +} /*** audio/mpeg version 2, 4 *************************************************/ static GstStaticCaps aac_caps = GST_STATIC_CAPS ("audio/mpeg, " @@ -1308,7 +1326,8 @@ static gchar *flac_exts[] = { "flac", NULL }; static gchar *flx_exts[] = { "flc", "fli", NULL }; static gchar *id3_exts[] = - { "mp3", "mp2", "mp1", "mpga", "ogg", "flac", NULL }; + { "mp3", "mp2", "mp1", "mpga", "ogg", "flac", "tta", NULL }; + static gchar *tta_exts[] = { "tta", NULL }; static gchar *mod_exts[] = { "669", "amf", "dsm", "gdm", "far", "imf", "it", "med", "mod", "mtm", "okt", "sam", "s3m", "stm", "stx", "ult", "xm", NULL @@ -1366,6 +1385,8 @@ flx_exts, FLX_CAPS, NULL); TYPE_FIND_REGISTER (plugin, "application/x-id3", GST_RANK_PRIMARY, id3_type_find, id3_exts, ID3_CAPS, NULL); + TYPE_FIND_REGISTER (plugin, "audio/x-tta", GST_RANK_PRIMARY, + tta_type_find, tta_exts, TTA_CAPS, NULL); TYPE_FIND_REGISTER (plugin, "audio/x-mod", GST_RANK_SECONDARY, mod_type_find, mod_exts, MOD_CAPS, NULL); TYPE_FIND_REGISTER (plugin, "audio/mpeg", GST_RANK_PRIMARY, mp3_type_find, |