wasapi: Print the hresult hex value on error
authorNirbheek Chauhan <nirbheek@centricular.com>
Sun, 25 Mar 2018 12:38:58 +0000 (18:08 +0530)
committerNirbheek Chauhan <nirbheek@centricular.com>
Tue, 27 Mar 2018 06:32:21 +0000 (12:02 +0530)
This helps figure out precisely what error enum value was returned,
which can be necessary when the description is too generic

sys/wasapi/gstwasapiutil.h

index 235db0a..784ef58 100644 (file)
@@ -45,7 +45,7 @@
   do { \
     if (hr != S_OK) { \
       gchar *msg = gst_wasapi_util_hresult_to_string (hr); \
-      GST_ERROR_OBJECT (self, #func " failed: %s", msg); \
+      GST_ERROR_OBJECT (self, #func " failed (%x): %s", hr, msg); \
       g_free (msg); \
       and; \
     } \