Add support for native V4L implementation on Linux/RPi

This commit is contained in:
Milan Nikolic
2018-10-28 14:23:04 +01:00
parent 0503355005
commit ec60387edf
21 changed files with 348 additions and 49 deletions

View File

@@ -10,7 +10,7 @@ import (
"golang.org/x/net/websocket"
"github.com/gen2brain/cam2ip/encoder"
"github.com/gen2brain/cam2ip/image"
"github.com/gen2brain/cam2ip/reader"
)
@@ -37,7 +37,7 @@ func (s *Socket) write(ws *websocket.Conn) {
w := new(bytes.Buffer)
err = encoder.New(w).Encode(img)
err = image.NewEncoder(w).Encode(img)
if err != nil {
log.Printf("socket: encode: %v", err)
continue