[Bug 772608] rpi/dispmanx: Implement gst_video_overlay_set_window_handle() for dispmanx window
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Mon Oct 10 14:38:22 UTC 2016
https://bugzilla.gnome.org/show_bug.cgi?id=772608
--- Comment #21 from Munez <munezbn.dev at gmail.com> ---
Based on my post above..
(In reply to Matthew Waters (ystreet00) from comment #18)
> (In reply to Munez from comment #17)
> > > 1. in set_window_handle(), set the foreign handle.
> >
> > So this part of patch is fine right ? I have added a new foreign handle and
> > setting it in set_window handle
>
> Yes.
>
> > > 2. when we need the window created to render into, copy the foreign handle
> > > to the native handle.
> > >
> > a] Now I am not sure when exactly this happens. From app side we set the
> > window handle when we receive prepare_window_handle message. So which
> > function is the right place ?
>
> Whenever it's being created in the original code. Instead of creating the
> dispmanx element, we use the foreign window.
>
In the original code Window_create is called at very beginning even before a
foreign window is set.
> > b] When you say copy foreign handle did you mean copying only dispmanx
> > element ? i.e window_egl->native.element = window_egl->foreign.element.
>
> We copy all of it, the element, width and height.
When we copy window_egl->native.element = window_egl->foreign.element we loose
the reference of native_window element which was created (16x16) before foreign
window set so we need it remove it before assigning foreign element
>
> > c] if case b] right then we need to remove the native.element(if it is
> > valid) from dispmanx layer before assigning the foreign element right?
>
> Not sure what you mean by this.
Like explained above, a native window element is always created before foreign
window element is set.
I think this is what we should do.. we need to modify only 2 functions
1] Modify gst_gl_window_dispmanx_egl_set_window_handle()
a] Store user window in a new member : "foreign"
b] If "native" element is already set, then remove it from layer
c] Copy "foreign" into "native" completely
2] Modify gst_gl_window_dispmanx_egl_close()
a] If "native" element is set and it is same as "foreign" element then don't
remove it from layer.
Kindly let me know if this is ok. I will update the patch.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list