This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM5728: Save screenshot using DRM

Part Number: AM5728


Hi,

I am trying to save rapid screenshots of what is being displayed on my AM5728. I am using a QT application with it rendering to Wayland. Are there are any examples of how to use DRM/ omapdrm to map a dumb buffer or equivalent to a userspace application? Reading from dev/fb0 did not work and returned a black screen with "Please wait"


Thanks,

  • Hello Vishal,

    On Wayland use the MOD+S shortcut to take a screenshot and MOD+R to take a rapid screenshots (video). You can find these command's source codes in weston-<version>/clients/screenshot.c and weston-<version>/src/screenshooter.c files.

    Best regards,
    Kemal

  • Hi Kemal,

    Thanks for your reply. These shortcuts did work, but during recording, the QT application rendering (to display) begins to skip frames and there are also missing frames in the final recording. Is there a way to increase/fix the framerate?

    Thanks again,
    Vishal
  • It only captures what changes, It's a variable framerate format, that only records new frames along with a timestamp when
    something actually changes. For more information please see the README file.

  • Thank you for that information. Unfortunately this method does not give me a fixed framerate and while it records it lags my QT rendering to display.

    How can I use a QT quick application rendered to Wayland-egl, and obtain a file-descriptor with the contents of the framebuffer (drm dumb buffer?) to pass into gstreamer. I tried something similar with passing dev/fb0 as a file into Gstreamer and that method works, but only when my QT app is rendering to linuxfb. 

  • Please find attached patch on drmclone application to allocate and map dumb buffer. See if this helps your scenario. 

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/example_2D00_applications_2D00_drm_2D00_tests_2D00_Support_2D00_for_2D00_dumb_2D00_buffers_2D00_with_2D00_drmClone.patch

  • Hi Manisha,

    Thank you for your reply.

    I am able to mmap the dumb buffer to userspace using ioctls at this point. But I am wondering what is the easiest way to push this dumb buffer into a gstreamer pipeline. With fbdev, I could simply assign dev/fb0 as the input to multifilesrc plugin, but this does not work the same with DRM. Any ideas?

    Thanks again,

    Vishal