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 771427 - gtksink and GtkStack issue
gtksink and GtkStack issue
Status: RESOLVED NOTABUG
Product: gtk+
Classification: Platform
Component: Widget: Other
3.20.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2016-09-14 13:14 UTC by Emmanuel Pacaud
Modified: 2017-05-08 14:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Sample code (1.73 KB, application/x-bzip2)
2016-09-14 13:14 UTC, Emmanuel Pacaud
Details
Screenshot showing the issue (15.98 KB, image/png)
2016-09-14 13:15 UTC, Emmanuel Pacaud
Details

Description Emmanuel Pacaud 2016-09-14 13:14:09 UTC
Created attachment 335514 [details]
Sample code

There is a video position issue when the gtksink widget is added to a GtkStack.

I'm attaching a simple example that shows the issue. Compile the test using the command line at the beginning of the source code, then run it. When the window shows up, resize it to a bigger size. The videotest output is not centered in the window as it should.

This issue is not here when the GtkStack widget is replaced by a GtkNotebook.
Comment 1 Emmanuel Pacaud 2016-09-14 13:15:04 UTC
Created attachment 335515 [details]
Screenshot showing the issue
Comment 2 Matthew Waters (ystreet00) 2016-09-15 03:22:37 UTC
With GST_DEBUG=videosink:7

"gst_video_sink_center_rect: source is 1920x1080 dest is 284x1080, result is 284x159 with x,y 0x460" on a window that is definitely not 1080 pixels high (I only have 720 ;))

That points to a bug in Gtk+ giving us the wrong allocated size.
Comment 3 Timm Bäder 2016-09-15 07:25:24 UTC
Why are you setting interpolate-size to true?
Comment 4 Emmanuel Pacaud 2016-09-15 07:38:44 UTC
I don't remember why interpolate-size was set to TRUE. Setting it to FALSE fixes the issue.

Does that mean some care must be taken in gtksink in order to make it comptabible with interpolate-size ?
Comment 5 Timm Bäder 2017-05-08 14:14:57 UTC
Yes and no, GtkStack will allocate sizes differently depending on interpolate-size (I assume the GtkSink reports a natural height of 1080px and that's where the allocation came from?).