[FFmpeg-devel] [PATCH] kinect for windows v2 indev
notzed at gmail.com
Tue Jun 11 05:46:07 EEST 2019
Here's a patch to add a "Kinect for Windows v2" camera indev via
libfreenect2. It exports up to 3x streams from the device: raw jpeg
from the camera, the libfreenect2 decoded infra-red as 16-bit greyscale,
and the libfreenect2 decoded depth as 16-bit greyscale in 0.1mm units
(this matches the matlab data i've seen).
I have a few comments not addressed by the patch itself.
libfreenect2 is unfortunately c++ so this patch is also partly c++, if
this isn't acceptable for ffmpeg inclusion let me know and i'll just
publish the patch somewhere else. libfreenect2 is apache 2.0 or gnu gpl
2.0 licensed, I'm not sure how that affects the licensing options/result.
It requires a small patch to libfreenect2 which i've submitted to
that project but am still waiting for it to be applied.
I copied the way the decklink device integrates c++ into the build but
some issues are outstanding although I imagine most apply equally to
decklink. The pkg-config check just checks against stdio.h as i
couldn't work out how to do anything relevent with the libfreenect
headers which only contain class declarations. The makefile doesn't
generate dependencies for .cpp files so incremental builds aren't
absolutely consistent. And finally the build spits out a bunch of
?harmless? warnings from the c-specific arguments passed to g++.
The logging callback for libfreenect2 is global so the way i'm setting
it might not be ideal. Perhaps it should be a singleton and use a null
or pseudo-class av log context?
I'm not a c++ coder so some of the c++ might be a bit archaic and
possibly incorrect. I've used the bare minimum c++ to get it working
and it's mostly just c++'s c-ish dialect.
I've tested it on ubuntu 16.04 and successfully cross-compiled it to a
microsoft windows target but haven't tested it there yet. I've done some
limited valgrind testing but the noise from libfreenect2's dependencies
is overwhelmingly voluminous.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 28699 bytes
Desc: not available
More information about the ffmpeg-devel