Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Type = eng.DefineComponentType("v4l2.camera", eng.ComponentFactoryFunc(func(ref v0.ComponentRef) (v0.Component, error) { return NewComponent(ref) })). Describe("[V4L2] Camera"). Register()
Type is the Component type
Functions ¶
func NewComponent ¶
func NewComponent(ref v0.ComponentRef) (v0.Component, error)
NewComponent creates a Component
Types ¶
type Camera ¶
type Camera struct { Options // contains filtered or unexported fields }
Camera is camera device
type Component ¶
type Component struct {
// contains filtered or unexported fields
}
Component is the implementation
type Config ¶
type Config struct { Device string `map:"device"` Width int `map:"width"` Height int `map:"height"` Format string `map:"format"` Quality *int `map:"quality"` AutoOn bool `map:"auto-on"` WithSeq bool `map:"with-seq"` SeqSrc string `map:"seq-source"` Casts map[string]string `map:"cast"` }
Config defines camera configuration
type FourCC ¶
type FourCC uint32
FourCC is V4L2 fourcc format
func ParseFourCC ¶
ParseFourCC parses FourCC from a string
func (FourCC) MarshalJSON ¶
MarshalJSON implements json.Marshaler
func (*FourCC) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler
type Options ¶
type Options struct { Device string Width int Height int FourCC FourCC Quality *int WithSeq bool SeqSrc string }
Options is camera options
type State ¶
type State struct { On bool `json:"on"` Width int `json:"width,omitempty"` Height int `json:"height,omitempty"` FourCC FourCC `json:"fourcc"` }
State defines camera state
Click to show internal directories.
Click to hide internal directories.