mirror of
https://github.com/gen2brain/cam2ip.git
synced 2026-01-10 00:28:32 +00:00
Add support for native V4L implementation on Linux/RPi
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
// +build !native
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
@@ -57,15 +59,12 @@ func main() {
|
||||
|
||||
srv.Reader = vid
|
||||
} else {
|
||||
cam, err := camera.New(camera.Options{srv.Index, srv.Rotate})
|
||||
cam, err := camera.New(camera.Options{srv.Index, srv.Rotate, srv.FrameWidth, srv.FrameHeight})
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "%s\n", err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
cam.SetProperty(camera.PropFrameWidth, srv.FrameWidth)
|
||||
cam.SetProperty(camera.PropFrameHeight, srv.FrameHeight)
|
||||
|
||||
srv.Reader = cam
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user