ImageSource
- class cscore.ImageSource
Bases:
VideoSourceA base class for single image providing sources.
- create_boolean_property(name: str, default_value: bool, value: bool) cscore._cscore.VideoProperty
Create a boolean property.
- Parameters:
name – Property name
default_value – Default value
value – Current value
- Returns:
Property
- create_integer_property(name: str, minimum: SupportsInt | SupportsIndex, maximum: SupportsInt | SupportsIndex, step: SupportsInt | SupportsIndex, default_value: SupportsInt | SupportsIndex, value: SupportsInt | SupportsIndex) cscore._cscore.VideoProperty
Create an integer property.
- Parameters:
name – Property name
minimum – Minimum value
maximum – Maximum value
step – Step value
default_value – Default value
value – Current value
- Returns:
Property
- create_property(name: str, kind: cscore._cscore.VideoProperty.Kind, minimum: SupportsInt | SupportsIndex, maximum: SupportsInt | SupportsIndex, step: SupportsInt | SupportsIndex, default_value: SupportsInt | SupportsIndex, value: SupportsInt | SupportsIndex) cscore._cscore.VideoProperty
Create a property.
- Parameters:
name – Property name
kind – Property kind
minimum – Minimum value
maximum – Maximum value
step – Step value
default_value – Default value
value – Current value
- Returns:
Property
- create_string_property(name: str, value: str) cscore._cscore.VideoProperty
Create a string property.
- Parameters:
name – Property name
value – Current value
- Returns:
Property
- notify_error(msg: str) None
Signal sinks that an error has occurred. This should be called instead of NotifyFrame when an error occurs.
- Parameters:
msg – Notification message.
- set_connected(connected: bool) None
Set source connection status. Defaults to true.
- Parameters:
connected – True for connected, false for disconnected
- set_description(description: str) None
Set source description.
- Parameters:
description – Description
- set_enum_property_choices(property: cscore._cscore.VideoProperty, choices: List[str]) None
Configure enum property choices.
- Parameters:
property – Property
choices – Choices