mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-11 10:34:11 +00:00
matroskamux: use A_AAC instead of A_AAC/MPEGx/y
Some GoogleCast compatible devices ignore A_AAC/MPEGx/y tracks; Also according to http://wiki.multimedia.cx/index.php?title=Matroska A_AAC/MPEGx/y is obsolete https://bugzilla.gnome.org/show_bug.cgi?id=761144
This commit is contained in:
parent
e1834d1512
commit
e7460d9c06
1 changed files with 5 additions and 46 deletions
|
@ -1687,42 +1687,6 @@ wrong_content_type:
|
|||
}
|
||||
}
|
||||
|
||||
static const gchar *
|
||||
aac_codec_data_to_codec_id (GstBuffer * buf)
|
||||
{
|
||||
const gchar *result;
|
||||
guint8 profile;
|
||||
|
||||
/* default to MAIN */
|
||||
profile = 1;
|
||||
|
||||
if (gst_buffer_get_size (buf) >= 2) {
|
||||
gst_buffer_extract (buf, 0, &profile, 1);
|
||||
profile >>= 3;
|
||||
}
|
||||
|
||||
switch (profile) {
|
||||
case 1:
|
||||
result = "MAIN";
|
||||
break;
|
||||
case 2:
|
||||
result = "LC";
|
||||
break;
|
||||
case 3:
|
||||
result = "SSR";
|
||||
break;
|
||||
case 4:
|
||||
result = "LTP";
|
||||
break;
|
||||
default:
|
||||
GST_WARNING ("unknown AAC profile, defaulting to MAIN");
|
||||
result = "MAIN";
|
||||
break;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_matroska_mux_audio_pad_setcaps:
|
||||
* @pad: Pad which got the caps.
|
||||
|
@ -1840,16 +1804,11 @@ gst_matroska_mux_audio_pad_setcaps (GstPad * pad, GstCaps * caps)
|
|||
}
|
||||
|
||||
if (buf) {
|
||||
if (mpegversion == 2)
|
||||
context->codec_id =
|
||||
g_strdup_printf (GST_MATROSKA_CODEC_ID_AUDIO_AAC_MPEG2 "%s",
|
||||
aac_codec_data_to_codec_id (buf));
|
||||
else if (mpegversion == 4)
|
||||
context->codec_id =
|
||||
g_strdup_printf (GST_MATROSKA_CODEC_ID_AUDIO_AAC_MPEG4 "%s",
|
||||
aac_codec_data_to_codec_id (buf));
|
||||
else
|
||||
g_assert_not_reached ();
|
||||
context->codec_id = g_strdup (GST_MATROSKA_CODEC_ID_AUDIO_AAC);
|
||||
context->codec_priv_size = gst_buffer_get_size (buf);
|
||||
context->codec_priv = g_malloc (context->codec_priv_size);
|
||||
gst_buffer_extract (buf, 0, context->codec_priv,
|
||||
context->codec_priv_size);
|
||||
} else {
|
||||
GST_DEBUG_OBJECT (mux, "no AAC codec_data; not packetized");
|
||||
goto refuse_caps;
|
||||
|
|
Loading…
Reference in a new issue