TheImagingSource / tiscamera

The Linux SDK for The Imaging Source cameras.
https://www.theimagingsource.com
Apache License 2.0
297 stars 145 forks source link

Check cameras are using #510

Closed dinhtuanan closed 1 year ago

dinhtuanan commented 1 year ago

I use the camera to stream into the web and when I am streaming it. I would like to know if I can check the cameras is running or not with python code?

If you have examples of this or instruction, could you suggest them to me?

Regards, An

TIS-Stefan commented 1 year ago

Hello An

The only idea I have is checking for the GStreamer Bus messages. An example how to use the Gstreamer bus is at https://github.com/TheImagingSource/tiscamera/blob/master/examples/python/09-device-lost.py. But I have to admit, I am not that familiar with the bus messages so I could make a good example for you.

Maybe the Gstreamer documentation at https://gstreamer.freedesktop.org/documentation/gstreamer/gstbus.html?gi-language=c is helpful.

Stefan