WPILibC++  unspecified
cs::CvSourceImpl Class Reference
Inheritance diagram for cs::CvSourceImpl:
Collaboration diagram for cs::CvSourceImpl:

Classes

class  PropertyData
 

Public Member Functions

 CvSourceImpl (llvm::StringRef name, const VideoMode &mode)
 
void Start ()
 
void SetProperty (int property, int value, CS_Status *status) override
 
void SetStringProperty (int property, llvm::StringRef value, CS_Status *status) override
 
void SetBrightness (int brightness, CS_Status *status) override
 
int GetBrightness (CS_Status *status) const override
 
void SetWhiteBalanceAuto (CS_Status *status) override
 
void SetWhiteBalanceHoldCurrent (CS_Status *status) override
 
void SetWhiteBalanceManual (int value, CS_Status *status) override
 
void SetExposureAuto (CS_Status *status) override
 
void SetExposureHoldCurrent (CS_Status *status) override
 
void SetExposureManual (int value, CS_Status *status) override
 
bool SetVideoMode (const VideoMode &mode, CS_Status *status) override
 
void NumSinksChanged () override
 
void NumSinksEnabledChanged () override
 
void PutFrame (cv::Mat &image)
 
void NotifyError (llvm::StringRef msg)
 
int CreateProperty (llvm::StringRef name, CS_PropertyKind kind, int minimum, int maximum, int step, int defaultValue, int value)
 
int CreateProperty (llvm::StringRef name, CS_PropertyKind kind, int minimum, int maximum, int step, int defaultValue, int value, std::function< void(CS_Property property)> onChange)
 
void SetEnumPropertyChoices (int property, llvm::ArrayRef< std::string > choices, CS_Status *status)
 
- Public Member Functions inherited from cs::SourceImpl
 SourceImpl (llvm::StringRef name)
 
 SourceImpl (const SourceImpl &oth)=delete
 
SourceImploperator= (const SourceImpl &oth)=delete
 
llvm::StringRef GetName () const
 
void SetDescription (llvm::StringRef description)
 
llvm::StringRef GetDescription (llvm::SmallVectorImpl< char > &buf) const
 
void SetConnected (bool connected)
 
bool IsConnected () const
 
int GetNumSinks () const
 
void AddSink ()
 
void RemoveSink ()
 
int GetNumSinksEnabled () const
 
void EnableSink ()
 
void DisableSink ()
 
uint64_t GetCurFrameTime ()
 
Frame GetCurFrame ()
 
Frame GetNextFrame ()
 
Frame GetNextFrame (double timeout)
 
void Wakeup ()
 
int GetPropertyIndex (llvm::StringRef name) const
 
llvm::ArrayRef< int > EnumerateProperties (llvm::SmallVectorImpl< int > &vec, CS_Status *status) const
 
CS_PropertyKind GetPropertyKind (int property) const
 
llvm::StringRef GetPropertyName (int property, llvm::SmallVectorImpl< char > &buf, CS_Status *status) const
 
int GetProperty (int property, CS_Status *status) const
 
int GetPropertyMin (int property, CS_Status *status) const
 
int GetPropertyMax (int property, CS_Status *status) const
 
int GetPropertyStep (int property, CS_Status *status) const
 
int GetPropertyDefault (int property, CS_Status *status) const
 
llvm::StringRef GetStringProperty (int property, llvm::SmallVectorImpl< char > &buf, CS_Status *status) const
 
std::vector< std::string > GetEnumPropertyChoices (int property, CS_Status *status) const
 
VideoMode GetVideoMode (CS_Status *status) const
 
virtual bool SetPixelFormat (VideoMode::PixelFormat pixelFormat, CS_Status *status)
 
virtual bool SetResolution (int width, int height, CS_Status *status)
 
virtual bool SetFPS (int fps, CS_Status *status)
 
std::vector< VideoModeEnumerateVideoModes (CS_Status *status) const
 
std::unique_ptr< ImageAllocImage (VideoMode::PixelFormat pixelFormat, int width, int height, size_t size)
 

Protected Member Functions

std::unique_ptr< PropertyImplCreateEmptyProperty (llvm::StringRef name) const override
 
bool CacheProperties (CS_Status *status) const override
 
- Protected Member Functions inherited from cs::SourceImpl
void PutFrame (VideoMode::PixelFormat pixelFormat, int width, int height, llvm::StringRef data, Frame::Time time)
 
void PutFrame (std::unique_ptr< Image > image, Frame::Time time)
 
void PutError (llvm::StringRef msg, Frame::Time time)
 
PropertyImplGetProperty (int property)
 
const PropertyImplGetProperty (int property) const
 
void NotifyPropertyCreated (int propIndex, PropertyImpl &prop)
 
void UpdatePropertyValue (int property, bool setString, int value, llvm::StringRef valueStr)
 

Additional Inherited Members

- Protected Attributes inherited from cs::SourceImpl
std::atomic_int m_numSinks {0}
 
std::atomic_int m_numSinksEnabled {0}
 
std::vector< std::unique_ptr< PropertyImpl > > m_propertyData
 
llvm::StringMap< int > m_properties
 
std::vector< VideoModem_videoModes
 
VideoMode m_mode
 
std::atomic_bool m_properties_cached {false}
 
std::mutex m_mutex
 

The documentation for this class was generated from the following files: