How to determin programatically blank display

Hi
I have a C program that displays a stream. Every now and then the video window is blank. Restart displays a picture (usually)
All the pipeline threads are running:

dvr@dvrHS:~$ ps -T -p 44780
PID SPID TTY TIME CMD
44780 44780 ? 00:00:00 dvrPreview
44780 44790 ? 00:00:00 dvrPreview
44780 44791 ? 00:00:00 dvrPreview
44780 44792 ? 00:00:00 dvrPreview
44780 44793 ? 00:00:00 dvrPreview
44780 44794 ? 00:00:00 dvrPreview
44780 44795 ? 00:00:00 dvrPreview
44780 44796 ? 00:00:00 dvrPreview
44780 44797 ? 00:00:00 dvrPreview
44780 44798 ? 00:00:00 dvrPreview
44780 44799 ? 00:00:00 dvrPreview
44780 44800 ? 00:00:00 dvrPreview

The only hint I’ve had is once:

ERROR: Caught a segmentation fault while loading plugin file:
/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvideo4linux2.so

Please either:

  • remove it and restart.
  • run with --gst-disable-segtrap --gst-disable-registry-fork and debug.

Is there a way to find out if the window is blank. I can then restart

Thanks
James