GNOME Bugzilla – Bug 771427
gtksink and GtkStack issue
Last modified: 2017-05-08 14:14:57 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.
Created attachment 335515 [details] Screenshot showing the issue
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.
Why are you setting interpolate-size to true?
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 ?
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?).