Bug 150800

Summary: [GStreamer] Use GstBus sync message handler and schedule tasks to the main thread with RunLoop::dispatch
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: PlatformAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: pnormand, zan
Priority: P2 Keywords: Gtk
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 152797    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Updated patch pnormand: review+

Carlos Garcia Campos
Reported 2015-11-02 06:32:06 PST
This way we would avoid all the GScource + polling mechanism that GST uses internally to handle messages asynchronously in the main thread.
Attachments
Patch (13.98 KB, patch)
2015-11-02 06:41 PST, Carlos Garcia Campos
no flags
Updated patch (14.12 KB, patch)
2015-11-02 08:38 PST, Carlos Garcia Campos
pnormand: review+
Carlos Garcia Campos
Comment 1 2015-11-02 06:41:27 PST
Carlos Garcia Campos
Comment 2 2015-11-02 08:38:02 PST
Created attachment 264591 [details] Updated patch I was assuming that sync message handler was always called from a secondary thread, but the main thread can also call gst_bus_post, so I've added a check to not schedule the message to the main thread if we are already in the main thread.
Zan Dobersek
Comment 3 2015-11-03 00:06:29 PST
Comment on attachment 264591 [details] Updated patch View in context: https://bugs.webkit.org/attachment.cgi?id=264591&action=review Looks good, I'll leave it to Phil to approve it. > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1949 > + if (!weakThis) > + return; > + weakThis->handleMessage(protectMessage.get()); Nit: could be a two-liner. > if (weakThis) > weakThis->handleMessage(protectMessage.get());
Carlos Garcia Campos
Comment 4 2015-11-03 02:44:52 PST
Note You need to log in before you can comment on or make changes to this bug.