2

I'm using RPi4 board with Raspbian on top of it

I wonder if there is a way to tell if any process currently using hardware accelerated video playback?

Ideally it would be nice to be able to say which process exactly is using it, but it's not critical.

I know there could be various interfaces and probably it's possible to detect V4L2 M2M usage with /dev/video10 device opened. But what's about MMAL interface? If it makes difference I'm interested in playback of H.264 videos.

I've considered following approaches but haven't found any traces:

  1. Using lsof to track specific dev-files
  2. Checking state of kernel using sys-files
  3. Using vcdbg or vcgencmd to get stats
reddot
  • 121
  • 2

1 Answers1

1

I would approach this by checking the output of

lsof | grep /opt/vc

This will list all processes which access videocore libraries. This can be further narrowed down to a specific library you're interested in. For video decoding in general, libbcm_host could be a good start.

Dmitry Grigoryev
  • 28,277
  • 6
  • 54
  • 147