There can now only be one CameraSource running.
Video frames are decoded in their own thread, and then converted by users in the user's threads.
The CameraSource API is entirely thread-safe and controls the video decoding thread.
The video device only stays open as long as there are users subscribed to the CameraSource.
We use a dangerous combination of spinlocks and memory fences to keep things synchronized.
The qTox Project is not associated with the Tox Project in any way, with the
exception of "qTox" using the Tox Projet's "toxcore" collection of libraries.
In particular, the Tox Projet does not own copyright over the qTox Project's
"qTox" collection of software, source code, and assets.
The qTox Project's assets are under the sole copyright of the qTox
contributors, and no partiular rights are granted to the Tox Project.
If we're going to convert between pixel formats with sws_scale, we might as well do the rescaling in the same step.
Giving a potentially hueg fram to Qt and having it rescale in a separate step is wasted cycles.
We can now get the list of video devices with the dshow ffmpeg device
(so, on Windows). Most of this patch is adapted from libavdevice's dshow
private internal interface, which retrieves useful info but is only
designed to log it to stdout. We reimplement that to get an actual list
of devices names/descriptions, that we can then open with ffmpeg the
refular way.
The qTox Project is not associated with the Tox Project in any ways, with the exception of "qTox" using the Tox Projet's "toxcore" collection of libraries.
In particular, the Tox Projet does not own copyright over the qTox Project's "qTox" collection of software, source code, and assets.
The qTox Project's assets are under the sole copyright of the qTox contributors, and no partiular rights are granted to the Tox Project.