osxaudio: Put all audio formats into the template caps
authorSebastian Dröge <sebastian@centricular.com>
Mon, 22 Dec 2014 11:56:19 +0000 (12:56 +0100)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 22 Dec 2014 11:56:19 +0000 (12:56 +0100)
We report the proper caps later from the get_caps() vfunc implementation after
probing the selected device.

sys/osxaudio/gstosxaudiosink.c
sys/osxaudio/gstosxaudiosrc.c

index 53d4c29..e1b7e0f 100644 (file)
@@ -93,17 +93,11 @@ enum
 
 #define DEFAULT_VOLUME 1.0
 
-#if (G_BYTE_ORDER == G_LITTLE_ENDIAN)
-# define FORMATS "{ S32LE, S24LE, S16LE, U8 }"
-#else
-# define FORMATS "{ S32BE, S24BE, S16BE, U8 }"
-#endif
-
 static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
     GST_PAD_SINK,
     GST_PAD_ALWAYS,
     GST_STATIC_CAPS ("audio/x-raw, "
-        "format = (string) " FORMATS ", "
+        "format = (string) " GST_AUDIO_FORMATS_ALL ", "
         "layout = (string) interleaved, "
         "rate = (int) [1, MAX], "
         "channels = (int) [1, 9];"
index 266be57..670ec62 100644 (file)
@@ -79,17 +79,11 @@ enum
   ARG_DEVICE
 };
 
-#if (G_BYTE_ORDER == G_LITTLE_ENDIAN)
-# define FORMATS "{ S32LE }"
-#else
-# define FORMATS "{ S32BE }"
-#endif
-
 static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
     GST_PAD_SRC,
     GST_PAD_ALWAYS,
     GST_STATIC_CAPS ("audio/x-raw, "
-        "format = (string) " FORMATS ", "
+        "format = (string) " GST_AUDIO_FORMATS_ALL ", "
         "layout = (string) interleaved, "
         "rate = (int) [1, MAX], " "channels = (int) [1, MAX]")
     );