Closed ariovistus closed 5 years ago
A bunch of the VideoSink and VideoSource subclasses appear to have default no-arg constructors. @PeterJohnson are these intended to be usable?
The no-args constructor initializes the C++ wrapper object with an invalid handle (handle=0). No underlying implementation object is created in this case, and calling other functions on that object won't work (they will return an error / set the error flag in the class). That should simply result in nothing happening, not in a crash though.
It looks like I may be missing a couple of null checks in MjpegServerImpl. Will fix.
I suppose we should also not expose the no-args constructors as well, since they're not very useful from Python land.
robotpy-cscore==2019.0.3, fedora 28 with their packaged opencv, seems to be 3.4.1
I run the following code:
as my first attempt to do something with cscore. When I try to connect to http://localhost:1181, the segfault occurs. gdb doesn't give me much:
workaround is simple:
and everything works, but
help(UsbCamera)
suggests the former invocation is valid: