[MOVED FROM GST-P-FARSIGHT] Fix byte ordering issues with dtmfsrc and rtpdtmfdepay...
authorYouness Alaoui <youness.alaoui@collabora.co.uk>
Sat, 12 Apr 2008 23:44:18 +0000 (23:44 +0000)
committerEdward Hervey <bilboed@bilboed.com>
Sat, 21 Feb 2009 16:48:05 +0000 (17:48 +0100)
20080412234418-4f0f6-4828d1613dfcd564afd236dfc8fb57a299092f83.gz

gst/dtmf/gstdtmfsrc.c
gst/dtmf/gstrtpdtmfdepay.c

index 71e5dbb..38470a0 100644 (file)
@@ -225,11 +225,7 @@ GST_STATIC_PAD_TEMPLATE ("src",
     GST_STATIC_CAPS ("audio/x-raw-int, "
         "width = (int) 16, "
         "depth = (int) 16, "
-#if G_BYTE_ORDER == G_LITTLE_ENDIAN
-        "endianness = (int) 1234, "
-#else
-        "endianness = (int) 4321, "
-#endif
+        "endianness = (int) " G_STRINGIFY (G_BYTE_ORDER) ", "
         "signed = (bool) true, "
         "rate = (int) 8000, "
         "channels = (int) 1")
index f90978a..d1096c8 100644 (file)
@@ -125,7 +125,7 @@ GST_STATIC_PAD_TEMPLATE ("src",
     GST_STATIC_CAPS ("audio/x-raw-int, "
         "width = (int) 16, "
         "depth = (int) 16, "
-        "endianness = (int) 1234, "
+        "endianness = (int) " G_STRINGIFY (G_BYTE_ORDER) ", "
         "signed = (boolean) true, "
         "rate = (int) [0, MAX], "
         "channels = (int) 1")
@@ -206,7 +206,7 @@ gst_rtp_dtmf_depay_setcaps (GstBaseRTPDepayload * filter, GstCaps * caps)
   srccaps = gst_caps_new_simple ("audio/x-raw-int",
       "width", G_TYPE_INT, 16,
       "depth", G_TYPE_INT, 16,
-      "endianness", G_TYPE_INT, 1234,
+      "endianness", G_TYPE_INT, G_BYTE_ORDER,
       "signed", G_TYPE_BOOLEAN, TRUE,
       "channels", G_TYPE_INT, 1,
       "rate", G_TYPE_INT, clock_rate, NULL);