A native port should solve #1113 on OSX (also blocked by #840) and will allow us to improve platform support and remove the dependency on opencv.
Also remove the hard-coded csc dependency.
Hopefully we can use the same code for enumerating video devices on osx. (see ticket:1113#comment:4)
The same code can probably be used to capture the whole desktop on win32: DirectShow and may help with #389.
Alternatively, we may be able to the same thing using pyobjc:
working capture script
The macos capture script above is based on How can I capture iSight frames with Python in Snow Leopard?. It works.. just not on my dev VM (light comes on, but frames never arrive), so I have to ssh to the mac mini to test it.
Still TODO:
Note: the py2app packaging for QTKit
involved using packages and not modules? (IIRC)
For win32:
See also #1627
PKGBUILD patch to limit the number of opencv modules we build with makepkg
The patch above removes all the dependencies we don't need from the opencv MSYS2 package build, saving around 80MB of disk space. The savings for our installer package are much smaller (~5MB) because we already trimmed it quite a bit and the file is compressed.
This should make things less brittle too: the opencv package seems to break very regularly in MSYS2 due to the huge amount of dependencies it has and because of the way the module loads them all - they would need to rebuild the package every time a dependency is updated.
Only problem is that the 32-bit version crashes hard, even the simple opencv_version.exe
tool does... so r18290 disables webcam support in 32-bit builds.
port to AVFoundation
We now build AVFoundation
(r18246, also for python3: r18296 + r18297), and we have a nasty py2app packaging workaround too: r18298.
The webcam port to AVFoundation
above might work, but we're blocked by this pyobjc bug: Support marshalling OS_dispatch_queue on macOS 10.10 and 10.11
I'm not sure if this can be worked around using ctypes either.
Once that's fixed, we'll need to to parse the sampleBuffer
object using:
from Quartz import CoreVideo
then:
Milestone renamed
pyobjc has moved to github: https://github.com/ronaldoussoren/pyobjc/. But this particular issue was not, it's been wiped like it never existed!
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1231