tests/check/elements/audioconvert.c: Add another test that checks if conversion betwe...
authorSebastian Dröge <slomo@circular-chaos.org>
Wed, 21 May 2008 07:46:02 +0000 (07:46 +0000)
committerSebastian Dröge <slomo@circular-chaos.org>
Wed, 21 May 2008 07:46:02 +0000 (07:46 +0000)
Original commit message from CVS:
* tests/check/elements/audioconvert.c: (GST_START_TEST):
Add another test that checks if conversion between standard 1 and 2
channel layouts with and without positions set is working.

ChangeLog
tests/check/elements/audioconvert.c

index fb19bc4..55e6442 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2008-05-21  Sebastian Dröge  <slomo@circular-chaos.org>
 
+       * tests/check/elements/audioconvert.c: (GST_START_TEST):
+       Add another test that checks if conversion between standard 1 and 2
+       channel layouts with and without positions set is working.
+
+2008-05-21  Sebastian Dröge  <slomo@circular-chaos.org>
+
        * gst-libs/gst/audio/multichannel.c:
        (gst_audio_check_channel_positions):
        Allow non-standard 2 channel layouts.
index 5114752..0bd2aff 100644 (file)
@@ -848,6 +848,19 @@ GST_START_TEST (test_multichannel_conversion)
 
   {
     gint16 in[] = { 1, 2 };
+    gint16 out[] = { 1, 1, 2, 2 };
+    GstCaps *in_caps = get_int_caps (1, "BYTE_ORDER", 16, 16, TRUE);
+    GstCaps *out_caps = get_int_caps (2, "BYTE_ORDER", 16, 16, TRUE);
+
+    RUN_CONVERSION ("1 channels to 2 with standard layout and no positions set",
+        in, gst_caps_copy (in_caps), out, gst_caps_copy (out_caps));
+
+    RUN_CONVERSION ("2 channels to 1 with standard layout and no positions set",
+        out, out_caps, in, in_caps);
+  }
+
+  {
+    gint16 in[] = { 1, 2 };
     gint16 out[] = { 1, 0, 2, 0 };
     GstCaps *in_caps = get_int_mc_caps (1, "BYTE_ORDER", 16, 16, TRUE, FALSE);
     GstCaps *out_caps = get_int_mc_caps (2, "BYTE_ORDER", 16, 16, TRUE, FALSE);