Developer Referencecapture_demand
WebcamDemand
The virtual camera's readers, as its sinks report an open device.
The camera is started before any uplink, since an application can only open a device that
exists, so an auto format resolves to I420 (webcam.device_pixel_format).
Attributes
attributesubject= 'webcam'Functions
funcprepare() -> boolSource Code
async def prepare(self) -> bool:
return await get_shared_webcam().ensure() is not NoneReturns
boolfuncreader() -> Optional[str]Source Code
async def reader(self) -> Optional[str]:
return await asyncio.to_thread(
get_shared_webcam().consumers, False, WEBCAM_DEVICE_RECHECK_SECONDS)Returns
typing.Optional[str]