Selkies
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() -> bool
Source Code
async def prepare(self) -> bool:
    return await get_shared_webcam().ensure() is not None

Returns

bool
funcreader() -> 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]

On this page

Edit on GitHub