WPILibC++  unspecified
cs::SourceImpl Class Referenceabstract
Inheritance diagram for cs::SourceImpl:
Collaboration diagram for cs::SourceImpl:

Public Member Functions

 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
virtual void SetProperty (int property, int value, CS_Status *status)=0
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
virtual void SetStringProperty (int property, llvm::StringRef value, CS_Status *status)=0
std::vector< std::string > GetEnumPropertyChoices (int property, CS_Status *status) const
virtual void SetBrightness (int brightness, CS_Status *status)=0
virtual int GetBrightness (CS_Status *status) const =0
virtual void SetWhiteBalanceAuto (CS_Status *status)=0
virtual void SetWhiteBalanceHoldCurrent (CS_Status *status)=0
virtual void SetWhiteBalanceManual (int value, CS_Status *status)=0
virtual void SetExposureAuto (CS_Status *status)=0
virtual void SetExposureHoldCurrent (CS_Status *status)=0
virtual void SetExposureManual (int value, CS_Status *status)=0
VideoMode GetVideoMode (CS_Status *status) const
virtual bool SetVideoMode (const VideoMode &mode, CS_Status *status)=0
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

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)
virtual void NumSinksChanged ()=0
virtual void NumSinksEnabledChanged ()=0
PropertyImplGetProperty (int property)
const PropertyImplGetProperty (int property) const
virtual std::unique_ptr< PropertyImplCreateEmptyProperty (llvm::StringRef name) const =0
virtual bool CacheProperties (CS_Status *status) const =0
void NotifyPropertyCreated (int propIndex, PropertyImpl &prop)
void UpdatePropertyValue (int property, bool setString, int value, llvm::StringRef valueStr)

Protected Attributes

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}
wpi::mutex m_mutex


class Frame

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