summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorSteve Baker <steve@stevebaker.org>2002-04-26 12:42:32 +0000
committerSteve Baker <steve@stevebaker.org>2002-04-26 12:42:32 +0000
commit0f0b1f647df309f562a39c636d8d64973cb27c8d (patch)
tree4b34284fe24979ddf2175891f37c6a11bb38a8b5 /ext
parent7f0aaf66477cb9c37507855e682a4309c9a047c5 (diff)
downloadgst-plugins-bad-0f0b1f647df309f562a39c636d8d64973cb27c8d.tar.gz
gst-plugins-bad-0f0b1f647df309f562a39c636d8d64973cb27c8d.tar.bz2
gst-plugins-bad-0f0b1f647df309f562a39c636d8d64973cb27c8d.zip
use correct mime type for the types supported by audiofile
Original commit message from CVS: use correct mime type for the types supported by audiofile
Diffstat (limited to 'ext')
-rw-r--r--ext/audiofile/gstafparse.c14
-rw-r--r--ext/audiofile/gstaftypes.c26
2 files changed, 36 insertions, 4 deletions
diff --git a/ext/audiofile/gstafparse.c b/ext/audiofile/gstafparse.c
index 11deb600..0e4876dd 100644
--- a/ext/audiofile/gstafparse.c
+++ b/ext/audiofile/gstafparse.c
@@ -72,8 +72,18 @@ GST_PAD_TEMPLATE_FACTORY (afparse_sink_factory,
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_CAPS_NEW (
- "afparse_sink",
- "audio/audiofile",
+ "afparse_sink_aiff",
+ "audio/x-aiff",
+ NULL
+ ),
+ GST_CAPS_NEW (
+ "afparse_sink_wav",
+ "audio/x-wav",
+ NULL
+ ),
+ GST_CAPS_NEW (
+ "afparse_sink_snd",
+ "audio/basic",
NULL
)
)
diff --git a/ext/audiofile/gstaftypes.c b/ext/audiofile/gstaftypes.c
index 0a718c5a..8765f2b5 100644
--- a/ext/audiofile/gstaftypes.c
+++ b/ext/audiofile/gstaftypes.c
@@ -36,7 +36,9 @@ static long gst_aftypes_vf_tell (AFvirtualfile *vfile);
static GstCaps* gst_aftypes_type_find(GstBuffer *buf, gpointer private);
static GstTypeDefinition aftype_definitions[] = {
- { "aftypes audio/audiofile", "audio/audiofile", ".wav .aiff .aif .aifc", gst_aftypes_type_find },
+ { "aftypes audio/x-aiff", "audio/x-aiff", ".aiff .aif .aifc", gst_aftypes_type_find },
+ { "aftypes audio/x-wav", "audio/x-wav", ".wav", gst_aftypes_type_find },
+ { "aftypes audio/basic", "audio/basic", ".au .snd", gst_aftypes_type_find },
{ NULL, NULL, NULL, NULL },
};
@@ -54,6 +56,7 @@ gst_aftypes_type_find(GstBuffer *buf, gpointer private)
AFvirtualfile *vfile;
AFfilehandle file;
int file_format, format_version;
+ gchar *type;
g_print("calling gst_aftypes_type_find\n");
@@ -80,8 +83,27 @@ gst_aftypes_type_find(GstBuffer *buf, gpointer private)
file_format == AF_FILE_RAWDATA){
return NULL;
}
+ switch (file_format){
+ case AF_FILE_AIFF:
+ case AF_FILE_AIFFC:
+ type = "audio/x-aiff";
+ break;
+ case AF_FILE_WAVE:
+ type = "audio/x-wav";
+ break;
+ case AF_FILE_NEXTSND:
+ type = "audio/basic";
+ break;
+ default:
+ type=NULL;
+ break;
+ }
+
+ if (type != NULL){
+ return gst_caps_new ("audiofile_type_find", type, NULL);
+ }
- return gst_caps_new ("audiofile_type_find", "audio/audiofile", NULL);
+ return NULL;
}
static gboolean