libvisual: workaround clang warning

libvisual api expects a priv data pointer to be passed, though we know its
going to be `GstDebugLevel`.

```
../subprojects/gst-plugins-base/ext/libvisual/plugin.c:33:39: error: cast to smaller integer type 'GstDebugLevel' from 'void *' [-Werror,-Wvoid-pointer-to-enum-cast]
 GST_CAT_LEVEL_LOG (libvisual_debug, (GstDebugLevel) (priv), NULL, "%s - %s",
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/975>
This commit is contained in:
Jordan Petridis 2020-12-10 19:06:00 +02:00 committed by Jordan Petridіs
parent 56e05f63f5
commit ef884a2c5c

View file

@ -30,8 +30,8 @@ GST_DEBUG_CATEGORY (libvisual_debug);
static void
libvisual_log_handler (const char *message, const char *funcname, void *priv)
{
GST_CAT_LEVEL_LOG (libvisual_debug, (GstDebugLevel) (priv), NULL, "%s - %s",
funcname, message);
GST_CAT_LEVEL_LOG (libvisual_debug, (GstDebugLevel) GPOINTER_TO_INT (priv),
NULL, "%s - %s", funcname, message);
}
/*
@ -86,13 +86,14 @@ plugin_init (GstPlugin * plugin)
#endif
visual_log_set_verboseness (VISUAL_LOG_VERBOSENESS_LOW);
visual_log_set_info_handler (libvisual_log_handler, (void *) GST_LEVEL_INFO);
visual_log_set_info_handler (libvisual_log_handler,
GINT_TO_POINTER (GST_LEVEL_INFO));
visual_log_set_warning_handler (libvisual_log_handler,
(void *) GST_LEVEL_WARNING);
GINT_TO_POINTER (GST_LEVEL_WARNING));
visual_log_set_critical_handler (libvisual_log_handler,
(void *) GST_LEVEL_ERROR);
GINT_TO_POINTER (GST_LEVEL_ERROR));
visual_log_set_error_handler (libvisual_log_handler,
(void *) GST_LEVEL_ERROR);
GINT_TO_POINTER (GST_LEVEL_ERROR));
if (!visual_is_initialized ())
if (visual_init (NULL, NULL) != 0)