summaryrefslogtreecommitdiffstats
path: root/ext/audiofile/gstaftypes.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/audiofile/gstaftypes.c')
-rw-r--r--ext/audiofile/gstaftypes.c26
1 files changed, 24 insertions, 2 deletions
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