libretro.drivers.camera.driver¶
Protocol definition for emulated camera input drivers.
See also
libretro.api.cameraThe matching
ctypestypes and callback definitions.
Classes
Protocol for drivers that supply emulated camera input frames. |
- class CameraDriver[source]¶
Bases:
ProtocolProtocol for drivers that supply emulated camera input frames.
See also
libretro.api.cameraThe matching
ctypestypes and callback definitions.
- abstract property caps¶
The camera capabilities requested by the core.
Set from the
capsfield of theretro_camera_callbackregistered viaRETRO_ENVIRONMENT_GET_CAMERA_INTERFACE.- Parameters:
value – The capability flags requested by the core.
See also
CameraCapabilityFlagsBit flags describing which buffer formats the driver must support.
- abstractmethod start()[source]¶
Begin capturing frames from the emulated camera.
Called by the core through the
retro_camera_callback.startfunction pointer when it wants the camera to start producing frames.See also
retro_camera_start_tThe C function pointer type whose signature this method implements.
- abstractmethod stop()[source]¶
Stop capturing frames from the emulated camera.
Called by the core through the
retro_camera_callback.stopfunction pointer when it no longer needs camera input.See also
retro_camera_stop_tThe C function pointer type whose signature this method implements.
- Return type:
- abstractmethod poll()[source]¶
Advance the camera by one frame, delivering any newly available frame to the core.
Called once per frame by the session before
Core.run(), so that any pending frame is dispatched throughframe_raw_framebufferorframe_opengl_texture.- Return type:
- abstract property width¶
The width of camera frames in pixels, as requested by the core.
A value of
0lets the driver pick its preferred width. Set from thewidthfield of theretro_camera_callback.- Parameters:
value – The frame width in pixels requested by the core.
- abstract property height¶
The height of camera frames in pixels, as requested by the core.
A value of
0lets the driver pick its preferred height. Set from theheightfield of theretro_camera_callback.- Parameters:
value – The frame height in pixels requested by the core.
- abstract property frame_raw_framebuffer¶
Callback the driver invokes to deliver a frame backed by a raw framebuffer.
Registered by the core through
retro_camera_callback.frame_raw_framebuffer;Noneif the core has not registered one.- Parameters:
value – The callback to invoke for raw framebuffer frames, or
Noneto clear it.
See also
retro_camera_frame_raw_framebuffer_tThe C function pointer type that this attribute holds.
- __init__(*args, **kwargs)¶
- classmethod __new__(*args, **kwargs)¶
- abstract property frame_opengl_texture¶
Callback the driver invokes to deliver a frame backed by an OpenGL texture.
Registered by the core through
retro_camera_callback.frame_opengl_texture;Noneif the core has not registered one.- Parameters:
value – The callback to invoke for OpenGL texture frames, or
Noneto clear it.
See also
retro_camera_frame_opengl_texture_tThe C function pointer type that this attribute holds.
- abstract property initialized¶
Callback the driver invokes after it finishes initializing.
Registered by the core through
retro_camera_callback.initialized;Noneif the core has not registered one.- Parameters:
value – The callback to invoke after initialization, or
Noneto clear it.
See also
retro_camera_lifetime_status_tThe C function pointer type that this attribute holds.
- abstract property deinitialized¶
Callback the driver invokes immediately before it deinitializes.
Registered by the core through
retro_camera_callback.deinitialized;Noneif the core has not registered one.- Parameters:
value – The callback to invoke before deinitialization, or
Noneto clear it.
See also
retro_camera_lifetime_status_tThe C function pointer type that this attribute holds.