diff --git a/v4l2.go b/v4l2.go index cdc2b4f..1c813b4 100644 --- a/v4l2.go +++ b/v4l2.go @@ -315,7 +315,7 @@ func getFrameSize(fd uintptr, index uint32, code uint32) (frameSize FrameSize, e func getName(fd uintptr) (string, error) { var caps v4l2_capability - if err := ioctl.Ioctl(fd, VIDIOC_QUERYCAP, uintptr(unsafe.Pointer(caps))); err != nil { + if err := ioctl.Ioctl(fd, VIDIOC_QUERYCAP, uintptr(unsafe.Pointer(&caps))); err != nil { return "", err } @@ -324,7 +324,7 @@ func getName(fd uintptr) (string, error) { func getBusInfo(fd uintptr) (string, error) { var caps v4l2_capability - if err := ioctl.Ioctl(fd, VIDIOC_QUERYCAP, uintptr(unsafe.Pointer(caps))); err != nil { + if err := ioctl.Ioctl(fd, VIDIOC_QUERYCAP, uintptr(unsafe.Pointer(&caps))); err != nil { return "", err } diff --git a/webcam.go b/webcam.go index be68f61..898255a 100644 --- a/webcam.go +++ b/webcam.go @@ -94,7 +94,8 @@ func (w *Webcam) GetName() (string, error) { // GetBusInfo returns the location of the device in the system func (w *Webcam) GetBusInfo() (string, error) { return getBusInfo(w.fd) - +} + // SelectInput selects the current video input. func (w *Webcam) SelectInput(index uint32) error { return selectInput(w.fd, index)