amrnb: Add the new layout field to the raw audio caps

This commit is contained in:
Sebastian Dröge 2012-01-04 15:42:29 +01:00
parent 7fea0ed2f5
commit 3eae4839f2
2 changed files with 4 additions and 0 deletions

View file

@ -48,6 +48,7 @@ static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC, GST_PAD_SRC,
GST_PAD_ALWAYS, GST_PAD_ALWAYS,
GST_STATIC_CAPS ("audio/x-raw, format = (string) " GST_AUDIO_NE (S16) ", " GST_STATIC_CAPS ("audio/x-raw, format = (string) " GST_AUDIO_NE (S16) ", "
"layout = (string) interleaved, "
"rate = (int) 8000," "channels = (int) 1") "rate = (int) 8000," "channels = (int) 1")
); );
@ -222,8 +223,10 @@ gst_amrnbdec_set_format (GstAudioDecoder * dec, GstCaps * caps)
/* create reverse caps */ /* create reverse caps */
copy = gst_caps_new_simple ("audio/x-raw", copy = gst_caps_new_simple ("audio/x-raw",
"format", G_TYPE_STRING, GST_AUDIO_NE (S16), "format", G_TYPE_STRING, GST_AUDIO_NE (S16),
"layout", G_TYPE_STRING, "interleaved",
"channels", G_TYPE_INT, amrnbdec->channels, "channels", G_TYPE_INT, amrnbdec->channels,
"rate", G_TYPE_INT, amrnbdec->rate, NULL); "rate", G_TYPE_INT, amrnbdec->rate, NULL);
gst_audio_decoder_set_outcaps (dec, copy); gst_audio_decoder_set_outcaps (dec, copy);
gst_caps_unref (copy); gst_caps_unref (copy);

View file

@ -76,6 +76,7 @@ static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK, GST_PAD_SINK,
GST_PAD_ALWAYS, GST_PAD_ALWAYS,
GST_STATIC_CAPS ("audio/x-raw, format = (string) " GST_AUDIO_NE (S16) ", " GST_STATIC_CAPS ("audio/x-raw, format = (string) " GST_AUDIO_NE (S16) ", "
"layout = (string) interleaved, "
"rate = (int) 8000," "channels = (int) 1") "rate = (int) 8000," "channels = (int) 1")
); );