nariakiiwatani / ofxNDI

NewTek NDI SDK Wrapper for openFrameworks.
https://ndi.tv/
MIT License
103 stars 19 forks source link

auto reconnect #12

Closed stephanschulz closed 2 years ago

stephanschulz commented 4 years ago

do you have any inside in to how to best insure receiver connects to sender, when sender app starts after receiver?

I made a receiver that listens/play to 6 different senders. in some cases isConnected is true but no data arrives. When I then restart receiver app all data arrives.

I'm using a async reconnect to call setup again if not connected. https://github.com/roymacdonald/ofxSoundObjects-NDI/blob/master/src/ofxNDISoundObject.cpp#L266

but does not always work successful.

nariakiiwatani commented 4 years ago

What happens if you do the same but with NDI official tools? If same problem occurs, I recommend you to ask NewTek team what is happening. and if so, I think there is currently no other way than watching both isConnected and actual receiving data.

FYI, I recently added Receiver::changeConnection and Receiver::disconnect. They might help you to reconnect properly.