winks: Fix swapped RGBx/RGB caps mapping, and endianness.
authorJan Schmidt <jan@centricular.com>
Fri, 12 Aug 2016 12:16:33 +0000 (22:16 +1000)
committerJan Schmidt <jan@centricular.com>
Mon, 15 Aug 2016 14:43:39 +0000 (00:43 +1000)
The RGBx and RGB format mappings were reversed.

What Windows calls RGB are laid out as BGR in our parlance, so
switch that too

sys/winks/ksvideohelpers.c

index 9d70461..20da75b 100644 (file)
@@ -142,14 +142,14 @@ ks_video_format_to_structure (GUID subtype_guid, GUID format_guid)
     media_type = "video/x-raw";
     format = "RGB16";
   } else if (IsEqualGUID (&subtype_guid, &MEDIASUBTYPE_RGB24)) {
+    format = "BGR";
     media_type = "video/x-raw";
-    format = "RGBx";
   } else if (IsEqualGUID (&subtype_guid, &MEDIASUBTYPE_RGB32)) {
     media_type = "video/x-raw";
-    format = "RGB";
+    format = "BGRx";
   } else if (IsEqualGUID (&subtype_guid, &MEDIASUBTYPE_ARGB32)) {
     media_type = "video/x-raw";
-    format = "ARGB";
+    format = "BGRA";
   } else if (IsEqualGUID (&subtype_guid, &MEDIASUBTYPE_ARGB1555)) {
     GST_WARNING ("Unsupported video format ARGB15555");
   } else if (IsEqualGUID (&subtype_guid, &MEDIASUBTYPE_ARGB4444)) {