Need to Detect HDMI State Change

Hi,

How can I tell when the HDMI port state has changed from connected(active) to disconnected(not active). I need some way to have my GStreamer player app not try/stop playback when the hdmi port state is disconnected. I have found no way to get this info from using Gstreamer APIs. Looking for C source code or command line solution(no X based apps). Thanks.

Hi Tom,

You could try to read the status with this node.

/sys/devices/virtual/switch/hdmi/state

Please check if this one matches your need.