v4l2_framesize

package
v0.0.0-...-4809048 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package v4l2_framesize provides a type used to represents a V4L2 (Video4Linux version 2) frame size.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Continuous

type Continuous struct {
	PixelFormat v4l2_pixelformat.Type // Pixel format

	MinWidth   uint32 // Minimum frame width [pixel]
	MaxWidth   uint32 // Maximum frame width [pixel]
	StepWidth  uint32 // Frame width step size [pixel]
	MinHeight  uint32 // Minimum frame height [pixel]
	MaxHeight  uint32 // Maximum frame height [pixel]
	StepHeight uint32 // Frame height step size [pixel]
	// contains filtered or unexported fields
}

type Discrete

type Discrete struct {
	PixelFormat v4l2_pixelformat.Type // Pixel format

	Width  uint32
	Height uint32
	// contains filtered or unexported fields
}

type Stepwise

type Stepwise struct {
	PixelFormat v4l2_pixelformat.Type // Pixel format

	MinWidth   uint32 // Minimum frame width [pixel]
	MaxWidth   uint32 // Maximum frame width [pixel]
	StepWidth  uint32 // Frame width step size [pixel]
	MinHeight  uint32 // Minimum frame height [pixel]
	MaxHeight  uint32 // Maximum frame height [pixel]
	StepHeight uint32 // Frame height step size [pixel]
	// contains filtered or unexported fields
}

type Type

type Type struct {
	Index       uint32                // Frame size number
	PixelFormat v4l2_pixelformat.Type // Pixel format
	// contains filtered or unexported fields
}

func (Type) Cast

func (receiver Type) Cast() (interface{}, error)

Cast tries to turn a v4l2_framesize.Type into a: v4l2_framesize.Discrete, v4l2_framesize.Continuous, or v4l2_framesize.Stepwise.

Example:

switch casted := frameSize.Cast().(type) {
case v4l2_framesize.Continuous
	//@TODO
case v4l2_framesize.Discrete:
	//@TODO
case v4l2_framesize.Stepwise
	//@TODO
default:
	//@TODO: Error, unknown framesize type.
}

Jump to

Keyboard shortcuts

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