descriptors

package
v0.0.0-...-b9a5b96 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

This file implements the descriptors as defined in the UVC spec 1.5, section 3.6.

This file implements the descriptors as defined in the UVC spec 1.5, section 3.8.

This file implements the descriptors as defined in the UVC spec 1.5, section 3.7.

This file implements the descriptors as defined in the UVC spec 1.5, section 3.10.

This file implements the descriptors as defined in the UVC spec 1.5, section 3.9.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidDescriptor = errors.New("invalid descriptor")
)

Functions

This section is empty.

Types

type AnalogVideoLockStatus

type AnalogVideoLockStatus int
const (
	AnalogVideoLockStatusLocked    AnalogVideoLockStatus = 0
	AnalogVideoLockStatusNotLocked AnalogVideoLockStatus = 1
)

type AnalogVideoLockStatusControl

type AnalogVideoLockStatusControl struct {
	AnalogVideoLockStatus AnalogVideoLockStatus
}

func (*AnalogVideoLockStatusControl) FeatureBit

func (avlsc *AnalogVideoLockStatusControl) FeatureBit() int

func (*AnalogVideoLockStatusControl) MarshalBinary

func (avlsc *AnalogVideoLockStatusControl) MarshalBinary() ([]byte, error)

func (*AnalogVideoLockStatusControl) UnmarshalBinary

func (avlsc *AnalogVideoLockStatusControl) UnmarshalBinary(buf []byte) error

func (*AnalogVideoLockStatusControl) Value

type AnalogVideoStandard

type AnalogVideoStandard int
const (
	AnalogVideoStandardNone    AnalogVideoStandard = 0
	AnalogVideoStandardNTSC525 AnalogVideoStandard = 1 // NTSC 525/60
	AnalogVideoStandardPAL625  AnalogVideoStandard = 2 // PAL 625/50
	AnalogVideoStandardSECAM   AnalogVideoStandard = 3 // SECAM 625/50
	AnalogVideoStandardNTSC625 AnalogVideoStandard = 4 // NTSC 625/50
	AnalogVideoStandardPAL525  AnalogVideoStandard = 5 // PAL 525/60
)

type AnalogVideoStandardControl

type AnalogVideoStandardControl struct {
	AnalogVideoStandard AnalogVideoStandard
}

func (*AnalogVideoStandardControl) FeatureBit

func (avsc *AnalogVideoStandardControl) FeatureBit() int

func (*AnalogVideoStandardControl) MarshalBinary

func (avsc *AnalogVideoStandardControl) MarshalBinary() ([]byte, error)

func (*AnalogVideoStandardControl) UnmarshalBinary

func (avsc *AnalogVideoStandardControl) UnmarshalBinary(buf []byte) error

func (*AnalogVideoStandardControl) Value

type AudioStreamingInterfaceDescriptorSubtype

type AudioStreamingInterfaceDescriptorSubtype byte
const (
	AudioStreamingInterfaceDescriptorSubtypeUndefined      AudioStreamingInterfaceDescriptorSubtype = 0x00
	AudioStreamingInterfaceDescriptorSubtypeHeader         AudioStreamingInterfaceDescriptorSubtype = 0x01
	AudioStreamingInterfaceDescriptorSubtypeInputTerminal  AudioStreamingInterfaceDescriptorSubtype = 0x02
	AudioStreamingInterfaceDescriptorSubtypeOutputTerminal AudioStreamingInterfaceDescriptorSubtype = 0x03
	AudioStreamingInterfaceDescriptorSubtypeMixerUnit      AudioStreamingInterfaceDescriptorSubtype = 0x04
	AudioStreamingInterfaceDescriptorSubtypeSelectorUnit   AudioStreamingInterfaceDescriptorSubtype = 0x05
	AudioStreamingInterfaceDescriptorSubtypeFeatureUnit    AudioStreamingInterfaceDescriptorSubtype = 0x06
	AudioStreamingInterfaceDescriptorSubtypeProcessingUnit AudioStreamingInterfaceDescriptorSubtype = 0x07
	AudioStreamingInterfaceDescriptorSubtypeExtensionUnit  AudioStreamingInterfaceDescriptorSubtype = 0x08
)

type AutoExposureMode

type AutoExposureMode int
const (
	AutoExposureModeManual           AutoExposureMode = 1
	AutoExposureModeAuto             AutoExposureMode = 2
	AutoExposureModeShutterPriority  AutoExposureMode = 4
	AutoExposureModeAperturePriority AutoExposureMode = 8
)

type AutoExposureModeControl

type AutoExposureModeControl struct {
	Mode AutoExposureMode
}

Control Request for Auto-Exposure Mode as defined in UVC spec 1.5, 4.2.2.1.2

func (*AutoExposureModeControl) FeatureBit

func (aemc *AutoExposureModeControl) FeatureBit() int

func (*AutoExposureModeControl) MarshalBinary

func (aemc *AutoExposureModeControl) MarshalBinary() ([]byte, error)

func (*AutoExposureModeControl) UnmarshalBinary

func (aemc *AutoExposureModeControl) UnmarshalBinary(buf []byte) error

func (*AutoExposureModeControl) Value

type AutoExposurePriority

type AutoExposurePriority int
const (
	AutoExposurePriorityConstant AutoExposurePriority = 0
	AutoExposurePriorityDynamic  AutoExposurePriority = 1
)

type AutoExposurePriorityControl

type AutoExposurePriorityControl struct {
	Priority AutoExposurePriority
}

Control Request for Auto-Exposure Priority as defined in UVC spec 1.5, 4.2.2.1.3

func (*AutoExposurePriorityControl) FeatureBit

func (aepc *AutoExposurePriorityControl) FeatureBit() int

func (*AutoExposurePriorityControl) MarshalBinary

func (aepc *AutoExposurePriorityControl) MarshalBinary() ([]byte, error)

func (*AutoExposurePriorityControl) UnmarshalBinary

func (aepc *AutoExposurePriorityControl) UnmarshalBinary(buf []byte) error

func (*AutoExposurePriorityControl) Value

type BacklightCompensationControl

type BacklightCompensationControl struct {
	BacklightCompensation uint16
}

func (*BacklightCompensationControl) FeatureBit

func (bcc *BacklightCompensationControl) FeatureBit() int

func (*BacklightCompensationControl) MarshalBinary

func (bcc *BacklightCompensationControl) MarshalBinary() ([]byte, error)

func (*BacklightCompensationControl) UnmarshalBinary

func (bcc *BacklightCompensationControl) UnmarshalBinary(buf []byte) error

func (*BacklightCompensationControl) Value

type BrightnessControl

type BrightnessControl struct {
	Brightness uint16
}

func (*BrightnessControl) FeatureBit

func (bc *BrightnessControl) FeatureBit() int

func (*BrightnessControl) MarshalBinary

func (bc *BrightnessControl) MarshalBinary() ([]byte, error)

func (*BrightnessControl) UnmarshalBinary

func (bc *BrightnessControl) UnmarshalBinary(buf []byte) error

func (*BrightnessControl) Value

type CameraTerminalControlDescriptor

type CameraTerminalControlDescriptor interface {
	Value() CameraTerminalControlSelector
	FeatureBit() int //Indicates the position of the control on the controls bitmap
	encoding.BinaryMarshaler
	encoding.BinaryUnmarshaler
}

type CameraTerminalControlSelector

type CameraTerminalControlSelector int
const (
	CameraTerminalControlSelectorUndefined                   CameraTerminalControlSelector = 0x00
	CameraTerminalControlSelectorScanningModeControl         CameraTerminalControlSelector = 0x01
	CameraTerminalControlSelectorAutoExposureModeControl     CameraTerminalControlSelector = 0x02
	CameraTerminalControlSelectorAutoExposurePriorityControl CameraTerminalControlSelector = 0x03
	CameraTerminalControlSelectorExposureTimeAbsoluteControl CameraTerminalControlSelector = 0x04
	CameraTerminalControlSelectorExposureTimeRelativeControl CameraTerminalControlSelector = 0x05
	CameraTerminalControlSelectorFocusAbsoluteControl        CameraTerminalControlSelector = 0x06
	CameraTerminalControlSelectorFocusRelativeControl        CameraTerminalControlSelector = 0x07
	CameraTerminalControlSelectorFocusAutoControl            CameraTerminalControlSelector = 0x08
	CameraTerminalControlSelectorIrisAbsoluteControl         CameraTerminalControlSelector = 0x09
	CameraTerminalControlSelectorIrisRelativeControl         CameraTerminalControlSelector = 0x0A
	CameraTerminalControlSelectorZoomAbsoluteControl         CameraTerminalControlSelector = 0x0B
	CameraTerminalControlSelectorZoomRelativeControl         CameraTerminalControlSelector = 0x0C
	CameraTerminalControlSelectorPanTiltAbsoluteControl      CameraTerminalControlSelector = 0x0D
	CameraTerminalControlSelectorPanTiltRelativeControl      CameraTerminalControlSelector = 0x0E
	CameraTerminalControlSelectorRollAbsoluteControl         CameraTerminalControlSelector = 0x0F
	CameraTerminalControlSelectorRollRelativeControl         CameraTerminalControlSelector = 0x10
	CameraTerminalControlSelectorPrivacyControl              CameraTerminalControlSelector = 0x11
	CameraTerminalControlSelectorFocusSimpleControl          CameraTerminalControlSelector = 0x12
	CameraTerminalControlSelectorWindowControl               CameraTerminalControlSelector = 0x13
	CameraTerminalControlSelectorRegionOfInterestControl     CameraTerminalControlSelector = 0x14
)

type CameraTerminalDescriptor

type CameraTerminalDescriptor struct {
	InputTerminalDescriptor
	ObjectiveFocalLengthMin uint16
	ObjectiveFocalLengthMax uint16
	OcularFocalLength       uint16
	ControlsBitmask         []byte // Size 3 bitmap that indicates which controls are supported
}

CameraTerminalDescriptor as defined in UVC spec 1.5, 3.7.2.3

func (*CameraTerminalDescriptor) UnmarshalBinary

func (ctd *CameraTerminalDescriptor) UnmarshalBinary(buf []byte) error

type ClassCode

type ClassCode byte
const (
	ClassCodeVideo ClassCode = 0x0E
)

type ClassSpecificDescriptorType

type ClassSpecificDescriptorType int
const (
	ClassSpecificDescriptorTypeUndefined     ClassSpecificDescriptorType = 0x20
	ClassSpecificDescriptorTypeDevice        ClassSpecificDescriptorType = 0x21
	ClassSpecificDescriptorTypeConfiguration ClassSpecificDescriptorType = 0x22
	ClassSpecificDescriptorTypeString        ClassSpecificDescriptorType = 0x23
	ClassSpecificDescriptorTypeInterface     ClassSpecificDescriptorType = 0x24
	ClassSpecificDescriptorTypeEndpoint      ClassSpecificDescriptorType = 0x25
)

type ColorMatchingDescriptor

type ColorMatchingDescriptor struct {
	ColorPrimaries          uint8
	TransferCharacteristics uint8
	MatrixCoefficients      uint8
}

ColorMatchingDescriptor as defined in UVC spec 1.5, 3.9.2.6

func (*ColorMatchingDescriptor) UnmarshalBinary

func (cmd *ColorMatchingDescriptor) UnmarshalBinary(buf []byte) error

type ContrastAutoControl

type ContrastAutoControl struct {
	Auto uint16
}

func (*ContrastAutoControl) FeatureBit

func (cac *ContrastAutoControl) FeatureBit() int

func (*ContrastAutoControl) MarshalBinary

func (cac *ContrastAutoControl) MarshalBinary() ([]byte, error)

func (*ContrastAutoControl) UnmarshalBinary

func (cac *ContrastAutoControl) UnmarshalBinary(buf []byte) error

func (*ContrastAutoControl) Value

type ContrastControl

type ContrastControl struct {
	Contrast uint16
}

func (*ContrastControl) FeatureBit

func (cc *ContrastControl) FeatureBit() int

func (*ContrastControl) MarshalBinary

func (cc *ContrastControl) MarshalBinary() ([]byte, error)

func (*ContrastControl) UnmarshalBinary

func (cc *ContrastControl) UnmarshalBinary(buf []byte) error

func (*ContrastControl) Value

type ControlInterface

type ControlInterface interface {
	encoding.BinaryUnmarshaler
	// contains filtered or unexported methods
}

func UnmarshalControlInterface

func UnmarshalControlInterface(buf []byte) (ControlInterface, error)

func UnmarshalInputTerminal

func UnmarshalInputTerminal(buf []byte) (ControlInterface, error)

type DVFormatDescriptor

type DVFormatDescriptor struct {
	FormatIndex             uint8
	MaxVideoFrameBufferSize uint32
	FormatType              uint8
}

func (*DVFormatDescriptor) Index

func (dvfd *DVFormatDescriptor) Index() uint8

func (*DVFormatDescriptor) UnmarshalBinary

func (dvfd *DVFormatDescriptor) UnmarshalBinary(buf []byte) error

type DVStreamHeader

type DVStreamHeader struct {
	BitFieldHeader uint8
	PTS            uint32
	SCR            uint64
}

func (*DVStreamHeader) EndOfFrame

func (dvsh *DVStreamHeader) EndOfFrame() bool

func (*DVStreamHeader) EndOfHeader

func (dvsh *DVStreamHeader) EndOfHeader() bool

func (*DVStreamHeader) Error

func (dvsh *DVStreamHeader) Error() bool

func (*DVStreamHeader) FrameIdentifier

func (dvsh *DVStreamHeader) FrameIdentifier() bool

func (*DVStreamHeader) HasPTS

func (dvsh *DVStreamHeader) HasPTS() bool

func (*DVStreamHeader) HasSCR

func (dvsh *DVStreamHeader) HasSCR() bool

func (*DVStreamHeader) StillImage

func (dvsh *DVStreamHeader) StillImage() bool

func (*DVStreamHeader) UnmarshalBinary

func (dvsh *DVStreamHeader) UnmarshalBinary(buf []byte) error

type DigitalMultiplerControl

type DigitalMultiplerControl struct {
	DigitalMultipler uint16
}

Deprecated in 1.5

func (*DigitalMultiplerControl) FeatureBit

func (dmc *DigitalMultiplerControl) FeatureBit() int

func (*DigitalMultiplerControl) MarshalBinary

func (dmc *DigitalMultiplerControl) MarshalBinary() ([]byte, error)

func (*DigitalMultiplerControl) UnmarshalBinary

func (dmc *DigitalMultiplerControl) UnmarshalBinary(buf []byte) error

func (*DigitalMultiplerControl) Value

type DigitalMultiplerLimitControl

type DigitalMultiplerLimitControl struct {
	DigitalMultiplerLimit uint16
}

func (*DigitalMultiplerLimitControl) FeatureBit

func (dmlc *DigitalMultiplerLimitControl) FeatureBit() int

func (*DigitalMultiplerLimitControl) MarshalBinary

func (dmlc *DigitalMultiplerLimitControl) MarshalBinary() ([]byte, error)

func (*DigitalMultiplerLimitControl) UnmarshalBinary

func (dmlc *DigitalMultiplerLimitControl) UnmarshalBinary(buf []byte) error

func (*DigitalMultiplerLimitControl) Value

type DigitalWindowControl

type DigitalWindowControl struct {
	//TODO where should we validate bottom >= top and right >= left ?
	Top    int16 // Pixels
	Left   int16 // Pixels
	Bottom int16 // Pixels
	Right  int16 // Pixels

	Steps      int16
	StepsUnits StepUnits
}

Control Request for Digital Window as defined in UVC spec 1.5, 4.2.2.1.19

func (*DigitalWindowControl) FeatureBit

func (dwc *DigitalWindowControl) FeatureBit() int

func (*DigitalWindowControl) MarshalBinary

func (dwc *DigitalWindowControl) MarshalBinary() ([]byte, error)

func (*DigitalWindowControl) UnmarshalBinary

func (dwc *DigitalWindowControl) UnmarshalBinary(buf []byte) error

func (*DigitalWindowControl) Value

type EncodingUnitDescriptor

type EncodingUnitDescriptor struct {
	UnitID                 uint8
	SourceID               uint8
	DescriptionIndex       uint8
	ControlsBitmask        uint32
	ControlsRuntimeBitmask uint32
}

EncodingUnitDescriptor as defined in UVC spec 1.5, 3.7.2.6

func (*EncodingUnitDescriptor) UnmarshalBinary

func (eud *EncodingUnitDescriptor) UnmarshalBinary(buf []byte) error

type ExposureTimeAbsoluteControl

type ExposureTimeAbsoluteControl struct {
	Time uint32
}

Control Request for Exposure Time (Absolute) as defined in UVC spec 1.5, 4.2.2.1.4

func (*ExposureTimeAbsoluteControl) FeatureBit

func (etac *ExposureTimeAbsoluteControl) FeatureBit() int

func (*ExposureTimeAbsoluteControl) MarshalBinary

func (etac *ExposureTimeAbsoluteControl) MarshalBinary() ([]byte, error)

func (*ExposureTimeAbsoluteControl) UnmarshalBinary

func (etrc *ExposureTimeAbsoluteControl) UnmarshalBinary(buf []byte) error

func (*ExposureTimeAbsoluteControl) Value

type ExposureTimeRelative

type ExposureTimeRelative int
const (
	ExposureTimeRelativeDefault   ExposureTimeRelative = 0x00
	ExposureTimeRelativeIncrement ExposureTimeRelative = 0x01
	ExposureTimeRelativeDecrement ExposureTimeRelative = 0xFF
)

type ExposureTimeRelativeControl

type ExposureTimeRelativeControl struct {
	Time ExposureTimeRelative
}

Control Request for Exposure Time (Relative) as defined in UVC spec 1.5, 4.2.2.1.5

func (*ExposureTimeRelativeControl) FeatureBit

func (etrc *ExposureTimeRelativeControl) FeatureBit() int

func (*ExposureTimeRelativeControl) MarshalBinary

func (etrc *ExposureTimeRelativeControl) MarshalBinary() ([]byte, error)

func (*ExposureTimeRelativeControl) UnmarshalBinary

func (etrc *ExposureTimeRelativeControl) UnmarshalBinary(buf []byte) error

func (*ExposureTimeRelativeControl) Value

type ExtensionUnitDescriptor

type ExtensionUnitDescriptor struct {
	UnitID            uint8
	GUIDExtensionCode [16]byte
	NumControls       uint8
	SourceIDs         []uint8
	ControlsBitmask   []byte
	DescriptionIndex  uint8
}

ExtensionUnitDescriptor as defined in UVC spec 1.5, 3.7.2.7

func (*ExtensionUnitDescriptor) UnmarshalBinary

func (eud *ExtensionUnitDescriptor) UnmarshalBinary(buf []byte) error

type ExternalTerminalType

type ExternalTerminalType uint16
const (
	ExternalTerminalTypeVendorSpecific     ExternalTerminalType = 0x0400
	ExternalTerminalTypeCompositeConnector ExternalTerminalType = 0x0401
	ExternalTerminalTypeSVideoConnector    ExternalTerminalType = 0x0402
	ExternalTerminalTypeComponentConnector ExternalTerminalType = 0x0403
)

type FocusAbsoluteControl

type FocusAbsoluteControl struct {
	Focus uint16
}

Control Request for Focus Absolute as defined in UVC spec 1.5, 4.2.2.1.6

func (*FocusAbsoluteControl) FeatureBit

func (fac *FocusAbsoluteControl) FeatureBit() int

func (*FocusAbsoluteControl) MarshalBinary

func (fac *FocusAbsoluteControl) MarshalBinary() ([]byte, error)

func (*FocusAbsoluteControl) UnmarshalBinary

func (fac *FocusAbsoluteControl) UnmarshalBinary(buf []byte) error

func (*FocusAbsoluteControl) Value

type FocusAutoControl

type FocusAutoControl struct {
	FocusAuto bool
}

Control Request for Focus, Auto Control as defined in UVC spec 1.5, 4.2.2.1.9

func (*FocusAutoControl) FeatureBit

func (fac *FocusAutoControl) FeatureBit() int

func (*FocusAutoControl) MarshalBinary

func (fac *FocusAutoControl) MarshalBinary() ([]byte, error)

func (*FocusAutoControl) UnmarshalBinary

func (fac *FocusAutoControl) UnmarshalBinary(buf []byte) error

func (*FocusAutoControl) Value

type FocusRelative

type FocusRelative uint8
const (
	FocusRelativeStop              FocusRelative = 0x00
	FocusRelativeNearDirection     FocusRelative = 0x01
	FocusRelativeInfiniteDirection FocusRelative = 0xFF
)

type FocusRelativeControl

type FocusRelativeControl struct {
	Focus FocusRelative
	Speed uint8
}

Control Request for Focus Relative as defined in UVC spec 1.5, 4.2.2.1.7

func (*FocusRelativeControl) FeatureBit

func (frc *FocusRelativeControl) FeatureBit() int

func (*FocusRelativeControl) MarshalBinary

func (frc *FocusRelativeControl) MarshalBinary() ([]byte, error)

func (*FocusRelativeControl) UnmarshalBinary

func (frc *FocusRelativeControl) UnmarshalBinary(buf []byte) error

func (*FocusRelativeControl) Value

type FocusSimple

type FocusSimple uint8
const (
	FocusSimpleFullRange FocusSimple = 0x00
	FocusSimpleMacro     FocusSimple = 0x01 // Less than 0.3 meters
	FocusSimplePeople    FocusSimple = 0x02 // 0.3 meters to 3 meters
	FocusSimpleScene     FocusSimple = 0x03 // 3 meters to infinity
)

type FocusSimpleRangeControl

type FocusSimpleRangeControl struct {
	Focus FocusSimple
}

Control Request for Focus Simple Range as defined in UVC spec 1.5, 4.2.2.1.8

func (*FocusSimpleRangeControl) FeatureBit

func (fsrc *FocusSimpleRangeControl) FeatureBit() int

func (*FocusSimpleRangeControl) MarshalBinary

func (fsrc *FocusSimpleRangeControl) MarshalBinary() ([]byte, error)

func (*FocusSimpleRangeControl) UnmarshalBinary

func (fsrc *FocusSimpleRangeControl) UnmarshalBinary(buf []byte) error

func (*FocusSimpleRangeControl) Value

type FormatDescriptor

type FormatDescriptor interface {

	// Index returns the index of the format descriptor in the format descriptor array.
	// This is identical to retrieving FormatIndex from the descriptor but is provided
	// for convenience.
	Index() uint8
	// contains filtered or unexported methods
}

type FrameBasedFormatDescriptor

type FrameBasedFormatDescriptor struct {
	FormatIndex         uint8
	NumFrameDescriptors uint8
	GUIDFormat          uuid.UUID
	BitsPerPixel        uint8
	DefaultFrameIndex   uint8
	AspectRatioX        uint8
	AspectRatioY        uint8
	InterlaceFlags      uint8
	CopyProtect         uint8
	VariableSize        bool
}

func (*FrameBasedFormatDescriptor) FourCC

func (fbfd *FrameBasedFormatDescriptor) FourCC() ([4]byte, error)

func (*FrameBasedFormatDescriptor) Index

func (fbfd *FrameBasedFormatDescriptor) Index() uint8

func (*FrameBasedFormatDescriptor) UnmarshalBinary

func (fbfd *FrameBasedFormatDescriptor) UnmarshalBinary(buf []byte) error

type FrameBasedFrameDescriptor

type FrameBasedFrameDescriptor struct {
	FrameIndex             uint8
	Capabilities           uint8
	Width, Height          uint16
	MinBitRate, MaxBitRate uint32
	DefaultFrameInterval   time.Duration

	BytesPerLine uint32

	ContinuousFrameInterval struct {
		MinFrameInterval, MaxFrameInterval, FrameIntervalStep time.Duration
	}
	DiscreteFrameIntervals []time.Duration
}

func (*FrameBasedFrameDescriptor) Index

func (fbfd *FrameBasedFrameDescriptor) Index() uint8

func (*FrameBasedFrameDescriptor) UnmarshalBinary

func (fbfd *FrameBasedFrameDescriptor) UnmarshalBinary(buf []byte) error

type FrameBasedStreamHeader

type FrameBasedStreamHeader struct {
	BitFieldHeader uint8
	PTS            uint32
	SCR            uint64
}

func (*FrameBasedStreamHeader) EndOfFrame

func (fbsh *FrameBasedStreamHeader) EndOfFrame() bool

func (*FrameBasedStreamHeader) EndOfHeader

func (fbsh *FrameBasedStreamHeader) EndOfHeader() bool

func (*FrameBasedStreamHeader) Error

func (fbsh *FrameBasedStreamHeader) Error() bool

func (*FrameBasedStreamHeader) FrameIdentifier

func (fbsh *FrameBasedStreamHeader) FrameIdentifier() bool

func (*FrameBasedStreamHeader) HasPTS

func (fbsh *FrameBasedStreamHeader) HasPTS() bool

func (*FrameBasedStreamHeader) HasSCR

func (fbsh *FrameBasedStreamHeader) HasSCR() bool

func (*FrameBasedStreamHeader) StillImage

func (fbsh *FrameBasedStreamHeader) StillImage() bool

func (*FrameBasedStreamHeader) UnmarshalBinary

func (fbsh *FrameBasedStreamHeader) UnmarshalBinary(buf []byte) error

type FrameDescriptor

type FrameDescriptor interface {

	// Index returns the index of the frame descriptor in the frame descriptor array.
	// This is identical to retrieving FrameIndex from the descriptor but is provided
	// for convenience.
	Index() uint8
	// contains filtered or unexported methods
}

type GainControl

type GainControl struct {
	Gain uint16
}

func (*GainControl) FeatureBit

func (gc *GainControl) FeatureBit() int

func (*GainControl) MarshalBinary

func (gc *GainControl) MarshalBinary() ([]byte, error)

func (*GainControl) UnmarshalBinary

func (gc *GainControl) UnmarshalBinary(buf []byte) error

func (*GainControl) Value

type GammaControl

type GammaControl struct {
	Gamma uint16
}

func (*GammaControl) FeatureBit

func (gc *GammaControl) FeatureBit() int

func (*GammaControl) MarshalBinary

func (gc *GammaControl) MarshalBinary() ([]byte, error)

func (*GammaControl) UnmarshalBinary

func (gc *GammaControl) UnmarshalBinary(buf []byte) error

func (*GammaControl) Value

type H264FormatDescriptor

type H264FormatDescriptor struct {
	FormatIndex                                           uint8
	NumFrameDescriptors                                   uint8
	DefaultFrameIndex                                     uint8
	MaxCodecConfigDelay                                   uint8
	SupportedSliceModesBitmask                            uint8
	SupportedSyncFrameTypesBitmask                        uint8
	ResolutionScaling                                     uint8
	SupportedRateControlModesBitmask                      uint8
	MaxMBPerSecOneResolutionNoScalability                 uint16
	MaxMBPerSecTwoResolutionsNoScalability                uint16
	MaxMBPerSecThreeResolutionsNoScalability              uint16
	MaxMBPerSecFourResolutionsNoScalability               uint16
	MaxMBPerSecOneResolutionTemporalScalability           uint16
	MaxMBPerSecTwoResolutionsTemporalScalability          uint16
	MaxMBPerSecThreeResolutionsTemporalScalability        uint16
	MaxMBPerSecFourResolutionsTemporalScalability         uint16
	MaxMBPerSecOneResolutionTemporalQualityScalability    uint16
	MaxMBPerSecTwoResolutionsTemporalQualityScalability   uint16
	MaxMBPerSecThreeResolutionsTemporalQualityScalability uint16
	MaxMBPerSecFourResolutionsTemporalQualityScalability  uint16
	MaxMBPerSecOneResolutionTemporalSpatialScalability    uint16
	MaxMBPerSecTwoResolutionsTemporalSpatialScalability   uint16
	MaxMBPerSecThreeResolutionsTemporalSpatialScalability uint16
	MaxMBPerSecFourResolutionsTemporalSpatialScalability  uint16
	MaxMBPerSecOneResolutionFullScalability               uint16
	MaxMBPerSecTwoResolutionsFullScalability              uint16
	MaxMBPerSecThreeResolutionsFullScalability            uint16
	MaxMBPerSecFourResolutionsFullScalability             uint16
}

func (*H264FormatDescriptor) Index

func (hfd *H264FormatDescriptor) Index() uint8

func (*H264FormatDescriptor) UnmarshalBinary

func (hfd *H264FormatDescriptor) UnmarshalBinary(buf []byte) error

type H264FrameDescriptor

type H264FrameDescriptor struct {
	FrameIndex             uint8
	Width, Height          uint16
	SARWidth, SARHeight    uint16
	Profile                uint16
	LevelIDC               uint8
	SupportedUsagesBitmask uint32
	CapabilitiesBitmask    uint16
	SVCCapabilitiesBitmask uint32
	MVCCapabilitiesBitmask uint32
	MinBitRate, MaxBitRate uint32
	DefaultFrameInterval   time.Duration
	FrameIntervals         []time.Duration
}

func (*H264FrameDescriptor) Index

func (hfd *H264FrameDescriptor) Index() uint8

func (*H264FrameDescriptor) UnmarshalBinary

func (hfd *H264FrameDescriptor) UnmarshalBinary(buf []byte) error

type H264StreamHeader

type H264StreamHeader struct {
	BitFieldHeader uint8
	PTS            uint32
	SCR            uint64
	SLI            uint16
}

func (*H264StreamHeader) EndOfFrame

func (hsh *H264StreamHeader) EndOfFrame() bool

func (*H264StreamHeader) EndOfHeader

func (hsh *H264StreamHeader) EndOfHeader() bool

func (*H264StreamHeader) EndOfSlice

func (hsh *H264StreamHeader) EndOfSlice() bool

func (*H264StreamHeader) Error

func (hsh *H264StreamHeader) Error() bool

func (*H264StreamHeader) FrameIdentifier

func (hsh *H264StreamHeader) FrameIdentifier() bool

func (*H264StreamHeader) HasPTS

func (hsh *H264StreamHeader) HasPTS() bool

func (*H264StreamHeader) HasSCR

func (hsh *H264StreamHeader) HasSCR() bool

func (*H264StreamHeader) StillImage

func (hsh *H264StreamHeader) StillImage() bool

func (*H264StreamHeader) UnmarshalBinary

func (hsh *H264StreamHeader) UnmarshalBinary(buf []byte) error

type HeaderDescriptor

type HeaderDescriptor struct {
	UVC                            uint16
	TotalLength                    uint16
	ClockFrequency                 uint32
	VideoStreamingInterfaceIndexes []uint8
}

HeaderDescriptor as defined in UVC spec 1.5, 3.7.2.1

func (*HeaderDescriptor) UnmarshalBinary

func (hd *HeaderDescriptor) UnmarshalBinary(buf []byte) error

type HueAutoControl

type HueAutoControl struct {
	Auto uint8
}

func (*HueAutoControl) FeatureBit

func (hac *HueAutoControl) FeatureBit() int

func (*HueAutoControl) MarshalBinary

func (hac *HueAutoControl) MarshalBinary() ([]byte, error)

func (*HueAutoControl) UnmarshalBinary

func (hac *HueAutoControl) UnmarshalBinary(buf []byte) error

func (*HueAutoControl) Value

type HueControl

type HueControl struct {
	Hue uint16
}

func (*HueControl) FeatureBit

func (hc *HueControl) FeatureBit() int

func (*HueControl) MarshalBinary

func (hc *HueControl) MarshalBinary() ([]byte, error)

func (*HueControl) UnmarshalBinary

func (hc *HueControl) UnmarshalBinary(buf []byte) error

func (*HueControl) Value

type InputHeaderDescriptor

type InputHeaderDescriptor struct {
	TotalLength        uint16
	EndpointAddress    uint8
	InfoBitmask        uint8
	TerminalLink       uint8
	StillCaptureMethod uint8
	TriggerSupport     uint8
	TriggerUsage       uint8
	ControlBitmasks    [][]byte
}

InputHeaderDescriptor as defined in UVC spec 1.5, 3.9.2.1

func (*InputHeaderDescriptor) UnmarshalBinary

func (ihd *InputHeaderDescriptor) UnmarshalBinary(buf []byte) error

type InputTerminalDescriptor

type InputTerminalDescriptor struct {
	TerminalID           uint8
	TerminalType         InputTerminalType
	AssociatedTerminalID uint8
	DescriptionIndex     uint8
}

InputTerminalDescriptor as defined in UVC spec 1.5, 3.7.2.1

func (*InputTerminalDescriptor) UnmarshalBinary

func (itd *InputTerminalDescriptor) UnmarshalBinary(buf []byte) error

type InputTerminalType

type InputTerminalType uint16
const (
	InputTerminalTypeVendorSpecific      InputTerminalType = 0x0200
	InputTerminalTypeCamera              InputTerminalType = 0x0201
	InputTerminalTypeMediaTransportInput InputTerminalType = 0x0202
)

type InterfaceAssociationDescriptor

type InterfaceAssociationDescriptor struct {
	InterfaceCount   uint8
	DescriptionIndex uint8
}

func (*InterfaceAssociationDescriptor) UnmarshalBinary

func (iad *InterfaceAssociationDescriptor) UnmarshalBinary(buf []byte) error

type IrisAbsoluteControl

type IrisAbsoluteControl struct {
	Aperture uint16
}

Control Request for Iris Absolute as defined in UVC spec 1.5, 4.2.2.1.10

func (*IrisAbsoluteControl) FeatureBit

func (iac *IrisAbsoluteControl) FeatureBit() int

func (*IrisAbsoluteControl) MarshalBinary

func (iac *IrisAbsoluteControl) MarshalBinary() ([]byte, error)

func (*IrisAbsoluteControl) UnmarshalBinary

func (iac *IrisAbsoluteControl) UnmarshalBinary(buf []byte) error

func (*IrisAbsoluteControl) Value

type IrisRelative

type IrisRelative uint8
const (
	IrisRelativeDefault   IrisRelative = 0x00
	IrisRelativeOpenStep  IrisRelative = 0x01
	IrisRelativeCloseStep IrisRelative = 0x02
)

type IrisRelativeControl

type IrisRelativeControl struct {
	Aperture IrisRelative
}

Control Request for Iris Relative as defined in UVC spec 1.5, 4.2.2.1.11

func (*IrisRelativeControl) FeatureBit

func (irc *IrisRelativeControl) FeatureBit() int

func (*IrisRelativeControl) MarshalBinary

func (irc *IrisRelativeControl) MarshalBinary() ([]byte, error)

func (*IrisRelativeControl) UnmarshalBinary

func (irc *IrisRelativeControl) UnmarshalBinary(buf []byte) error

func (*IrisRelativeControl) Value

type MJPEGFormatDescriptor

type MJPEGFormatDescriptor struct {
	FormatIndex                uint8
	NumFrameDescriptors        uint8
	Flags                      uint8
	DefaultFrameIndex          uint8
	AspectRatioX, AspectRatioY uint8
	InterlaceFlags             uint8
	CopyProtect                uint8
}

func (*MJPEGFormatDescriptor) Index

func (mfd *MJPEGFormatDescriptor) Index() uint8

func (*MJPEGFormatDescriptor) UnmarshalBinary

func (mfd *MJPEGFormatDescriptor) UnmarshalBinary(buf []byte) error

type MJPEGFrameDescriptor

type MJPEGFrameDescriptor struct {
	FrameIndex              uint8
	Capabilities            uint8
	Width, Height           uint16
	MinBitRate, MaxBitRate  uint32
	MaxVideoFrameBufferSize uint32
	DefaultFrameInterval    time.Duration

	ContinuousFrameInterval struct {
		MinFrameInterval, MaxFrameInterval, FrameIntervalStep time.Duration
	}
	DiscreteFrameIntervals []time.Duration
}

func (*MJPEGFrameDescriptor) Index

func (mfd *MJPEGFrameDescriptor) Index() uint8

func (*MJPEGFrameDescriptor) UnmarshalBinary

func (mfd *MJPEGFrameDescriptor) UnmarshalBinary(buf []byte) error

type MJPEGStreamHeader

type MJPEGStreamHeader struct {
	BitFieldHeader uint8
	PTS            uint32
	SCR            uint64
}

func (*MJPEGStreamHeader) EndOfFrame

func (msh *MJPEGStreamHeader) EndOfFrame() bool

func (*MJPEGStreamHeader) EndOfHeader

func (msh *MJPEGStreamHeader) EndOfHeader() bool

func (*MJPEGStreamHeader) Error

func (msh *MJPEGStreamHeader) Error() bool

func (*MJPEGStreamHeader) FrameIdentifier

func (msh *MJPEGStreamHeader) FrameIdentifier() bool

func (*MJPEGStreamHeader) HasPTS

func (msh *MJPEGStreamHeader) HasPTS() bool

func (*MJPEGStreamHeader) HasSCR

func (msh *MJPEGStreamHeader) HasSCR() bool

func (*MJPEGStreamHeader) StillImage

func (msh *MJPEGStreamHeader) StillImage() bool

func (*MJPEGStreamHeader) UnmarshalBinary

func (msh *MJPEGStreamHeader) UnmarshalBinary(buf []byte) error

type MPEG2TSFormatDescriptor

type MPEG2TSFormatDescriptor struct {
	FormatIndex      uint8
	DataOffset       uint8
	PacketLength     uint8
	StrideLength     uint8
	GUIDStrideFormat uuid.UUID
}

func (*MPEG2TSFormatDescriptor) Index

func (mfd *MPEG2TSFormatDescriptor) Index() uint8

func (*MPEG2TSFormatDescriptor) UnmarshalBinary

func (mfd *MPEG2TSFormatDescriptor) UnmarshalBinary(buf []byte) error

type MPEG2TSStreamHeader

type MPEG2TSStreamHeader struct {
	BitFieldHeader uint8
}

func (*MPEG2TSStreamHeader) EndOfFrame

func (msh *MPEG2TSStreamHeader) EndOfFrame() bool

func (*MPEG2TSStreamHeader) EndOfHeader

func (msh *MPEG2TSStreamHeader) EndOfHeader() bool

func (*MPEG2TSStreamHeader) Error

func (msh *MPEG2TSStreamHeader) Error() bool

func (*MPEG2TSStreamHeader) FrameIdentifier

func (msh *MPEG2TSStreamHeader) FrameIdentifier() bool

func (*MPEG2TSStreamHeader) StillImage

func (msh *MPEG2TSStreamHeader) StillImage() bool

func (*MPEG2TSStreamHeader) UnmarshalBinary

func (msh *MPEG2TSStreamHeader) UnmarshalBinary(buf []byte) error

type OutputHeaderDescriptor

type OutputHeaderDescriptor struct {
	TotalLength     uint16
	EndpointAddress uint8
	TerminalLink    uint8
	ControlBitmasks [][]byte
}

OutputHeaderDescriptor as defined in UVC spec 1.5, 3.9.2.2

func (*OutputHeaderDescriptor) UnmarshalBinary

func (ohd *OutputHeaderDescriptor) UnmarshalBinary(buf []byte) error

type OutputTerminalDescriptor

type OutputTerminalDescriptor struct {
	TerminalID           uint8
	TerminalType         OutputTerminalType
	AssociatedTerminalID uint8
	SourceID             uint8
}

OutputTerminalDescriptor as defined in UVC spec 1.5, 3.7.2.2

func (*OutputTerminalDescriptor) UnmarshalBinary

func (otd *OutputTerminalDescriptor) UnmarshalBinary(buf []byte) error

type OutputTerminalType

type OutputTerminalType uint16
const (
	OutputTerminalTypeVendorSpecific       OutputTerminalType = 0x0300
	OutputTerminalTypeCamera               OutputTerminalType = 0x0301
	OutputTerminalTypeMediaTransportOutput OutputTerminalType = 0x0302
)

type PanRelative

type PanRelative int
const (
	PanRelativeStop             PanRelative = 0x00
	PanRelativeClockwise        PanRelative = 0x01
	PanRelativeCounterClockwise PanRelative = 0xFF
)

type PanTiltAbsoluteControl

type PanTiltAbsoluteControl struct {
	PanAbsolute  int32
	TiltAbsolute int32
}

Control Request for Pan Tilt Absolute as defined in UVC spec 1.5, 4.2.2.1.14

func (*PanTiltAbsoluteControl) FeatureBit

func (ptac *PanTiltAbsoluteControl) FeatureBit() int

func (*PanTiltAbsoluteControl) MarshalBinary

func (ptac *PanTiltAbsoluteControl) MarshalBinary() ([]byte, error)

func (*PanTiltAbsoluteControl) UnmarshalBinary

func (ptac *PanTiltAbsoluteControl) UnmarshalBinary(buf []byte) error

func (*PanTiltAbsoluteControl) Value

type PanTiltRelativeControl

type PanTiltRelativeControl struct {
	PanRelative  PanRelative
	PanSpeed     uint8
	TiltRelative TiltRelative
	TiltSpeed    uint8
}

Control Request for Pan Tilt Relative as defined in UVC spec 1.5, 4.2.2.1.15

func (*PanTiltRelativeControl) FeatureBit

func (ptrc *PanTiltRelativeControl) FeatureBit() int

func (*PanTiltRelativeControl) MarshalBinary

func (ptrc *PanTiltRelativeControl) MarshalBinary() ([]byte, error)

func (*PanTiltRelativeControl) UnmarshalBinary

func (ptrc *PanTiltRelativeControl) UnmarshalBinary(buf []byte) error

func (*PanTiltRelativeControl) Value

type PowerLineFrequency

type PowerLineFrequency int
const (
	PowerLineFrequencyDisabled PowerLineFrequency = 0
	PowerLineFrequency50Hz     PowerLineFrequency = 1
	PowerLineFrequency60Hz     PowerLineFrequency = 2
	PowerLineFrequencyAuto     PowerLineFrequency = 3
)

type PowerLineFrequencyControl

type PowerLineFrequencyControl struct {
	Frequency PowerLineFrequency
}

func (*PowerLineFrequencyControl) FeatureBit

func (plfc *PowerLineFrequencyControl) FeatureBit() int

func (*PowerLineFrequencyControl) MarshalBinary

func (plfc *PowerLineFrequencyControl) MarshalBinary() ([]byte, error)

func (*PowerLineFrequencyControl) UnmarshalBinary

func (plfc *PowerLineFrequencyControl) UnmarshalBinary(buf []byte) error

func (*PowerLineFrequencyControl) Value

type PrivacyControl

type PrivacyControl struct {
	Privacy bool
}

Control Request for Privacy Control as defined in UVC spec 1.5, 4.2.2.1.18

func (*PrivacyControl) FeatureBit

func (pc *PrivacyControl) FeatureBit() int

func (*PrivacyControl) MarshalBinary

func (pc *PrivacyControl) MarshalBinary() ([]byte, error)

func (*PrivacyControl) UnmarshalBinary

func (pc *PrivacyControl) UnmarshalBinary(buf []byte) error

func (*PrivacyControl) Value

type ProcessingUnitControlDescriptor

type ProcessingUnitControlDescriptor interface {
	Value() ProcessingUnitControlSelector
	FeatureBit() int //Indicates the position of the control on the controls bitmap
	encoding.BinaryMarshaler
	encoding.BinaryUnmarshaler
}

type ProcessingUnitControlSelector

type ProcessingUnitControlSelector int
const (
	ProcessingUnitControlSelectorUndefined           ProcessingUnitControlSelector = 0x00
	ProcessingUnitBacklightCompensationControl       ProcessingUnitControlSelector = 0x01
	ProcessingUnitBrightnessControl                  ProcessingUnitControlSelector = 0x02
	ProcessingUnitContrastControl                    ProcessingUnitControlSelector = 0x03
	ProcessingUnitGainControl                        ProcessingUnitControlSelector = 0x04
	ProcessingUnitPowerLineFrequencyControl          ProcessingUnitControlSelector = 0x05
	ProcessingUnitHueControl                         ProcessingUnitControlSelector = 0x06
	ProcessingUnitSaturationControl                  ProcessingUnitControlSelector = 0x07
	ProcessingUnitSharpnessControl                   ProcessingUnitControlSelector = 0x08
	ProcessingUnitGammaControl                       ProcessingUnitControlSelector = 0x09
	ProcessingUnitWhiteBalanceTemperatureControl     ProcessingUnitControlSelector = 0x0A
	ProcessingUnitWhiteBalanceTemperatureAutoControl ProcessingUnitControlSelector = 0x0B
	ProcessingUnitWhiteBalanceComponentControl       ProcessingUnitControlSelector = 0x0C
	ProcessingUnitWhiteBalanceComponentAutoControl   ProcessingUnitControlSelector = 0x0D
	ProcessingUnitDigitalMultiplierControl           ProcessingUnitControlSelector = 0x0E // Deprecated
	ProcessingUnitDigitalMultiplierLimitControl      ProcessingUnitControlSelector = 0x0F
	ProcessingUnitHueAutoControl                     ProcessingUnitControlSelector = 0x10
	ProcessingUnitAnalogVideoStandardControl         ProcessingUnitControlSelector = 0x11
	ProcessingUnitAnalogVideoLockStatusControl       ProcessingUnitControlSelector = 0x12
	ProcessingUnitContrastAutoControl                ProcessingUnitControlSelector = 0x13
)

type ProcessingUnitDescriptor

type ProcessingUnitDescriptor struct {
	UnitID                uint8
	SourceID              uint8
	MaxMultiplier         uint16
	ControlsBitmask       []byte
	DescriptionIndex      uint8
	VideoStandardsBitmask uint8
}

ProcessingUnitDescriptor as defined in UVC spec 1.5, 3.7.2.5

func (*ProcessingUnitDescriptor) UnmarshalBinary

func (pud *ProcessingUnitDescriptor) UnmarshalBinary(buf []byte) error

type ProtocolCode

type ProtocolCode byte
const (
	ProtocolCodeUndefined ProtocolCode = 0x00
	ProtocolCode15        ProtocolCode = 0x01
)

type RegionOfInterestAutoControl

type RegionOfInterestAutoControl int
const (
	RegionOfInterestAutoControlExposure           RegionOfInterestAutoControl = 0x00
	RegionOfInterestAutoControlIris               RegionOfInterestAutoControl = 0x01
	RegionOfInterestAutoControlWhiteBalance       RegionOfInterestAutoControl = 0x02
	RegionOfInterestAutoControlFocus              RegionOfInterestAutoControl = 0x03
	RegionOfInterestAutoControlFaceDetect         RegionOfInterestAutoControl = 0x04
	RegionOfInterestAutoControlDetectTrack        RegionOfInterestAutoControl = 0x05
	RegionOfInterestAutoControlImageStabilization RegionOfInterestAutoControl = 0x06
	RegionOfInterestAutoControlHigherQuality      RegionOfInterestAutoControl = 0x07
)

type RegionOfInterestControl

type RegionOfInterestControl struct {
	Top          int16
	Left         int16
	Bottom       int16
	Right        int16
	AutoControls RegionOfInterestAutoControl
}

Control Request for Digital Region of Interest as defined in UVC spec 1.5, 4.2.2.1.20

func (*RegionOfInterestControl) FeatureBit

func (roic *RegionOfInterestControl) FeatureBit() int

func (*RegionOfInterestControl) MarshalBinary

func (roic *RegionOfInterestControl) MarshalBinary() ([]byte, error)

func (*RegionOfInterestControl) UnmarshalBinary

func (roic *RegionOfInterestControl) UnmarshalBinary(buf []byte) error

func (*RegionOfInterestControl) Value

type RollAbsoluteControl

type RollAbsoluteControl struct {
	RollAbsolute int16
}

Control Request for Roll Absolute as defined in UVC spec 1.5, 4.2.2.1.16

func (*RollAbsoluteControl) FeatureBit

func (rac *RollAbsoluteControl) FeatureBit() int

func (*RollAbsoluteControl) MarshalBinary

func (rac *RollAbsoluteControl) MarshalBinary() ([]byte, error)

func (*RollAbsoluteControl) UnmarshalBinary

func (rac *RollAbsoluteControl) UnmarshalBinary(buf []byte) error

func (*RollAbsoluteControl) Value

type RollRelative

type RollRelative int
const (
	RollRelativeStop             RollRelative = 0x00
	RollRelativeClockwise        RollRelative = 0x01
	RollRelativeCounterClockwise RollRelative = 0xFF
)

type RollRelativeControl

type RollRelativeControl struct {
	RollRelative RollRelative
	Speed        uint8
}

Control Request for Roll Relative as defined in UVC spec 1.5, 4.2.2.1.17

func (*RollRelativeControl) FeatureBit

func (rrc *RollRelativeControl) FeatureBit() int

func (*RollRelativeControl) MarshalBinary

func (rrc *RollRelativeControl) MarshalBinary() ([]byte, error)

func (*RollRelativeControl) UnmarshalBinary

func (rrc *RollRelativeControl) UnmarshalBinary(buf []byte) error

func (*RollRelativeControl) Value

type SaturationControl

type SaturationControl struct {
	Saturation uint16
}

func (*SaturationControl) FeatureBit

func (sc *SaturationControl) FeatureBit() int

func (*SaturationControl) MarshalBinary

func (sc *SaturationControl) MarshalBinary() ([]byte, error)

func (*SaturationControl) UnmarshalBinary

func (sc *SaturationControl) UnmarshalBinary(buf []byte) error

func (*SaturationControl) Value

type ScanningMode

type ScanningMode int
const (
	ScanningModeInterlaced  ScanningMode = 0
	ScanningModeProgressive ScanningMode = 1
)

type ScanningModeControl

type ScanningModeControl struct {
	Mode ScanningMode
}

Control Request for Scanning Mode as defined in UVC spec 1.5, 4.2.2.1.1

func (*ScanningModeControl) FeatureBit

func (smc *ScanningModeControl) FeatureBit() int

func (*ScanningModeControl) MarshalBinary

func (smc *ScanningModeControl) MarshalBinary() ([]byte, error)

func (*ScanningModeControl) UnmarshalBinary

func (smc *ScanningModeControl) UnmarshalBinary(buf []byte) error

func (*ScanningModeControl) Value

type SelectorUnitDescriptor

type SelectorUnitDescriptor struct {
	UnitID           uint8
	SourceID         []uint8
	DescriptionIndex uint8
}

SelectorUnitDescriptor as defined in UVC spec 1.5, 3.7.2.4

func (*SelectorUnitDescriptor) UnmarshalBinary

func (sud *SelectorUnitDescriptor) UnmarshalBinary(buf []byte) error

type SharpnessControl

type SharpnessControl struct {
	Sharpness uint16
}

func (*SharpnessControl) FeatureBit

func (sc *SharpnessControl) FeatureBit() int

func (*SharpnessControl) MarshalBinary

func (sc *SharpnessControl) MarshalBinary() ([]byte, error)

func (*SharpnessControl) UnmarshalBinary

func (sc *SharpnessControl) UnmarshalBinary(buf []byte) error

func (*SharpnessControl) Value

type StandardAudioStreamingInterfaceDescriptor

type StandardAudioStreamingInterfaceDescriptor struct {
	InterfaceNumber   uint8
	AlternateSetting  uint8
	NumEndpoints      uint8
	InterfaceClass    uint8
	InterfaceSubClass uint8
	InterfaceProtocol uint8
	DescriptionIndex  uint8
}

StandardAudioStreamingInterfaceDescriptor as defined in UAC spec 1.0, section 4.5.1

func (*StandardAudioStreamingInterfaceDescriptor) UnmarshalBinary

func (sasid *StandardAudioStreamingInterfaceDescriptor) UnmarshalBinary(buf []byte) error

type StandardVideoControlInterfaceDescriptor

type StandardVideoControlInterfaceDescriptor struct {
	InterfaceNumber  uint8
	AlternateSetting uint8
	NumEndpoints     uint8
	DescriptionIndex uint8
}

StandardVideoControlInterfaceDescriptor as defined in UVC spec 1.5, 3.7.1

func (*StandardVideoControlInterfaceDescriptor) UnmarshalBinary

func (svcid *StandardVideoControlInterfaceDescriptor) UnmarshalBinary(buf []byte) error

type StandardVideoControlInterruptEndpointDescriptor

type StandardVideoControlInterruptEndpointDescriptor struct {
	MaxTransferSize uint16
}

func (*StandardVideoControlInterruptEndpointDescriptor) UnmarshalBinary

func (svcie *StandardVideoControlInterruptEndpointDescriptor) UnmarshalBinary(buf []byte) error

type StandardVideoStreamingBulkStillImageDataEndpointDescriptor

type StandardVideoStreamingBulkStillImageDataEndpointDescriptor struct {
	EndpointAddress uint8
	MaxPacketSize   uint16
}

StandardVideoStreamingBulkStillImageDataEndpointDescriptor as defined in UVC spec 1.5, 3.10.1.3

func (*StandardVideoStreamingBulkStillImageDataEndpointDescriptor) UnmarshalBinary

type StandardVideoStreamingBulkVideoDataEndpointDescriptor

type StandardVideoStreamingBulkVideoDataEndpointDescriptor struct {
	EndpointAddress uint8
	MaxPacketSize   uint16
	Interval        uint8
}

StandardVideoStreamingBulkVideoDataEndpointDescriptor as defined in UVC spec 1.5, 3.10.1.2

func (*StandardVideoStreamingBulkVideoDataEndpointDescriptor) UnmarshalBinary

func (svsbded *StandardVideoStreamingBulkVideoDataEndpointDescriptor) UnmarshalBinary(buf []byte) error

type StandardVideoStreamingInterfaceDescriptor

type StandardVideoStreamingInterfaceDescriptor struct {
	InterfaceNumber  uint8
	AlternateSetting uint8
	NumEndpoints     uint8
	DescriptionIndex uint8
}

StandardVideoStreamingInterfaceDescriptor as defined in UVC spec 1.5, 3.9.1

func (*StandardVideoStreamingInterfaceDescriptor) UnmarshalBinary

func (svsid *StandardVideoStreamingInterfaceDescriptor) UnmarshalBinary(buf []byte) error

type StandardVideoStreamingIsochronousVideoDataEndpointDescriptor

type StandardVideoStreamingIsochronousVideoDataEndpointDescriptor struct {
	EndpointAddress   uint8
	AttributesBitmask uint8
	MaxPacketSize     uint16
	Interval          uint8
}

StandardVideoStreamingIsochronousVideoDataEndpointDescriptor as defined in UVC spec 1.5, 3.10.1.1

func (*StandardVideoStreamingIsochronousVideoDataEndpointDescriptor) UnmarshalBinary

type StepUnits

type StepUnits int
const (
	StepUnitsVideoFrames StepUnits = 0x00
	StepUnitsMiliseconds StepUnits = 0x01
)

type StillImageFrameDescriptor

type StillImageFrameDescriptor struct {
	EndpointAddress   uint8
	ImageSizePatterns []struct {
		Width, Height uint16
	}
	CompressionPatterns []uint8
}

StillImageFrameDescriptor as defined in UVC spec 1.5, 3.9.2.5

func (*StillImageFrameDescriptor) UnmarshalBinary

func (sifd *StillImageFrameDescriptor) UnmarshalBinary(buf []byte) error

type StreamBasedFormatDescriptor

type StreamBasedFormatDescriptor struct {
	FormatIndex  uint8
	GUIDFormat   uuid.UUID
	PacketLength uint32
}

func (*StreamBasedFormatDescriptor) Index

func (sbfd *StreamBasedFormatDescriptor) Index() uint8

func (*StreamBasedFormatDescriptor) UnmarshalBinary

func (sbfd *StreamBasedFormatDescriptor) UnmarshalBinary(buf []byte) error

type StreamBasedStreamHeader

type StreamBasedStreamHeader struct {
	BitFieldHeader uint8
	PTS            uint32
	SCR            uint64
}

func (*StreamBasedStreamHeader) EndOfFrame

func (sbsh *StreamBasedStreamHeader) EndOfFrame() bool

func (*StreamBasedStreamHeader) EndOfHeader

func (sbsh *StreamBasedStreamHeader) EndOfHeader() bool

func (*StreamBasedStreamHeader) Error

func (sbsh *StreamBasedStreamHeader) Error() bool

func (*StreamBasedStreamHeader) FrameIdentifier

func (sbsh *StreamBasedStreamHeader) FrameIdentifier() bool

func (*StreamBasedStreamHeader) HasPTS

func (sbsh *StreamBasedStreamHeader) HasPTS() bool

func (*StreamBasedStreamHeader) HasSCR

func (sbsh *StreamBasedStreamHeader) HasSCR() bool

func (*StreamBasedStreamHeader) StillImage

func (sbsh *StreamBasedStreamHeader) StillImage() bool

func (*StreamBasedStreamHeader) UnmarshalBinary

func (sbsh *StreamBasedStreamHeader) UnmarshalBinary(buf []byte) error

type StreamingInterface

type StreamingInterface interface {
	encoding.BinaryUnmarshaler
	// contains filtered or unexported methods
}

func UnmarshalStreamingInterface

func UnmarshalStreamingInterface(buf []byte) (StreamingInterface, error)

type SubclassCode

type SubclassCode byte
const (
	SubclassCodeUndefined                SubclassCode = 0x00
	SubclassCodeVideoControl             SubclassCode = 0x01
	SubclassCodeVideoStreaming           SubclassCode = 0x02
	SubclassCodeVideoInterfaceCollection SubclassCode = 0x03
)

type TerminalType

type TerminalType uint16
const (
	TerminalTypeVendorSpecific TerminalType = 0x0100
	TerminalTypeStreaming      TerminalType = 0x0101
)

type TiltRelative

type TiltRelative int
const (
	TiltRelativeStop TiltRelative = 0x00
	TiltRelativeUp   TiltRelative = 0x01
	TiltRelativeDown TiltRelative = 0xFF
)

type UncompressedFormatDescriptor

type UncompressedFormatDescriptor struct {
	FormatIndex           uint8
	NumFrameDescriptors   uint8
	GUIDFormat            uuid.UUID
	BitsPerPixel          uint8
	DefaultFrameIndex     uint8
	AspectRatioX          uint8
	AspectRatioY          uint8
	InterlaceFlagsBitmask uint8
	CopyProtect           uint8
}

func (*UncompressedFormatDescriptor) FourCC

func (ufd *UncompressedFormatDescriptor) FourCC() ([4]byte, error)

func (*UncompressedFormatDescriptor) Index

func (ufd *UncompressedFormatDescriptor) Index() uint8

func (*UncompressedFormatDescriptor) UnmarshalBinary

func (ufd *UncompressedFormatDescriptor) UnmarshalBinary(buf []byte) error

type UncompressedFrameDescriptor

type UncompressedFrameDescriptor struct {
	FrameIndex              uint8
	Capabilities            uint8
	Width, Height           uint16
	MinBitRate, MaxBitRate  uint32
	MaxVideoFrameBufferSize uint32
	DefaultFrameInterval    time.Duration

	ContinuousFrameInterval struct {
		MinFrameInterval, MaxFrameInterval, FrameIntervalStep time.Duration
	}
	DiscreteFrameIntervals []time.Duration
}

func (*UncompressedFrameDescriptor) Index

func (ufd *UncompressedFrameDescriptor) Index() uint8

func (*UncompressedFrameDescriptor) UnmarshalBinary

func (ufd *UncompressedFrameDescriptor) UnmarshalBinary(buf []byte) error

type UncompressedStreamHeader

type UncompressedStreamHeader struct {
	BitFieldHeader uint8
	PTS            uint32
	SCR            uint64
}

func (*UncompressedStreamHeader) EndOfFrame

func (ush *UncompressedStreamHeader) EndOfFrame() bool

func (*UncompressedStreamHeader) EndOfHeader

func (ush *UncompressedStreamHeader) EndOfHeader() bool

func (*UncompressedStreamHeader) Error

func (ush *UncompressedStreamHeader) Error() bool

func (*UncompressedStreamHeader) FrameIdentifier

func (ush *UncompressedStreamHeader) FrameIdentifier() bool

func (*UncompressedStreamHeader) HasPTS

func (ush *UncompressedStreamHeader) HasPTS() bool

func (*UncompressedStreamHeader) HasSCR

func (ush *UncompressedStreamHeader) HasSCR() bool

func (*UncompressedStreamHeader) StillImage

func (ush *UncompressedStreamHeader) StillImage() bool

func (*UncompressedStreamHeader) UnmarshalBinary

func (ush *UncompressedStreamHeader) UnmarshalBinary(buf []byte) error

type VP8FormatDescriptor

type VP8FormatDescriptor struct {
	FormatIndex                      uint8
	NumFrameDescriptors              uint8
	DefaultFrameIndex                uint8
	MaxCodecConfigDelay              uint8
	SupportedPartitionCount          uint8
	SupportedSyncFrameTypesBitmask   uint8
	ResolutionScaling                uint8
	SupportedRateControlModesBitmask uint8
	MaxMBPerSec                      uint16
}

func (*VP8FormatDescriptor) Index

func (vfd *VP8FormatDescriptor) Index() uint8

func (*VP8FormatDescriptor) UnmarshalBinary

func (vfd *VP8FormatDescriptor) UnmarshalBinary(buf []byte) error

type VP8FrameDescriptor

type VP8FrameDescriptor struct {
	FrameIndex                     uint8
	Width, Height                  uint16
	SupportedUsagesBitmask         uint32
	CapabilitiesBitmask            uint16
	ScalabilityCapabilitiesBitmask uint32
	MinBitRate, MaxBitRate         uint32
	DefaultFrameInterval           time.Duration
	FrameIntervals                 []time.Duration
}

func (*VP8FrameDescriptor) Index

func (vfd *VP8FrameDescriptor) Index() uint8

func (*VP8FrameDescriptor) UnmarshalBinary

func (vfd *VP8FrameDescriptor) UnmarshalBinary(buf []byte) error

type VP8StreamHeader

type VP8StreamHeader struct {
	BitFieldHeader0 uint8
	BitFieldHeader1 uint8
	BitFieldHeader2 uint8
	PTS             uint32
	SCR             uint64
	SLI             uint16
}

func (*VP8StreamHeader) AlternateReferenceFrame

func (vph *VP8StreamHeader) AlternateReferenceFrame() bool

func (*VP8StreamHeader) EndOfFrame

func (vph *VP8StreamHeader) EndOfFrame() bool

func (*VP8StreamHeader) EndOfHeader

func (vph *VP8StreamHeader) EndOfHeader() bool

func (*VP8StreamHeader) EndOfSlice

func (vph *VP8StreamHeader) EndOfSlice() bool

func (*VP8StreamHeader) Error

func (vph *VP8StreamHeader) Error() bool

func (*VP8StreamHeader) FrameIdentifier

func (vph *VP8StreamHeader) FrameIdentifier() bool

func (*VP8StreamHeader) GoldenReferenceFrame

func (vph *VP8StreamHeader) GoldenReferenceFrame() bool

func (*VP8StreamHeader) HasPTS

func (vph *VP8StreamHeader) HasPTS() bool

func (*VP8StreamHeader) HasSCR

func (vph *VP8StreamHeader) HasSCR() bool

func (*VP8StreamHeader) HasSLI

func (vph *VP8StreamHeader) HasSLI() bool

func (*VP8StreamHeader) PreviousReferenceFrame

func (vph *VP8StreamHeader) PreviousReferenceFrame() bool

func (*VP8StreamHeader) StillImage

func (vph *VP8StreamHeader) StillImage() bool

func (*VP8StreamHeader) UnmarshalBinary

func (vph *VP8StreamHeader) UnmarshalBinary(buf []byte) error

type VideoControlEndpointDescriptorSubtype

type VideoControlEndpointDescriptorSubtype byte
const (
	VideoControlEndpointDescriptorSubtypeUndefined VideoControlEndpointDescriptorSubtype = 0x00
	VideoControlEndpointDescriptorSubtypeGeneral   VideoControlEndpointDescriptorSubtype = 0x01
	VideoControlEndpointDescriptorSubtypeEndpoint  VideoControlEndpointDescriptorSubtype = 0x02
	VideoControlEndpointDescriptorSubtypeInterrupt VideoControlEndpointDescriptorSubtype = 0x03
)

type VideoControlInterfaceDescriptorSubtype

type VideoControlInterfaceDescriptorSubtype byte
const (
	VideoControlInterfaceDescriptorSubtypeUndefined      VideoControlInterfaceDescriptorSubtype = 0x00
	VideoControlInterfaceDescriptorSubtypeHeader         VideoControlInterfaceDescriptorSubtype = 0x01
	VideoControlInterfaceDescriptorSubtypeInputTerminal  VideoControlInterfaceDescriptorSubtype = 0x02
	VideoControlInterfaceDescriptorSubtypeOutputTerminal VideoControlInterfaceDescriptorSubtype = 0x03
	VideoControlInterfaceDescriptorSubtypeSelectorUnit   VideoControlInterfaceDescriptorSubtype = 0x04
	VideoControlInterfaceDescriptorSubtypeProcessingUnit VideoControlInterfaceDescriptorSubtype = 0x05
	VideoControlInterfaceDescriptorSubtypeExtensionUnit  VideoControlInterfaceDescriptorSubtype = 0x06
	VideoControlInterfaceDescriptorSubtypeEncodingUnit   VideoControlInterfaceDescriptorSubtype = 0x07
)

type VideoProbeCommitControl

type VideoProbeCommitControl struct {
	HintBitmask            uint16
	FormatIndex            uint8
	FrameIndex             uint8
	FrameInterval          time.Duration
	KeyFrameRate           uint16
	PFrameRate             uint16
	CompQuality            uint16
	CompWindowSize         uint16
	Delay                  uint16
	MaxVideoFrameSize      uint32
	MaxPayloadTransferSize uint32

	// added in uvc 1.1
	ClockFrequency     uint32
	FramingInfoBitmask uint8
	PreferedVersion    uint8
	MinVersion         uint8
	MaxVersion         uint8

	// added in uvc 1.5
	Usage                     uint8
	BitDepthLuma              uint8
	SettingsBitmask           uint8
	MaxNumberOfRefFramesPlus1 uint8
	RateControlModes          uint16
	LayoutPerStream           [4]uint16
}

func (*VideoProbeCommitControl) MarshalBinary

func (vpcc *VideoProbeCommitControl) MarshalBinary() ([]byte, error)

func (*VideoProbeCommitControl) MarshalInto

func (vpcc *VideoProbeCommitControl) MarshalInto(buf []byte) error

func (*VideoProbeCommitControl) UnmarshalBinary

func (vpcc *VideoProbeCommitControl) UnmarshalBinary(buf []byte) error

type VideoStreamingInterfaceDescriptorSubtype

type VideoStreamingInterfaceDescriptorSubtype byte
const (
	VideoStreamingInterfaceDescriptorSubtypeUndefined           VideoStreamingInterfaceDescriptorSubtype = 0x00
	VideoStreamingInterfaceDescriptorSubtypeInputHeader         VideoStreamingInterfaceDescriptorSubtype = 0x01
	VideoStreamingInterfaceDescriptorSubtypeOutputHeader        VideoStreamingInterfaceDescriptorSubtype = 0x02
	VideoStreamingInterfaceDescriptorSubtypeStillImageFrame     VideoStreamingInterfaceDescriptorSubtype = 0x03
	VideoStreamingInterfaceDescriptorSubtypeFormatUncompressed  VideoStreamingInterfaceDescriptorSubtype = 0x04
	VideoStreamingInterfaceDescriptorSubtypeFrameUncompressed   VideoStreamingInterfaceDescriptorSubtype = 0x05
	VideoStreamingInterfaceDescriptorSubtypeFormatMJPEG         VideoStreamingInterfaceDescriptorSubtype = 0x06
	VideoStreamingInterfaceDescriptorSubtypeFrameMJPEG          VideoStreamingInterfaceDescriptorSubtype = 0x07
	VideoStreamingInterfaceDescriptorSubtypeFormatMPEG2TS       VideoStreamingInterfaceDescriptorSubtype = 0x0A
	VideoStreamingInterfaceDescriptorSubtypeFormatDV            VideoStreamingInterfaceDescriptorSubtype = 0x0C
	VideoStreamingInterfaceDescriptorSubtypeColorFormat         VideoStreamingInterfaceDescriptorSubtype = 0x0D
	VideoStreamingInterfaceDescriptorSubtypeFormatFrameBased    VideoStreamingInterfaceDescriptorSubtype = 0x10
	VideoStreamingInterfaceDescriptorSubtypeFrameFrameBased     VideoStreamingInterfaceDescriptorSubtype = 0x11
	VideoStreamingInterfaceDescriptorSubtypeFormatStreamBased   VideoStreamingInterfaceDescriptorSubtype = 0x12
	VideoStreamingInterfaceDescriptorSubtypeFormatH264          VideoStreamingInterfaceDescriptorSubtype = 0x13
	VideoStreamingInterfaceDescriptorSubtypeFrameH264           VideoStreamingInterfaceDescriptorSubtype = 0x14
	VideoStreamingInterfaceDescriptorSubtypeFormatH264Simulcast VideoStreamingInterfaceDescriptorSubtype = 0x15
	VideoStreamingInterfaceDescriptorSubtypeFormatVP8           VideoStreamingInterfaceDescriptorSubtype = 0x16
	VideoStreamingInterfaceDescriptorSubtypeFrameVP8            VideoStreamingInterfaceDescriptorSubtype = 0x17
	VideoStreamingInterfaceDescriptorSubtypeFormatVP8Simulcast  VideoStreamingInterfaceDescriptorSubtype = 0x18
)

type WhiteBalanceComponentAutoControl

type WhiteBalanceComponentAutoControl struct {
	WhiteBalanceComponentAuto uint8
}

func (*WhiteBalanceComponentAutoControl) FeatureBit

func (wbcac *WhiteBalanceComponentAutoControl) FeatureBit() int

func (*WhiteBalanceComponentAutoControl) MarshalBinary

func (wbcac *WhiteBalanceComponentAutoControl) MarshalBinary() ([]byte, error)

func (*WhiteBalanceComponentAutoControl) UnmarshalBinary

func (wbcac *WhiteBalanceComponentAutoControl) UnmarshalBinary(buf []byte) error

func (*WhiteBalanceComponentAutoControl) Value

type WhiteBalanceComponentControl

type WhiteBalanceComponentControl struct {
	Blue uint16
	Red  uint16
}

func (*WhiteBalanceComponentControl) FeatureBit

func (wbcc *WhiteBalanceComponentControl) FeatureBit() int

func (*WhiteBalanceComponentControl) MarshalBinary

func (wbcc *WhiteBalanceComponentControl) MarshalBinary() ([]byte, error)

func (*WhiteBalanceComponentControl) UnmarshalBinary

func (wbcc *WhiteBalanceComponentControl) UnmarshalBinary(buf []byte) error

func (*WhiteBalanceComponentControl) Value

type WhiteBalanceTemperatureAutoControl

type WhiteBalanceTemperatureAutoControl struct {
	WhiteBalanceTemperatureAuto uint8
}

func (*WhiteBalanceTemperatureAutoControl) FeatureBit

func (wbtac *WhiteBalanceTemperatureAutoControl) FeatureBit() int

func (*WhiteBalanceTemperatureAutoControl) MarshalBinary

func (wbtac *WhiteBalanceTemperatureAutoControl) MarshalBinary() ([]byte, error)

func (*WhiteBalanceTemperatureAutoControl) UnmarshalBinary

func (wbtac *WhiteBalanceTemperatureAutoControl) UnmarshalBinary(buf []byte) error

func (*WhiteBalanceTemperatureAutoControl) Value

type WhiteBalanceTemperatureControl

type WhiteBalanceTemperatureControl struct {
	WhiteBalanceTemperature uint16
}

func (*WhiteBalanceTemperatureControl) FeatureBit

func (wbt *WhiteBalanceTemperatureControl) FeatureBit() int

func (*WhiteBalanceTemperatureControl) MarshalBinary

func (wbt *WhiteBalanceTemperatureControl) MarshalBinary() ([]byte, error)

func (*WhiteBalanceTemperatureControl) UnmarshalBinary

func (wbt *WhiteBalanceTemperatureControl) UnmarshalBinary(buf []byte) error

func (*WhiteBalanceTemperatureControl) Value

type ZoomAbsoluteControl

type ZoomAbsoluteControl struct {
	ObjectiveFocalLength uint16
}

Control Request for Zoom Absolute as defined in UVC spec 1.5, 4.2.2.1.12

func (*ZoomAbsoluteControl) FeatureBit

func (zac *ZoomAbsoluteControl) FeatureBit() int

func (*ZoomAbsoluteControl) MarshalBinary

func (zac *ZoomAbsoluteControl) MarshalBinary() ([]byte, error)

func (*ZoomAbsoluteControl) UnmarshalBinary

func (zac *ZoomAbsoluteControl) UnmarshalBinary(buf []byte) error

func (*ZoomAbsoluteControl) Value

type ZoomRelative

type ZoomRelative uint8
const (
	ZoomRelativeStop      ZoomRelative = 0x00
	ZoomRelativeTelephoto ZoomRelative = 0x01
	ZoomRelativeWideAngle ZoomRelative = 0xFF
)

type ZoomRelativeControl

type ZoomRelativeControl struct {
	Zoom        ZoomRelative
	DigitalZoom bool
	Speed       uint8
}

Control Request for Zoom Relative as defined in UVC spec 1.5, 4.2.2.1.13

func (*ZoomRelativeControl) FeatureBit

func (zrc *ZoomRelativeControl) FeatureBit() int

func (*ZoomRelativeControl) MarshalBinary

func (zrc *ZoomRelativeControl) MarshalBinary() ([]byte, error)

func (*ZoomRelativeControl) UnmarshalBinary

func (zrc *ZoomRelativeControl) UnmarshalBinary(buf []byte) error

func (*ZoomRelativeControl) Value

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL