7#include <initializer_list>
71 int minimum,
int maximum,
int step,
72 int defaultValue,
int value) {
76 minimum, maximum, step, defaultValue, value, &
m_status)};
91 int maximum,
int step,
int defaultValue,
98 minimum, maximum, step, defaultValue, value, &
m_status)};
116 0, 1, 1, defaultValue ? 1 : 0, value ? 1 : 0, &
m_status)};
127 std::string_view value) {
145 std::span<const std::string> choices) {
157 template <
typename T>
159 std::initializer_list<T> choices) {
160 std::vector<std::string> vec;
161 vec.reserve(choices.size());
162 for (
const auto& choice : choices) {
163 vec.emplace_back(choice);
@ name
Definition base.h:690
void SetEnumPropertyChoices(const VideoProperty &property, std::span< const std::string > choices)
Configure enum property choices.
Definition ImageSource.hpp:144
VideoProperty CreateIntegerProperty(std::string_view name, int minimum, int maximum, int step, int defaultValue, int value)
Create an integer property.
Definition ImageSource.hpp:90
VideoProperty CreateStringProperty(std::string_view name, std::string_view value)
Create a string property.
Definition ImageSource.hpp:126
void SetDescription(std::string_view description)
Set source description.
Definition ImageSource.hpp:53
VideoProperty CreateProperty(std::string_view name, VideoProperty::Kind kind, int minimum, int maximum, int step, int defaultValue, int value)
Create a property.
Definition ImageSource.hpp:70
void NotifyError(std::string_view msg)
Signal sinks that an error has occurred.
Definition ImageSource.hpp:33
void SetConnected(bool connected)
Set source connection status.
Definition ImageSource.hpp:43
VideoProperty CreateBooleanProperty(std::string_view name, bool defaultValue, bool value)
Create a boolean property.
Definition ImageSource.hpp:109
void SetEnumPropertyChoices(const VideoProperty &property, std::initializer_list< T > choices)
Configure enum property choices.
Definition ImageSource.hpp:158
A source or sink property.
Definition VideoProperty.hpp:34
CS_Status m_status
Definition VideoSource.hpp:372
VideoSource() noexcept=default
CS_Source m_handle
Video source handle.
Definition VideoSource.hpp:375
CS_PropertyKind
Property kinds.
Definition cscore_c.h:97
void SetSourceConnected(CS_Source source, bool connected, CS_Status *status)
CS_Property CreateSourceProperty(CS_Source source, std::string_view name, CS_PropertyKind kind, int minimum, int maximum, int step, int defaultValue, int value, CS_Status *status)
void SetSourceDescription(CS_Source source, std::string_view description, CS_Status *status)
void SetSourceEnumPropertyChoices(CS_Source source, CS_Property property, std::span< const std::string > choices, CS_Status *status)
void NotifySourceError(CS_Source source, std::string_view msg, CS_Status *status)
Kind
Definition VideoProperty.hpp:41
void SetString(std::string_view value)
Sets the string property value.
Definition VideoProperty.hpp:200
@ kBoolean
Boolean property.
Definition VideoProperty.hpp:45
@ kString
String property.
Definition VideoProperty.hpp:49
@ kInteger
Integer property.
Definition VideoProperty.hpp:47
CameraServer (cscore) namespace.
Definition CvSource.hpp:15