0

I'm using gst-launch to start streaming a camera in the /dev/fb0 framebuffer in an embedded linux system. I don't have access to ioctl.h or fb.h to do a memset manually.

The command is something like this:

gst-launch-1.0 imxg2dcompositor name=camera background-color=0x000000 sink_0::xpos=200 sink_0::ypos=90 sink_0::width=450 sink_0::height=350 ! video/x-raw,width=800,height=480 ! imxg2dvideosink framebuffer=/dev/fb0 use-vsync=true imxv4l2videosrc device=/dev/video0 input=4 ! camera.sink_0 -e

I start this command using a QProcess object from the Qt Framework (5.6) and when I invoke the "kill", "close" or "terminate" methods I always end up with the screen showing the last image taken from the camera and I would like to have the screen clear. Is it there a way to clear the /dev/fb0 using gst-launch command?

Erba Aitbayev
  • 4,167
  • 12
  • 46
  • 81
Marcos Lopez
  • 1
  • 1
  • 3

1 Answers1

1

This might not be possible with GStreamer command line since you are using the frame buffer and by default it is left open when you kill or terminate the process. You can try to run a system command along with it try using - echo 1 > /sys/class/graphics/fb0/blank which would turn it off.

Instead of turning it off, you could instead "paint it black" with zeroes:

dd if=/dev/zero count=1000 bs=1024 > /dev/fb0 # adjust count for size of screen
pestophagous
  • 4,069
  • 3
  • 33
  • 42
Samer Tufail
  • 1,835
  • 15
  • 25