Closed chriswiggins closed 9 years ago
Wow! Thanks a lot! I'll check all other code in a few days to test and merge it. Could you provide some tests for encoder support, cause I've got no one real device?
Absolutely @agsh - I will get these to you tomorrow or the next day and add them to a test routine. Are you happy with the approach of how the code works?
Sure! Everything is well, including code style, appreciate you for that. But your change affects a lot. I've never ever thought about different videosources.
It only adds two variables though right. This doesn't affect how the library runs at all however if you want to pass a specific encoder port to getMediaUri (for example) then you can just pass in the token from the relevant this.videoSources profile.
Happy to change this all around and do it differently if you like! :-)
@agsh I've added the test as asked. Where I'm using this extra addition is to just loop through each of the videoSource tokens and then calling getMediaUri
on each one. This then allows me to get the RTSP URI of each port on the encoder and works really well.
This is a first run at adding encoder support.
If the library gets a result with multiple video sources, it sets the first as default, and then stores the others in
this.videoSources
and the profiles inthis.defaultProfiles
Tests so far on a Vivotek encoder we have shows that it works. Running the test suite causes everything else to work as expected with a single video source