VideoSink

class cscore.VideoSink

Bases: pybind11_object

A sink for video that accepts a sequence of frames.

class Kind(value: int)

Bases: pybind11_object

Members:

kUnknown

kMjpeg

kCv

kCv = <Kind.kCv: 4>
kMjpeg = <Kind.kMjpeg: 2>
kUnknown = <Kind.kUnknown: 0>
property name
property value
enumerateProperties() List[cscore._cscore.VideoProperty]

Enumerate all properties of this sink.

static enumerateSinks() List[cscore._cscore.VideoSink]

Enumerate all existing sinks.

Returns:

Vector of sinks.

getConfigJson() str

Get a JSON configuration string.

Returns:

JSON configuration string

getConfigJsonObject() json

Get a JSON configuration object.

Returns:

JSON configuration object

getDescription() str

Get the sink description. This is sink-kind specific.

getHandle() int
getKind() cscore._cscore.VideoSink.Kind

Get the kind of the sink.

getLastStatus() int
getName() str

Get the name of the sink. The name is an arbitrary identifier provided when the sink is created, and should be unique.

getProperty(name: str) cscore._cscore.VideoProperty

Get a property of the sink.

Parameters:

name – Property name

Returns:

Property (kind Property::kNone if no property with the given name exists)

getSource() cscore._cscore.VideoSource

Get the connected source.

Returns:

Connected source (empty if none connected).

getSourceProperty(name: str) cscore._cscore.VideoProperty

Get a property of the associated source.

Parameters:

name – Property name

Returns:

Property (kind Property::kNone if no property with the given name exists or no source connected)

setConfigJson(*args, **kwargs)

Overloaded function.

  1. setConfigJson(self: cscore._cscore.VideoSink, config: str) -> bool

Set properties from a JSON configuration string.

The format of the JSON input is:

{
    "properties": [
        {
            "name": property name
            "value": property value
        }
    ]
}
Parameters:

config – configuration

Returns:

True if set successfully

  1. setConfigJson(self: cscore._cscore.VideoSink, config: json) -> bool

Set properties from a JSON configuration object.

Parameters:

config – configuration

Returns:

True if set successfully

setSource(source: cscore._cscore.VideoSource) None

Configure which source should provide frames to this sink. Each sink can accept frames from only a single source, but a single source can provide frames to multiple clients.

Parameters:

source – Source