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 779604 - Distorted egl picture on Raspberry before play
Distorted egl picture on Raspberry before play
Status: RESOLVED NOTGNOME
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
1.11.x
Other other
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-03-05 08:10 UTC by Milenko
Modified: 2018-02-09 11:19 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Milenko 2017-03-05 08:10:03 UTC
I am using multiple Raspberries with a netclientclock to synchronize the video playback. The gstreamer pipe is a simple playbin with a URL to the stream. I also added bus listeners for buffering status and clock synchronization. The server initializes the playbin on each raspberry and calls pause first. Calling pause causes all players to start buffering and display an initial video frame. At this point i am getting a random weird output on the screen, seems like uninitialized memory. When the server issues the play command, the distorted picture is gone.

What i have found so far is in gstglwindow_dispmanx_egl.c When gst_gl_window_dispmanx_egl_create_window is called, the display is initialized to 16x16. 

window_resize (window_egl, 16, 16, FALSE);

When i change this to be 

window_resize (window_egl, window_egl->dp_width, window_egl->dp_height, FALSE);

this issue is gone for me and i can see the initial video frame instead of distortion but i guess this only works because i am playing back videos at the same resolution of the display.

I have checked whether window_resize is being called during the buffering process and this is definitely the case. I am getting the following output:

resizing visible window from 16x16 to 1920x1080

Maybe this resize is too late and happens after the initial frame has been uploaded?
Comment 1 Matthew Waters (ystreet00) 2018-02-09 01:19:02 UTC
IIRC, it is the resize that causes issues and needs to be 'fixed' by the rpi userland/kernel driver to not introduce random garbage into the output.
Comment 2 Milenko 2018-02-09 11:10:41 UTC
Isn't it more likely that that a window_resize() to 1920x1080 is missing before drawing the first frame? IMO the first frame is drawn onto a 16x16 window and the rest of the 1920x1080 screen is then filled by the pi with what has been in the memory by some other process.

As i said, the garbage is gone when i change the initial window_resize() from 16x16 to 1920x1080. Then the first frame is displayed correctly over the entire screen and there is no garbage anymore.
Comment 3 Matthew Waters (ystreet00) 2018-02-09 11:19:07 UTC
(In reply to Milenko from comment #2)
> Isn't it more likely that that a window_resize() to 1920x1080 is missing
> before drawing the first frame? IMO the first frame is drawn onto a 16x16
> window and the rest of the 1920x1080 screen is then filled by the pi with
> what has been in the memory by some other process.
> 
> As i said, the garbage is gone when i change the initial window_resize()
> from 16x16 to 1920x1080. Then the first frame is displayed correctly over
> the entire screen and there is no garbage anymore.

The garbage is the from the resize form 16x16 to 'insert large size'.  If you stop the program when that resize happens before the first frame is displayed, the garbage appears.