I am not quite sure if this is right category for this question...
I have a RaspberryPI computer showing a picture from network camera. This camera is constantly changing it's postion (PTZ, moving duration is about half minute). This causes the plastic parts to get worn very quickly inside the camera. Therefore I want to stop the movement of the camera every time, the HDMI TV display is turned off.
The webcam picture is shown in a web page in Chromium. When I close this web page, the camera stops moving. So easiest way to do this is just simply terminate/close the Chromium process, when the TV get's turned of. And same way when someone turns the TV back ON, the chromium should start showing the image.
Unfortunately I'm newbie with Linux and linux programming, so I don't know even where to start. Don't even know if this is even possible.
The second possibility could be use of GPIO. I have the preassembled GPIO board with few buttons and screw-pins. I could do a separate button for controlling the chromium.