adder: Switch to GST_AUDIO_NE()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8984>
This commit is contained in:
Doug Nazar 2025-05-14 14:37:47 -04:00
parent 17474ebbb2
commit af2b6b4c38
2 changed files with 4 additions and 12 deletions

View File

@ -164,15 +164,11 @@ enum
/* elementfactory information */
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
#define CAPS \
GST_AUDIO_CAPS_MAKE ("{ S32LE, U32LE, S16LE, U16LE, S8, U8, F32LE, F64LE }") \
GST_AUDIO_CAPS_MAKE ("{ " GST_AUDIO_NE (S32) ", " GST_AUDIO_NE (U32) ", " \
GST_AUDIO_NE (S16) ", " GST_AUDIO_NE (U16) ", S8, U8, " \
GST_AUDIO_NE (F32) ", " GST_AUDIO_NE (F64) " }") \
", layout = (string) { interleaved }"
#else
#define CAPS \
GST_AUDIO_CAPS_MAKE ("{ S32BE, U32BE, S16BE, U16BE, S8, U8, F32BE, F64BE }") \
", layout = (string) { interleaved }"
#endif
static GstStaticPadTemplate gst_adder_src_template =
GST_STATIC_PAD_TEMPLATE ("src",

View File

@ -789,11 +789,7 @@ GST_START_TEST (test_clip)
gst_pad_send_event (sinkpad, gst_event_new_stream_start ("test"));
caps = gst_caps_new_simple ("audio/x-raw",
#if G_BYTE_ORDER == G_BIG_ENDIAN
"format", G_TYPE_STRING, "S16BE",
#else
"format", G_TYPE_STRING, "S16LE",
#endif
"format", G_TYPE_STRING, GST_AUDIO_NE (S16),
"layout", G_TYPE_STRING, "interleaved",
"rate", G_TYPE_INT, 44100, "channels", G_TYPE_INT, 2, NULL);