summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorMarijn Suijten <marijns95@gmail.com>2021-01-26 11:12:28 +0100
committerMarijn Suijten <marijns95@gmail.com>2021-01-26 11:12:28 +0100
commite8bb0fa062570b84f9a7c0c0b258bb47ed19853c (patch)
treebef2faf05b06c2304efa6fa6cbdcee490a7cfa1d /ext
parent3747fdb1a6a8ba810dc85d1e976bce8d86d95516 (diff)
downloadgstreamer-plugins-bad-e8bb0fa062570b84f9a7c0c0b258bb47ed19853c.tar.gz
ext/ldac: Move duplicate sampling rates into #define
Because there was a typo in one of the duplicates already (see previous commit) it is much safer to specify these once and only once. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1985>
Diffstat (limited to 'ext')
-rw-r--r--ext/ldac/gstldacenc.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/ext/ldac/gstldacenc.c b/ext/ldac/gstldacenc.c
index 09fd23cb1..191fba41e 100644
--- a/ext/ldac/gstldacenc.c
+++ b/ext/ldac/gstldacenc.c
@@ -51,21 +51,22 @@ GST_DEBUG_CATEGORY_STATIC (ldac_enc_debug);
#define parent_class gst_ldac_enc_parent_class
G_DEFINE_TYPE (GstLdacEnc, gst_ldac_enc, GST_TYPE_AUDIO_ENCODER);
+#define SAMPLE_RATES "44100, 48000, 88200, 96000"
+
static GstStaticPadTemplate ldac_enc_sink_factory =
GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
GST_STATIC_CAPS
("audio/x-raw, format=(string) { S16LE, S24LE, S32LE, F32LE }, "
- "rate = (int) { 44100, 48000, 88200, 96000 }, "
- "channels = (int) [ 1, 2 ] "));
+ "rate = (int) { " SAMPLE_RATES " }, channels = (int) [ 1, 2 ] "));
static GstStaticPadTemplate ldac_enc_src_factory =
GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
GST_STATIC_CAPS ("audio/x-ldac, "
- "rate = (int) { 44100, 48000, 88200, 96000 }, "
+ "rate = (int) { " SAMPLE_RATES " }, "
"channels = (int) 1, channel-mode = (string)mono; "
"audio/x-ldac, "
- "rate = (int) { 44100, 48000, 88200, 96000 }, "
- "channels = (int) 2, " "channel-mode = (string) { dual, stereo }"));
+ "rate = (int) { " SAMPLE_RATES " }, "
+ "channels = (int) 2, channel-mode = (string) { dual, stereo }"));
enum
{