voaacenc: Set the correct, valid sample rates in the pad template caps

This commit is contained in:
Sebastian Dröge 2011-05-27 10:35:31 +02:00
parent b87ff1a1df
commit da03a46861

View File

@ -54,6 +54,19 @@ enum
PROP_BITRATE PROP_BITRATE
}; };
#define SAMPLE_RATES " 8000, " \
"11025, " \
"12000, " \
"16000, " \
"22050, " \
"24000, " \
"32000, " \
"44100, " \
"48000, " \
"64000, " \
"88200, " \
"96000"
static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink", static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK, GST_PAD_SINK,
GST_PAD_ALWAYS, GST_PAD_ALWAYS,
@ -62,7 +75,7 @@ static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
"depth = (int) 16, " "depth = (int) 16, "
"signed = (boolean) TRUE, " "signed = (boolean) TRUE, "
"endianness = (int) BYTE_ORDER, " "endianness = (int) BYTE_ORDER, "
"rate = (int) [8000, 96000], " "channels = (int) [1, 2]") "rate = (int) { " SAMPLE_RATES " }, " "channels = (int) [1, 2]")
); );
static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src", static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
@ -70,7 +83,7 @@ static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_ALWAYS, GST_PAD_ALWAYS,
GST_STATIC_CAPS ("audio/mpeg, " GST_STATIC_CAPS ("audio/mpeg, "
"mpegversion = (int) 4, " "mpegversion = (int) 4, "
"rate = (int) [8000, 96000], " "rate = (int) { " SAMPLE_RATES " }, "
"channels = (int) [1, 2], " "channels = (int) [1, 2], "
"stream-format = (string) { adts, raw }, " "base-profile = (string) lc") "stream-format = (string) { adts, raw }, " "base-profile = (string) lc")
); );