v4l2

package
v0.0.0-...-cdfd2c3 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2024 License: CC0-1.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PixelFormatFromV4L2

func PixelFormatFromV4L2(
	v4l2PixFmt webcam.PixelFormat,
) camera.PixelFormat

func PixelFormatToV4L2

func PixelFormatToV4L2(
	pixFmt camera.PixelFormat,
) webcam.PixelFormat

Types

type Camera

type Camera struct {
	Camera *webcam.Webcam
	Format camera.Format
}

func (*Camera) Close

func (c *Camera) Close() error

func (*Camera) GetFormat

func (c *Camera) GetFormat() camera.Format

func (*Camera) GetFrame

func (c *Camera) GetFrame(
	ctx context.Context,
) (camera.Frame, error)

func (*Camera) ReleaseFrame

func (c *Camera) ReleaseFrame(frame camera.Frame) error

func (*Camera) StartStreaming

func (c *Camera) StartStreaming() error

func (*Camera) StopStreaming

func (c *Camera) StopStreaming() error

func (*Camera) WaitForFrame

func (c *Camera) WaitForFrame(ctx context.Context) error

type Frame

type Frame struct {
	FrameID uint32
	Frame   image.Image
}

func (*Frame) Image

func (f *Frame) Image() image.Image

type Platform

type Platform struct{}

func NewPlatform

func NewPlatform() Platform

func (Platform) ListCameras

func (Platform) ListCameras() ([]camera.DevicePath, error)

func (Platform) ListFormats

func (Platform) ListFormats(
	devicePath string,
) (camera.Formats, error)

func (Platform) OpenCamera

func (Platform) OpenCamera(
	devicePath string,
	format camera.Format,
) (camera.Camera, error)

func (Platform) OpenCameraCompressed

func (Platform) OpenCameraCompressed(
	devicePath camera.DevicePath,
	format camera.Format,
	compression camera.Compression,
	compressionQuality camera.CompressionQuality,
) (camera.CameraCompressed, error)

Jump to

Keyboard shortcuts

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