wpe: Logging fixes for the WebExtension

Using logging macros without a `GST_CAT_DEFAULT` in scope leads to critical
warnings.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4021>
This commit is contained in:
Philippe Normand 2022-12-22 10:17:42 +00:00 committed by Tim-Philipp Müller
parent eb5e90905c
commit f12769b860
2 changed files with 8 additions and 1 deletions

View file

@ -296,6 +296,7 @@ webkit_extension_msg_received (WebKitWebContext *context,
GVariant *params = webkit_user_message_get_parameters (message);
gboolean res = TRUE;
GST_TRACE_OBJECT(src, "Handling message %s", name);
if (!g_strcmp0(name, "gstwpe.new_stream")) {
guint32 id = g_variant_get_uint32 (g_variant_get_child_value (params, 0));
const gchar *capsstr = g_variant_get_string (g_variant_get_child_value (params, 1), NULL);

View file

@ -30,6 +30,9 @@
#include <gio/gunixfdlist.h>
#include <wpe/webkit-web-extension.h>
GST_DEBUG_CATEGORY_STATIC (wpe_extension_debug);
#define GST_CAT_DEFAULT wpe_extension_debug
G_MODULE_EXPORT void webkit_web_extension_initialize (WebKitWebExtension *
extension);
@ -42,13 +45,16 @@ webkit_web_extension_initialize (WebKitWebExtension * extension)
gst_init (NULL, NULL);
GST_DEBUG_CATEGORY_INIT (wpe_extension_debug, "wpewebextension", 0,
"GstWPE WebExtension");
/* Register our own audio sink to */
gst_element_register (NULL, "gstwpeaudiosink", GST_RANK_PRIMARY + 500,
gst_wpe_audio_sink_get_type ());
gst_object_unref (g_object_new (gst_wpe_bus_msg_forwarder_get_type (), NULL));
global_extension = extension;
GST_INFO_OBJECT (global_extension, "Setting as global extension.");
GST_INFO ("Setting as global extension.");
}
void