Bug 117383

Summary: [GStreamer] Add handling for GstContext
Product: WebKit Reporter: Sebastian Dröge (slomo) <slomo>
Component: MediaAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal CC: commit-queue, eric.carlson, glenn, gustavo, jer.noble, menard, mrobinson, pnormand, vjaquez
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch mrobinson: review-

Sebastian Dröge (slomo)
Reported 2013-06-09 08:25:16 PDT
The GStreamer backend should add generic handling for GstContext, which is new API in 1.1/1.2 that allows elements inside the pipeline to share contexts (e.g. display handles). The application needs to merge and propagate element contexts and set them on the pipeline. Patch follows later.
Attachments
Patch (5.15 KB, patch)
2013-07-17 10:28 PDT, Víctor M. Jáquez L.
mrobinson: review-
Víctor M. Jáquez L.
Comment 1 2013-06-09 11:32:42 PDT
yupi!!! you may like to see this bug/patch too https://bugs.webkit.org/show_bug.cgi?id=116042
Víctor M. Jáquez L.
Comment 2 2013-07-17 10:28:39 PDT
Martin Robinson
Comment 3 2013-07-17 10:40:21 PDT
Comment on attachment 206898 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=206898&action=review Seems reasonable, but I think a smart pointer is the way to go here. > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:156 > + GstStructure* s2 = reinterpret_cast<GstStructure*>(userData); Please don't use obscure abbreviations for variable names. > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:269 > + gst_context_unref(m_context); Looks like this could be a RefPtr specialization which would allow you to avoid the initialization and destruction of this member. > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:858 > + s1 = gst_context_get_structure(newContext); > + s2 = gst_context_writable_structure(m_context); Please make these variable names real words and declare them when you first define them.
Víctor M. Jáquez L.
Comment 4 2013-07-18 01:34:40 PDT
Comment on attachment 206898 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=206898&action=review >> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:269 >> + gst_context_unref(m_context); > > Looks like this could be a RefPtr specialization which would allow you to avoid the initialization and destruction of this member. That was my first approach, but I couldn't find a way to handle the gst_context_relace() used below :/ I'll dig on it
Sebastian Dröge (slomo)
Comment 5 2013-07-18 02:56:37 PDT
For all this note that the GstContext API and expected usage is still WIP, I'm not 100% happy with it yet. Should stabilize over the next weeks though, now that I'm porting gst-plugins-gl to it.
Martin Robinson
Comment 6 2013-07-18 07:18:28 PDT
(In reply to comment #5) > For all this note that the GstContext API and expected usage is still WIP, I'm not 100% happy with it yet. Should stabilize over the next weeks though, now that I'm porting gst-plugins-gl to it. Maybe we should wait until the API stabilizes, to avoid shipping something that doesn't work with certain GStreamer versions then.
Víctor M. Jáquez L.
Comment 7 2013-07-18 07:23:51 PDT
(In reply to comment #6) > (In reply to comment #5) > > For all this note that the GstContext API and expected usage is still WIP, I'm not 100% happy with it yet. Should stabilize over the next weeks though, now that I'm porting gst-plugins-gl to it. > > Maybe we should wait until the API stabilizes, to avoid shipping something that doesn't work with certain GStreamer versions then. Agreed.
Sebastian Dröge (slomo)
Comment 8 2013-10-14 11:31:33 PDT
No application-level handling of GstContext is necessary anymore in 1.1.90 or later. Applications can override the default handling though, but WebKit does not need that.
Note You need to log in before you can comment on or make changes to this bug.