From 786d35f53ff8788c70941b590d319c63193b33f1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 7 Sep 2011 12:10:48 +0200 Subject: [PATCH] audioparsers: Improve src template caps Remove the parsed/framed fields and add all fields to the template caps that always exist. --- gst/audioparsers/gstaacparse.c | 3 +-- gst/audioparsers/gstac3parse.c | 10 +++++----- gst/audioparsers/gstdcaparse.c | 5 +++-- gst/audioparsers/gstflacparse.c | 2 +- gst/audioparsers/gstmpegaudioparse.c | 7 ++++--- 5 files changed, 14 insertions(+), 13 deletions(-) diff --git a/gst/audioparsers/gstaacparse.c b/gst/audioparsers/gstaacparse.c index e42983d077..51410704e8 100644 --- a/gst/audioparsers/gstaacparse.c +++ b/gst/audioparsers/gstaacparse.c @@ -57,8 +57,7 @@ static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src", static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, - GST_STATIC_CAPS ("audio/mpeg, " - "framed = (boolean) false, " "mpegversion = (int) { 2, 4 };")); + GST_STATIC_CAPS ("audio/mpeg, mpegversion = (int) { 2, 4 };")); GST_DEBUG_CATEGORY_STATIC (aacparse_debug); #define GST_CAT_DEFAULT aacparse_debug diff --git a/gst/audioparsers/gstac3parse.c b/gst/audioparsers/gstac3parse.c index 80c1f4d613..3b0b9803d7 100644 --- a/gst/audioparsers/gstac3parse.c +++ b/gst/audioparsers/gstac3parse.c @@ -144,16 +144,16 @@ static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, GST_STATIC_CAPS ("audio/x-ac3, framed = (boolean) true, " - " channels = (int) [ 1, 6 ], rate = (int) [ 32000, 48000 ]; " + " channels = (int) [ 1, 6 ], rate = (int) [ 32000, 48000 ], " + " alignment = (string) { iec61937, frame}; " "audio/x-eac3, framed = (boolean) true, " - " channels = (int) [ 1, 6 ], rate = (int) [ 32000, 48000 ] ")); + " channels = (int) [ 1, 6 ], rate = (int) [ 32000, 48000 ], " + " alignment = (string) { iec61937, frame}; ")); static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, - GST_STATIC_CAPS ("audio/x-ac3, framed = (boolean) false; " - "audio/x-eac3, framed = (boolean) false; " - "audio/ac3, framed = (boolean) false ")); + GST_STATIC_CAPS ("audio/x-ac3; " "audio/x-eac3; " "audio/ac3")); static void gst_ac3_parse_finalize (GObject * object); diff --git a/gst/audioparsers/gstdcaparse.c b/gst/audioparsers/gstdcaparse.c index 2bf0e38828..2c020e7144 100644 --- a/gst/audioparsers/gstdcaparse.c +++ b/gst/audioparsers/gstdcaparse.c @@ -62,12 +62,13 @@ static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src", " channels = (int) [ 1, 8 ]," " rate = (int) [ 8000, 192000 ]," " depth = (int) { 14, 16 }," - " endianness = (int) { LITTLE_ENDIAN, BIG_ENDIAN }")); + " endianness = (int) { LITTLE_ENDIAN, BIG_ENDIAN }, " + " block-size = (int) [ 1, MAX], " " frame-size = (int) [ 1, MAX]")); static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, - GST_STATIC_CAPS ("audio/x-dts, framed = (boolean) false")); + GST_STATIC_CAPS ("audio/x-dts")); static void gst_dca_parse_finalize (GObject * object); diff --git a/gst/audioparsers/gstflacparse.c b/gst/audioparsers/gstflacparse.c index 3011bf0aad..a58c76a4ef 100644 --- a/gst/audioparsers/gstflacparse.c +++ b/gst/audioparsers/gstflacparse.c @@ -181,7 +181,7 @@ static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src", static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, - GST_STATIC_CAPS ("audio/x-flac, framed = (boolean) false") + GST_STATIC_CAPS ("audio/x-flac") ); static void gst_flac_parse_finalize (GObject * object); diff --git a/gst/audioparsers/gstmpegaudioparse.c b/gst/audioparsers/gstmpegaudioparse.c index 94a8993fa7..d816fff438 100644 --- a/gst/audioparsers/gstmpegaudioparse.c +++ b/gst/audioparsers/gstmpegaudioparse.c @@ -76,14 +76,15 @@ static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src", GST_STATIC_CAPS ("audio/mpeg, " "mpegversion = (int) 1, " "layer = (int) [ 1, 3 ], " - "rate = (int) [ 8000, 48000 ], channels = (int) [ 1, 2 ]," - "parsed=(boolean) true") + "mpegaudioversion = (int) [ 1, 3], " + "rate = (int) [ 8000, 48000 ], " + "channels = (int) [ 1, 2 ], " "parsed=(boolean) true") ); static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, - GST_STATIC_CAPS ("audio/mpeg, mpegversion = (int) 1, parsed=(boolean)false") + GST_STATIC_CAPS ("audio/mpeg, mpegversion = (int) 1") ); static void gst_mpeg_audio_parse_finalize (GObject * object); -- 2.34.1