diff --git a/videoio.cpp b/videoio.cpp index f1b1b8a6..8105a2a5 100644 --- a/videoio.cpp +++ b/videoio.cpp @@ -17,7 +17,7 @@ int VideoCapture_OpenDevice(VideoCapture v, int device) { return v->open(device); } -void VideoCapture_Set(VideoCapture v, int prop, int param) { +void VideoCapture_Set(VideoCapture v, int prop, double param) { v->set(prop, param); } diff --git a/videoio.go b/videoio.go index 2bca171f..ec31e3f6 100644 --- a/videoio.go +++ b/videoio.go @@ -186,8 +186,8 @@ func (v *VideoCapture) Close() error { } // Set parameter with property (=key). -func (v *VideoCapture) Set(prop int, param VideoCaptureProperties) { - C.VideoCapture_Set(v.p, C.int(prop), C.int(param)) +func (v *VideoCapture) Set(prop VideoCaptureProperties, param float64) { + C.VideoCapture_Set(v.p, C.int(prop), C.double(param)) } // IsOpened returns if the VideoCapture has been opened to read from diff --git a/videoio.h b/videoio.h index 8b5cd9f0..48a5fae8 100644 --- a/videoio.h +++ b/videoio.h @@ -21,7 +21,7 @@ VideoCapture VideoCapture_New(); void VideoCapture_Close(VideoCapture v); int VideoCapture_Open(VideoCapture v, const char* uri); int VideoCapture_OpenDevice(VideoCapture v, int device); -void VideoCapture_Set(VideoCapture v, int prop, int param); +void VideoCapture_Set(VideoCapture v, int prop, double param); int VideoCapture_IsOpened(VideoCapture v); int VideoCapture_Read(VideoCapture v, Mat buf); void VideoCapture_Grab(VideoCapture v, int skip); diff --git a/videoio_test.go b/videoio_test.go index 4f183a1b..843e119e 100644 --- a/videoio_test.go +++ b/videoio_test.go @@ -12,7 +12,7 @@ func TestVideoCaptureFile(t *testing.T) { t.Error("Unable to open VideoCaptureFile") } - vc.Set(VideoCaptureBrightness, 100) + vc.Set(VideoCaptureBrightness, 100.0) vc.Grab(10) img := NewMat()