[gst-devel] new tta audio decoder plugin

Arwed von Merkatz a.v.merkatz at t-online.de
Sat May 29 05:25:09 CEST 2004


Hi,

I've written a plugin to parse and decode TTA[1] audio files.
I'm making it available as a seperate tarball because I'm not sure where
it should be put in the gst-plugins source tree. The plugin currently
doesn't use any external libraries, but that may change if the TTA
author releases a more flexible library (which is planned as far as I
know).
Addition to the typefind functions for the tta format are in the
attached patch. For playback of id3 tagged TTA files the patch of bug
#142851 has to be applied.

Plugin tarball can be found at
http://w3studi.informatik.uni-stuttgart.de/~vonmerad/gst-tta-0.1.0.tar.gz


[1] http://tta.iszf.irk.ru/

-- 
Arwed v. Merkatz                              Source Mage GNU/Linux developer
                                                    http://www.sourcemage.org
-------------- next part --------------
Index: gst/typefind/gsttypefindfunctions.c
===================================================================
RCS file: /cvs/gstreamer/gst-plugins/gst/typefind/gsttypefindfunctions.c,v
retrieving revision 1.41
diff -u -r1.41 gsttypefindfunctions.c
--- a/gst/typefind/gsttypefindfunctions.c	7 May 2004 00:43:50 -0000	1.41
+++ b/gst/typefind/gsttypefindfunctions.c	29 May 2004 11:55:10 -0000
@@ -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 **************************************************************/
 
 /**
@@ -1271,7 +1289,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
@@ -1328,6 +1347,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,


More information about the gstreamer-devel mailing list