From 3844a46486606e919f534194cc8a7526c5235741 Mon Sep 17 00:00:00 2001 From: Milan Nikolic Date: Sun, 6 Oct 2019 03:14:07 +0200 Subject: [PATCH] Move options to file --- camera/camera.go | 9 +++++++++ camera/camera_cv2.go | 8 -------- camera/camera_cv4.go | 8 -------- camera/camera_linux.go | 8 -------- camera/camera_windows.go | 8 -------- 5 files changed, 9 insertions(+), 32 deletions(-) create mode 100644 camera/camera.go diff --git a/camera/camera.go b/camera/camera.go new file mode 100644 index 0000000..05f9144 --- /dev/null +++ b/camera/camera.go @@ -0,0 +1,9 @@ +package camera + +// Options. +type Options struct { + Index int + Rotate int + Width float64 + Height float64 +} diff --git a/camera/camera_cv2.go b/camera/camera_cv2.go index 21ffe89..b3813b7 100644 --- a/camera/camera_cv2.go +++ b/camera/camera_cv2.go @@ -11,14 +11,6 @@ import ( "github.com/gen2brain/go-opencv/opencv" ) -// Options. -type Options struct { - Index int - Rotate int - Width float64 - Height float64 -} - // Camera represents camera. type Camera struct { opts Options diff --git a/camera/camera_cv4.go b/camera/camera_cv4.go index 45576b1..9ad4e52 100644 --- a/camera/camera_cv4.go +++ b/camera/camera_cv4.go @@ -11,14 +11,6 @@ import ( "gocv.io/x/gocv" ) -// Options. -type Options struct { - Index int - Rotate int - Width float64 - Height float64 -} - // Camera represents camera. type Camera struct { opts Options diff --git a/camera/camera_linux.go b/camera/camera_linux.go index 9ff54c9..f052baf 100644 --- a/camera/camera_linux.go +++ b/camera/camera_linux.go @@ -14,14 +14,6 @@ import ( im "github.com/gen2brain/cam2ip/image" ) -// Options. -type Options struct { - Index int - Rotate int - Width float64 - Height float64 -} - // Camera represents camera. type Camera struct { opts Options diff --git a/camera/camera_windows.go b/camera/camera_windows.go index 82e97a9..62ab057 100644 --- a/camera/camera_windows.go +++ b/camera/camera_windows.go @@ -13,14 +13,6 @@ import ( "github.com/disintegration/imaging" ) -// Options. -type Options struct { - Index int - Rotate int - Width float64 - Height float64 -} - // Camera represents camera. type Camera struct { opts Options