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

@@ -4,7 +4,7 @@ import (
"log"
"net/http"
"github.com/gen2brain/cam2ip/encoder"
"github.com/gen2brain/cam2ip/image"
"github.com/gen2brain/cam2ip/reader"
)
@@ -35,7 +35,7 @@ func (j *JPEG) ServeHTTP(w http.ResponseWriter, r *http.Request) {
return
}
err = encoder.New(w).Encode(img)
err = image.NewEncoder(w).Encode(img)
if err != nil {
log.Printf("jpeg: encode: %v", err)
return