[Webkit-unassigned] [Bug 105292] [GStreamer] GstMessage handler in AudioDestination

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Dec 27 10:18:23 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=105292





--- Comment #3 from Philippe Normand <pnormand at igalia.com>  2012-12-27 10:20:30 PST ---
(In reply to comment #2)
> (From update of attachment 179941 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=179941&action=review
> 
> > Source/WebCore/platform/audio/gstreamer/AudioDestinationGStreamer.cpp:68
> > +    GRefPtr<GstBus> bus = gst_pipeline_get_bus(GST_PIPELINE(m_pipeline));
> > +    gst_bus_add_signal_watch(bus.get());
> > +    g_signal_connect(bus.get(), "message", G_CALLBACK(messageCallback), this);
> 
> See below.
> 
> > Source/WebCore/platform/audio/gstreamer/AudioDestinationGStreamer.cpp:91
> > +    GRefPtr<GstBus> bus = gst_pipeline_get_bus(GST_PIPELINE(m_pipeline));
> > +    g_signal_handlers_disconnect_by_func(bus.get(), reinterpret_cast<gpointer>(messageCallback), this);
> 
> Why not just use a raw pointer? By using GRefPtr you are doing a ref and unref.

The bus returned by gst_pipeline_get_bus() needs to be unreffed after usage.

> 
> > Source/WebCore/platform/audio/gstreamer/AudioDestinationGStreamer.cpp:140
> > +        g_warning("Warning: %d, %s. Debug output: %s", error->code,  error->message, debug.get());
> 
> Wouldn't it make sense to use gst_debug_log here?

Well I wanted to use g_warning here so the user sees the message in the console, this is rather minimal error reporting but less hidden than GST_DEBUG :)

I used the same approach in the AudioFileReader BTW, so any change needed in this patch would need to be done there as well.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list