mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
multipartdemux: add more mime types
Add mime-type for Panasonic g726 and add more required caps properties for other G726 mime-types. Make mime-types case insensitive. See #582169
This commit is contained in:
parent
54afebf426
commit
c50edb8145
1 changed files with 15 additions and 7 deletions
|
@ -60,7 +60,7 @@ static const GstElementDetails gst_multipart_demux_details =
|
||||||
GST_ELEMENT_DETAILS ("Multipart demuxer",
|
GST_ELEMENT_DETAILS ("Multipart demuxer",
|
||||||
"Codec/Demuxer",
|
"Codec/Demuxer",
|
||||||
"demux multipart streams",
|
"demux multipart streams",
|
||||||
"Wim Taymans <wim@fluendo.com>, Sjoerd Simons <sjoerd@luon.net>");
|
"Wim Taymans <wim.taymans@gmail.com>, Sjoerd Simons <sjoerd@luon.net>");
|
||||||
|
|
||||||
|
|
||||||
/* signals and args */
|
/* signals and args */
|
||||||
|
@ -99,14 +99,22 @@ typedef struct
|
||||||
const gchar *val;
|
const gchar *val;
|
||||||
} GstNamesMap;
|
} GstNamesMap;
|
||||||
|
|
||||||
/* convert from mime types to gst structure names. Add more when needed. */
|
/* convert from mime types to gst structure names. Add more when needed. The
|
||||||
|
* mime-type is stored as lowercase */
|
||||||
static const GstNamesMap gstnames[] = {
|
static const GstNamesMap gstnames[] = {
|
||||||
/* RFC 2046 says audio/basic is mulaw, mono, 8000Hz */
|
/* RFC 2046 says audio/basic is mulaw, mono, 8000Hz */
|
||||||
{"audio/basic", "audio/x-mulaw, channels=1, rate=8000"},
|
{"audio/basic", "audio/x-mulaw, channels=1, rate=8000"},
|
||||||
{"audio/G726-16", "audio/x-adpcm, bitrate=16000"},
|
{"audio/g726-16",
|
||||||
{"audio/G726-24", "audio/x-adpcm, bitrate=24000"},
|
"audio/x-adpcm, bitrate=16000, layout=g726, channels=1, rate=8000"},
|
||||||
{"audio/G726-32", "audio/x-adpcm, bitrate=32000"},
|
{"audio/g726-24",
|
||||||
{"audio/G726-40", "audio/x-adpcm, bitrate=40000"},
|
"audio/x-adpcm, bitrate=24000, layout=g726, channels=1, rate=8000"},
|
||||||
|
{"audio/g726-32",
|
||||||
|
"audio/x-adpcm, bitrate=32000, layout=g726, channels=1, rate=8000"},
|
||||||
|
{"audio/g726-40",
|
||||||
|
"audio/x-adpcm, bitrate=40000, layout=g726, channels=1, rate=8000"},
|
||||||
|
/* Panasonic Network Cameras non-standard types */
|
||||||
|
{"audio/g726",
|
||||||
|
"audio/x-adpcm, bitrate=32000, layout=g726, channels=1, rate=8000"},
|
||||||
{NULL, NULL}
|
{NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -420,7 +428,7 @@ multipart_parse_header (GstMultipartDemux * multipart)
|
||||||
|
|
||||||
if (len >= 14 && !g_ascii_strncasecmp ("content-type:", (gchar *) pos, 13)) {
|
if (len >= 14 && !g_ascii_strncasecmp ("content-type:", (gchar *) pos, 13)) {
|
||||||
g_free (multipart->mime_type);
|
g_free (multipart->mime_type);
|
||||||
multipart->mime_type = g_strndup ((gchar *) pos + 14, len - 14);
|
multipart->mime_type = g_ascii_strdown ((gchar *) pos + 14, len - 14);
|
||||||
} else if (len >= 15 &&
|
} else if (len >= 15 &&
|
||||||
!g_ascii_strncasecmp ("content-length:", (gchar *) pos, 15)) {
|
!g_ascii_strncasecmp ("content-length:", (gchar *) pos, 15)) {
|
||||||
multipart->content_length =
|
multipart->content_length =
|
||||||
|
|
Loading…
Reference in a new issue