After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 748322 - wayland: GTK+ video overlay example
wayland: GTK+ video overlay example
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
unspecified
Other All
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-04-22 18:21 UTC by Víctor Manuel Jáquez Leal
Modified: 2015-11-18 14:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
wayland: GTK+ video overlay example (8.47 KB, patch)
2015-04-22 18:21 UTC, Víctor Manuel Jáquez Leal
none Details | Review
screenshot of the window displacement (978.18 KB, image/png)
2015-11-18 12:46 UTC, Víctor Manuel Jáquez Leal
  Details

Description Víctor Manuel Jáquez Leal 2015-04-22 18:21:29 UTC
Add a test for waylandsink as a GTK+ overlay.
Comment 1 Víctor Manuel Jáquez Leal 2015-04-22 18:21:34 UTC
Created attachment 302174 [details] [review]
wayland: GTK+ video overlay example
Comment 2 Olivier Crête 2015-04-22 19:27:07 UTC
Comment on attachment 302174 [details] [review]
wayland: GTK+ video overlay example

The code looks good. I guess once the waylandsink API stabilizes, we'll want to add this to the various other examples we have instead of having a separate wayland one, but it's probably too early for that.

Also, you probably want to add code to deal with changes in the window size, as this is the annoyingly non-trivial part with wayland. I'd love to be able to convince team wayland to change libwayland-client to make our lives easier, but for now, we're stuck with a complex multi-step process.

Shouldn't "gtk_window_move()" just do nothing on Wayland?
Comment 3 Víctor Manuel Jáquez Leal 2015-04-23 13:20:46 UTC
(In reply to Olivier Crête from comment #2)
> The code looks good. 

Thanks!

> I guess once the waylandsink API stabilizes, we'll want
> to add this to the various other examples we have instead of having a
> separate wayland one, but it's probably too early for that.

What other examples? As far as I see, there's a video overlay example in gst-plugin-base, but focused on X. I modified it to support waylandsink, but then I realized gl has their own video overlay example too in gst-plugin-bad, so I decided to follow its steps, since both are in gst-plugin-bad.

IMO, would be good to push tests for waylandsink as soon as possible, so others could dig in the plugin easily. 

> Also, you probably want to add code to deal with changes in the window size,
> as this is the annoyingly non-trivial part with wayland. I'd love to be able
> to convince team wayland to change libwayland-client to make our lives
> easier, but for now, we're stuck with a complex multi-step process.

Yes, I didn't work of that feature. Even the _set_render_rectangle() isn't working as expected (the videotestsrc appears displaced).

> 
> Shouldn't "gtk_window_move()" just do nothing on Wayland?

It seems so.
Comment 4 George Kiagiadakis 2015-10-19 11:24:54 UTC
(In reply to Víctor Manuel Jáquez Leal from comment #3)
> (In reply to Olivier Crête from comment #2)
> > Also, you probably want to add code to deal with changes in the window size,
> > as this is the annoyingly non-trivial part with wayland. I'd love to be able
> > to convince team wayland to change libwayland-client to make our lives
> > easier, but for now, we're stuck with a complex multi-step process.
> 
> Yes, I didn't work of that feature. Even the _set_render_rectangle() isn't
> working as expected (the videotestsrc appears displaced).

Well, because you are not using it properly :)

I also have a gtk demo around: https://git.collabora.com/cgit/user/gkiagia/gst-wayland-gtk-demo.git/tree/main.c
Perhaps it can be merged into yours (yours looks more clean).

You are right that this should be in gst-plugins-bad examples, so that others can easily work with waylandsink.
Comment 5 George Kiagiadakis 2015-11-18 12:16:08 UTC
commit 3eeec2836a8f1ddb5525633f4ae1c360ddc9d3ba
Author: George Kiagiadakis <george.kiagiadakis@collabora.com>
Date:   Mon Oct 26 16:24:40 2015 +0100

    tests/examples: add a waylandsink example

    https://bugzilla.gnome.org/show_bug.cgi?id=748322
Comment 6 Víctor Manuel Jáquez Leal 2015-11-18 12:45:36 UTC
(In reply to George Kiagiadakis from comment #4)
> (In reply to Víctor Manuel Jáquez Leal from comment #3)
> > (In reply to Olivier Crête from comment #2)
> > > Also, you probably want to add code to deal with changes in the window size,
> > > as this is the annoyingly non-trivial part with wayland. I'd love to be able
> > > to convince team wayland to change libwayland-client to make our lives
> > > easier, but for now, we're stuck with a complex multi-step process.
> > 
> > Yes, I didn't work of that feature. Even the _set_render_rectangle() isn't
> > working as expected (the videotestsrc appears displaced).
> 
> Well, because you are not using it properly :)

Hi George,

Thanks for taking care of this. It just slipped out of my mind.

I have tried the test, but I see the same problem I had with my code. Let me upload an screenshot...
Comment 7 Víctor Manuel Jáquez Leal 2015-11-18 12:46:41 UTC
Created attachment 315820 [details]
screenshot of the window displacement
Comment 8 George Kiagiadakis 2015-11-18 12:54:39 UTC
Ah so it was this bug... I fixed that problem just in the previous commit:

http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=c51fe83d4228262f297382f49676c76cd2f8147e
Comment 9 Víctor Manuel Jáquez Leal 2015-11-18 14:17:03 UTC
(In reply to George Kiagiadakis from comment #8)
> Ah so it was this bug... I fixed that problem just in the previous commit:
> 
> http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/
> ?id=c51fe83d4228262f297382f49676c76cd2f8147e

It looks to me improbable, since I did a git pull, so the build has it. Perhaps it is other issue.
Comment 10 George Kiagiadakis 2015-11-18 14:38:08 UTC
(In reply to Víctor Manuel Jáquez Leal from comment #9)
> (In reply to George Kiagiadakis from comment #8)
> > Ah so it was this bug... I fixed that problem just in the previous commit:
> > 
> > http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/
> > ?id=c51fe83d4228262f297382f49676c76cd2f8147e
> 
> It looks to me improbable, since I did a git pull, so the build has it.
> Perhaps it is other issue.

Yes, but did you compile and install waylandsink? The example is not related to this commit. I am pretty sure because I also saw this exact same issue and I am pretty sure I fixed it. Please make sure to recompile everything and in case you still see a problem, please open a new bug report.