Usage

func Available

func Close

func Close() (err error)

Close closes media driver.

func SnapshotJPEG

func SnapshotJPEG(location string, quality int) (err error)

SnapshotJPEG writes a camera snapshot to location. Compression used is JPEG
4:2:0 baseline format with the given quality. Quality range is 1 to 100 where
100 is highest quality. Location must be an absolute path.

func SnapshotRGBA

func SnapshotRGBA() *image.RGBA

SnapshotRGBA returns a RGBA image from camera with size FrameWidth x
FrameHeight. This function is slower than SnapshotYCbCr since it redraws the
whole image after snapshot to convert it from YCbCr to RGBA.

func SnapshotYCbCr

func Start

func Start() (err error)

Start starts media driver.

func StartVideoRecording

func StartVideoRecording(location string) (err error)

StartVideoRecording starts recording an MP4 video to location. Compression
format is H264 with a bitrate of 5000 Kbps and frame size of video is 1280x720.
Location must be an absolute path. StopVideoRecording must be called after
recording is finished, otherwise the video file might get corrupted.

func StopVideoRecording

func StopVideoRecording(location string) (err error)

StopVideoRecording stops the video recording process. Location must be an
absolute path.