mirror of
https://github.com/gen2brain/cam2ip.git
synced 2026-01-08 15:48:30 +00:00
New release
This commit is contained in:
10
README.md
10
README.md
@@ -18,10 +18,10 @@ or
|
|||||||
|
|
||||||
Binaries are compiled with static OpenCV library:
|
Binaries are compiled with static OpenCV library:
|
||||||
|
|
||||||
- [Android 32bit](https://github.com/gen2brain/cam2ip/releases/download/1.2/cam2ip-1.2-android.tar.gz)
|
- [Linux 64bit](https://github.com/gen2brain/cam2ip/releases/download/1.3/cam2ip-1.3-64bit.tar.gz)
|
||||||
- [Linux 64bit](https://github.com/gen2brain/cam2ip/releases/download/1.2/cam2ip-1.2-64bit.tar.gz)
|
- [RPi 32bit](https://github.com/gen2brain/cam2ip/releases/download/1.3/cam2ip-1.3-RPi.tar.gz)
|
||||||
- [RPi 32bit](https://github.com/gen2brain/cam2ip/releases/download/1.2/cam2ip-1.2-RPi.tar.gz)
|
- [RPi3 32bit](https://github.com/gen2brain/cam2ip/releases/download/1.3/cam2ip-1.3-RPi3.tar.gz)
|
||||||
- [Windows 32bit](https://github.com/gen2brain/cam2ip/releases/download/1.2/cam2ip-1.2.zip)
|
- [Windows 32bit](https://github.com/gen2brain/cam2ip/releases/download/1.3/cam2ip-1.3.zip)
|
||||||
|
|
||||||
|
|
||||||
### Installation
|
### Installation
|
||||||
@@ -48,6 +48,8 @@ Usage of ./cam2ip:
|
|||||||
Camera index
|
Camera index
|
||||||
-nowebgl
|
-nowebgl
|
||||||
Disable WebGL drawing of images (html handler)
|
Disable WebGL drawing of images (html handler)
|
||||||
|
-video-file string
|
||||||
|
Use video file instead of camera
|
||||||
```
|
```
|
||||||
|
|
||||||
### Handlers
|
### Handlers
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import (
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
name = "cam2ip"
|
name = "cam2ip"
|
||||||
version = "1.0"
|
version = "1.3"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|||||||
17
make.bash
17
make.bash
@@ -3,7 +3,7 @@
|
|||||||
CHROOT="/usr/x86_64-pc-linux-gnu-static"
|
CHROOT="/usr/x86_64-pc-linux-gnu-static"
|
||||||
MINGW="/usr/i686-w64-mingw32"
|
MINGW="/usr/i686-w64-mingw32"
|
||||||
RPI="/usr/armv6j-hardfloat-linux-gnueabi"
|
RPI="/usr/armv6j-hardfloat-linux-gnueabi"
|
||||||
ANDROID="/opt/android-toolchain-arm7"
|
RPI3="/usr/armv7a-hardfloat-linux-gnueabi"
|
||||||
|
|
||||||
mkdir -p build
|
mkdir -p build
|
||||||
|
|
||||||
@@ -30,11 +30,10 @@ CGO_CFLAGS="-I$RPI/usr/include" \
|
|||||||
CC="armv6j-hardfloat-linux-gnueabi-gcc" CXX="armv6j-hardfloat-linux-gnueabi-g++" \
|
CC="armv6j-hardfloat-linux-gnueabi-gcc" CXX="armv6j-hardfloat-linux-gnueabi-g++" \
|
||||||
CGO_ENABLED=1 GOOS=linux GOARCH=arm go build -v -x -o build/cam2ip.linux.arm -ldflags "-linkmode external -s -w" github.com/gen2brain/cam2ip
|
CGO_ENABLED=1 GOOS=linux GOARCH=arm go build -v -x -o build/cam2ip.linux.arm -ldflags "-linkmode external -s -w" github.com/gen2brain/cam2ip
|
||||||
|
|
||||||
PATH="$PATH:$ANDROID/bin" \
|
PKG_CONFIG="/usr/bin/armv7a-hardfloat-linux-gnueabi-pkg-config" \
|
||||||
PKG_CONFIG="$ANDROID/bin/arm-linux-androideabi-pkg-config" \
|
PKG_CONFIG_PATH="$RPI3/usr/lib/pkgconfig" \
|
||||||
PKG_CONFIG_PATH="$ANDROID/lib/pkgconfig" \
|
PKG_CONFIG_LIBDIR="$RPI3/usr/lib/pkgconfig" \
|
||||||
PKG_CONFIG_LIBDIR="$ANDROID/lib/pkgconfig" \
|
CGO_LDFLAGS="-L$RPI3/usr/lib" \
|
||||||
CGO_LDFLAGS="-L$ANDROID/lib" \
|
CGO_CFLAGS="-I$RPI3/usr/include" \
|
||||||
CGO_CFLAGS="-I$ANDROID/include" \
|
CC="armv7a-hardfloat-linux-gnueabi-gcc" CXX="armv7a-hardfloat-linux-gnueabi-g++" \
|
||||||
CC="arm-linux-androideabi-gcc" CXX="arm-linux-androideabi-g++" \
|
CGO_ENABLED=1 GOOS=linux GOARCH=arm go build -v -x -o build/cam2ip.linux.arm7 -ldflags "-linkmode external -s -w" github.com/gen2brain/cam2ip
|
||||||
CGO_ENABLED=1 GOOS=android GOARCH=arm go build -v -x -o build/cam2ip.android.arm -ldflags "-linkmode external -s -w" github.com/gen2brain/cam2ip
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
|
|
||||||
// ImageReader interface
|
// ImageReader interface
|
||||||
type ImageReader interface {
|
type ImageReader interface {
|
||||||
// Read reads next frame from video and returns image.
|
// Read reads next frame from camera/video and returns image.
|
||||||
Read() (img image.Image, err error)
|
Read() (img image.Image, err error)
|
||||||
|
|
||||||
// Close closes camera/video.
|
// Close closes camera/video.
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func TestVideo(t *testing.T) {
|
func TestVideo(t *testing.T) {
|
||||||
video, err := New("ranko.mp4")
|
video, err := New("test.mp4")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user