Throu a wireless rtsp connection I get a streaming from a network camera. Unfortunately the wireless connection is not stable and I need to know in my patcher the connection state. I’m using the jit.qt.movie object which is initialized by the message ‘read rtsp://192.168.0.102:554/mpeg4/media.amp‘ and I’m looking for a parameter which can tell me when the connection to the camera is lost in order to restart the streaming. I tried all parameters in the help files but no one helps.
I’ working with MAX5
Just a guess here, but if you set the "unique" attribute for jit.qt.movie to 1, it will only pass out new frames when it gets them. If you connect jit.qt.movie >> t b >> delay 5000 >> bang, that last bang will tell you within 5 seconds if you have lost a connection (since no new frames are coming in, jit.qt.movie won’t pass anything out its outlet). Change the delay time to adjust the amount of time you wish to wait before finding out if the connection is down.
It’s just a thought. There might be a better way to do this, but this might provide a starting point?
Thank you very much for your reply, David. I tested your suggestion but unfortunately the attribute ‘unique’ does not work for streaming. If I activate the attribute, no frames are sent to the window.
I think I found a solution with the object jit.net.send. During the streaming I send pings to the ip camera and if cannot reach it after a certain time I give the impulse to read the camera again. I wrote a patcher which you can download here: http://www.my-w.org/max_msp_jitter/rtsp_reconnect.zip.