![]() |
WPILibC++ 2025.3.2
|
A sink for video that accepts a sequence of frames. More...
#include <cscore_oo.h>
Public Types | |
| enum | Kind { kUnknown = CS_SINK_UNKNOWN , kMjpeg = CS_SINK_MJPEG , kCv = CS_SINK_CV , kRaw = CS_SINK_RAW } |
Public Member Functions | |
| VideoSink () noexcept=default | |
| VideoSink (const VideoSink &sink) | |
| VideoSink (VideoSink &&other) noexcept | |
| VideoSink & | operator= (VideoSink other) noexcept |
| ~VideoSink () | |
| operator bool () const | |
| Returns true if the VideoSink is valid. | |
| int | GetHandle () const |
| Returns the VideoSink handle. | |
| bool | operator== (const VideoSink &other) const |
| Kind | GetKind () const |
| Get the kind of the sink. | |
| std::string | GetName () const |
| Get the name of the sink. | |
| std::string | GetDescription () const |
| Get the sink description. | |
| VideoProperty | GetProperty (std::string_view name) |
| Get a property of the sink. | |
| std::vector< VideoProperty > | EnumerateProperties () const |
| Enumerate all properties of this sink. | |
| bool | SetConfigJson (std::string_view config) |
| Set properties from a JSON configuration string. | |
| bool | SetConfigJson (const wpi::json &config) |
| Set properties from a JSON configuration object. | |
| std::string | GetConfigJson () const |
| Get a JSON configuration string. | |
| wpi::json | GetConfigJsonObject () const |
| Get a JSON configuration object. | |
| void | SetSource (VideoSource source) |
| Configure which source should provide frames to this sink. | |
| VideoSource | GetSource () const |
| Get the connected source. | |
| VideoProperty | GetSourceProperty (std::string_view name) |
| Get a property of the associated source. | |
| CS_Status | GetLastStatus () const |
Static Public Member Functions | |
| static std::vector< VideoSink > | EnumerateSinks () |
| Enumerate all existing sinks. | |
Protected Member Functions | |
| VideoSink (CS_Sink handle) | |
Protected Attributes | |
| CS_Status | m_status = 0 |
| CS_Sink | m_handle {0} |
Friends | |
| class | VideoEvent |
| class | VideoSource |
| void | swap (VideoSink &first, VideoSink &second) noexcept |
A sink for video that accepts a sequence of frames.
| enum cs::VideoSink::Kind |
|
defaultnoexcept |
|
inline |
|
inlinenoexcept |
|
inline |
|
inlineexplicitprotected |
| std::vector< VideoProperty > cs::VideoSink::EnumerateProperties | ( | ) | const |
Enumerate all properties of this sink.
|
static |
Enumerate all existing sinks.
|
inline |
Get a JSON configuration string.
| wpi::json cs::VideoSink::GetConfigJsonObject | ( | ) | const |
Get a JSON configuration object.
|
inline |
Get the sink description.
This is sink-kind specific.
|
inline |
|
inline |
Get the kind of the sink.
|
inline |
|
inline |
Get the name of the sink.
The name is an arbitrary identifier provided when the sink is created, and should be unique.
|
inline |
Get a property of the sink.
| name | Property name |
|
inline |
Get the connected source.
|
inline |
Get a property of the associated source.
| name | Property name |
|
inlineexplicit |
|
inline |
|
inline |
Set properties from a JSON configuration object.
| config | configuration |
|
inline |
Set properties from a JSON configuration string.
The format of the JSON input is:
{
"properties": [
{
"name": property name
"value": property value
}
]
}
| config | configuration |
|
inline |
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.
| source | Source |
|
friend |
|
friend |
|
protected |
|
mutableprotected |