mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
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
This commit is contained in:
parent
7f0aaf6647
commit
0f0b1f647d
2 changed files with 36 additions and 4 deletions
|
@ -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
|
||||
)
|
||||
)
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
return gst_caps_new ("audiofile_type_find", "audio/audiofile", NULL);
|
||||
if (type != NULL){
|
||||
return gst_caps_new ("audiofile_type_find", type, NULL);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
Loading…
Reference in a new issue