mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
ext: Add new layout field to the raw audio caps
This commit is contained in:
parent
5bdf6b3383
commit
75f91ebea0
5 changed files with 8 additions and 1 deletions
|
@ -102,6 +102,7 @@ static GstStaticPadTemplate alsasink_sink_factory =
|
||||||
GST_PAD_ALWAYS,
|
GST_PAD_ALWAYS,
|
||||||
GST_STATIC_CAPS ("audio/x-raw, "
|
GST_STATIC_CAPS ("audio/x-raw, "
|
||||||
"format = (string) " GST_AUDIO_FORMATS_ALL ", "
|
"format = (string) " GST_AUDIO_FORMATS_ALL ", "
|
||||||
|
"layout = (string) interleaved, "
|
||||||
"rate = (int) [ 1, MAX ], " "channels = (int) [ 1, MAX ]; "
|
"rate = (int) [ 1, MAX ], " "channels = (int) [ 1, MAX ]; "
|
||||||
"audio/x-iec958")
|
"audio/x-iec958")
|
||||||
);
|
);
|
||||||
|
|
|
@ -107,6 +107,7 @@ GST_STATIC_PAD_TEMPLATE ("src",
|
||||||
GST_PAD_ALWAYS,
|
GST_PAD_ALWAYS,
|
||||||
GST_STATIC_CAPS ("audio/x-raw, "
|
GST_STATIC_CAPS ("audio/x-raw, "
|
||||||
"format = (string) " GST_AUDIO_FORMATS_ALL ", "
|
"format = (string) " GST_AUDIO_FORMATS_ALL ", "
|
||||||
|
"layout = (string) interleaved, "
|
||||||
"rate = (int) [ 1, MAX ], " "channels = (int) [ 1, MAX ]")
|
"rate = (int) [ 1, MAX ], " "channels = (int) [ 1, MAX ]")
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -113,7 +113,7 @@ static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||||
GST_PAD_ALWAYS,
|
GST_PAD_ALWAYS,
|
||||||
GST_STATIC_CAPS ("audio/x-raw, "
|
GST_STATIC_CAPS ("audio/x-raw, "
|
||||||
"format = (string) " GST_AUDIO_NE (S16) ", "
|
"format = (string) " GST_AUDIO_NE (S16) ", "
|
||||||
"channels = (int) { 1, 2 }, "
|
"layout = (string) interleaved, " "channels = (int) { 1, 2 }, "
|
||||||
#if defined(VISUAL_API_VERSION) && VISUAL_API_VERSION >= 4000 && VISUAL_API_VERSION < 5000
|
#if defined(VISUAL_API_VERSION) && VISUAL_API_VERSION >= 4000 && VISUAL_API_VERSION < 5000
|
||||||
"rate = (int) { 8000, 11250, 22500, 32000, 44100, 48000, 96000 }"
|
"rate = (int) { 8000, 11250, 22500, 32000, 44100, 48000, 96000 }"
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -1651,6 +1651,7 @@ setup_pcm_mapper (GstOggStream * pad, ogg_packet * packet)
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_caps_set_simple (caps,
|
gst_caps_set_simple (caps,
|
||||||
|
"layout", G_TYPE_STRING, "interleaved",
|
||||||
"rate", G_TYPE_INT, pad->granulerate_n,
|
"rate", G_TYPE_INT, pad->granulerate_n,
|
||||||
"channels", G_TYPE_INT, channels, NULL);
|
"channels", G_TYPE_INT, channels, NULL);
|
||||||
pad->caps = caps;
|
pad->caps = caps;
|
||||||
|
|
|
@ -64,6 +64,7 @@ GST_STATIC_PAD_TEMPLATE ("sink",
|
||||||
GST_PAD_ALWAYS,
|
GST_PAD_ALWAYS,
|
||||||
GST_STATIC_CAPS ("audio/x-raw, "
|
GST_STATIC_CAPS ("audio/x-raw, "
|
||||||
"format = (string) " GST_AUDIO_NE (F32) ", "
|
"format = (string) " GST_AUDIO_NE (F32) ", "
|
||||||
|
"layout = (string) interleaved, "
|
||||||
"rate = (int) [ 1, 200000 ], " "channels = (int) [ 1, 255 ]")
|
"rate = (int) [ 1, 200000 ], " "channels = (int) [ 1, 255 ]")
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -260,6 +261,7 @@ gst_vorbis_enc_generate_sink_caps (void)
|
||||||
|
|
||||||
gst_caps_append_structure (caps, gst_structure_new ("audio/x-raw",
|
gst_caps_append_structure (caps, gst_structure_new ("audio/x-raw",
|
||||||
"format", G_TYPE_STRING, GST_AUDIO_NE (F32),
|
"format", G_TYPE_STRING, GST_AUDIO_NE (F32),
|
||||||
|
"layout", G_TYPE_STRING, "interleaved",
|
||||||
"rate", GST_TYPE_INT_RANGE, 1, 200000,
|
"rate", GST_TYPE_INT_RANGE, 1, 200000,
|
||||||
"channels", G_TYPE_INT, 1, NULL));
|
"channels", G_TYPE_INT, 1, NULL));
|
||||||
|
|
||||||
|
@ -274,6 +276,7 @@ gst_vorbis_enc_generate_sink_caps (void)
|
||||||
|
|
||||||
structure = gst_structure_new ("audio/x-raw",
|
structure = gst_structure_new ("audio/x-raw",
|
||||||
"format", G_TYPE_STRING, GST_AUDIO_NE (F32),
|
"format", G_TYPE_STRING, GST_AUDIO_NE (F32),
|
||||||
|
"layout", G_TYPE_STRING, "interleaved",
|
||||||
"rate", GST_TYPE_INT_RANGE, 1, 200000, "channels", G_TYPE_INT, i,
|
"rate", GST_TYPE_INT_RANGE, 1, 200000, "channels", G_TYPE_INT, i,
|
||||||
"channel-mask", GST_TYPE_BITMASK, channel_mask, NULL);
|
"channel-mask", GST_TYPE_BITMASK, channel_mask, NULL);
|
||||||
|
|
||||||
|
@ -282,6 +285,7 @@ gst_vorbis_enc_generate_sink_caps (void)
|
||||||
|
|
||||||
gst_caps_append_structure (caps, gst_structure_new ("audio/x-raw",
|
gst_caps_append_structure (caps, gst_structure_new ("audio/x-raw",
|
||||||
"format", G_TYPE_STRING, GST_AUDIO_NE (F32),
|
"format", G_TYPE_STRING, GST_AUDIO_NE (F32),
|
||||||
|
"layout", G_TYPE_STRING, "interleaved",
|
||||||
"rate", GST_TYPE_INT_RANGE, 1, 200000,
|
"rate", GST_TYPE_INT_RANGE, 1, 200000,
|
||||||
"channels", GST_TYPE_INT_RANGE, 9, 255,
|
"channels", GST_TYPE_INT_RANGE, 9, 255,
|
||||||
"channel-mask", GST_TYPE_BITMASK, G_GUINT64_CONSTANT (0), NULL));
|
"channel-mask", GST_TYPE_BITMASK, G_GUINT64_CONSTANT (0), NULL));
|
||||||
|
|
Loading…
Reference in a new issue