goodrobots / visiond

Python/Gstreamer based project to stream video from embedded system cameras in various ways
MIT License
9 stars 3 forks source link

Add uuid to identify visiond for clients #26

Closed fnoop closed 4 years ago

fnoop commented 4 years ago

Need a repeatable uuid, but one that is unique. Does not have to be secure. https://docs.python.org/3.7/library/uuid.html

Try with uuid5, with uuid.NAMESPACE_URL, and pass the webrtc or rtsp URL as the name param. Should be repeatable, and unique across any network. _rtspurl = f"rtsp://{socket.getfqdn()}:{self.config.args.output_port}/video" _wsEndpoint = f"wss://{socket.getfqdn()}:6796"

@SamuelDudley - might be an idea to use a similar system for -api instead of uuid4, which I'm not sure is repeatable?

Ideally it needs to be repeatable, as we use the uuid as the key in -web for api and videostream definitions.

SamuelDudley commented 4 years ago

Yep, good idea. I looked at this for -api and was planning to make the change.

edit: You are also correct in stating that uuid4 is not repeatable