diff --git a/cmake/templates/dllmain.cpp.in b/cmake/templates/dllmain.cpp.in index db95f5d00c..f4ee5a9ff0 100644 --- a/cmake/templates/dllmain.cpp.in +++ b/cmake/templates/dllmain.cpp.in @@ -9,6 +9,8 @@ #error "Build configuration error" #endif +#pragma warning(disable:4447) // Disable warning 'main' signature found without threading model + #define WIN32_LEAN_AND_MEAN #include diff --git a/modules/videoio/src/cap_winrt/MediaStreamSink.cpp b/modules/videoio/src/cap_winrt/MediaStreamSink.cpp index 264f31551c..184c3909db 100644 --- a/modules/videoio/src/cap_winrt/MediaStreamSink.cpp +++ b/modules/videoio/src/cap_winrt/MediaStreamSink.cpp @@ -35,7 +35,7 @@ MediaStreamSink::MediaStreamSink( __in MediaSampleHandler^ sampleHandler ) : _shutdown(false) - , _id(-1) + , _id((DWORD)-1) , _width(0) , _height(0) { @@ -207,16 +207,16 @@ HRESULT MediaStreamSink::QueueEvent( __in MediaEventType met, __in REFGUID extendedType, __in HRESULT status, - __in_opt const PROPVARIANT *value + __in_opt const PROPVARIANT *value_ ) { - return ExceptionBoundary([this, met, extendedType, status, value]() + return ExceptionBoundary([this, met, extendedType, status, value_]() { auto lock = _lock.LockExclusive(); _VerifyNotShutdown(); - CHK(_eventQueue->QueueEventParamVar(met, extendedType, status, value)); + CHK(_eventQueue->QueueEventParamVar(met, extendedType, status, value_)); }); } @@ -381,4 +381,4 @@ void MediaStreamSink::_UpdateMediaType(__in const ComPtr& mt) } CHK(mt->CopyAllItems(_curMT.Get())); -} \ No newline at end of file +} diff --git a/modules/videoio/src/cap_winrt_bridge.cpp b/modules/videoio/src/cap_winrt_bridge.cpp index a4980e9a7b..0db4b038af 100644 --- a/modules/videoio/src/cap_winrt_bridge.cpp +++ b/modules/videoio/src/cap_winrt_bridge.cpp @@ -81,11 +81,11 @@ void VideoioBridge::allocateOutputBuffers() } // performed on UI thread -void VideoioBridge::allocateBuffers(int width, int height) +void VideoioBridge::allocateBuffers(int width_, int height_) { // allocate input Mats (bgra8 = CV_8UC4, RGB24 = CV_8UC3) - frontInputMat.create(height, width, CV_8UC3); - backInputMat.create(height, width, CV_8UC3); + frontInputMat.create(height_, width_, CV_8UC3); + backInputMat.create(height_, width_, CV_8UC3); frontInputPtr = frontInputMat.ptr(0); backInputPtr = backInputMat.ptr(0); @@ -155,4 +155,4 @@ void VideoioBridge::setHeight(int _height) height = _height; } -// end \ No newline at end of file +// end diff --git a/modules/videoio/src/cap_winrt_capture.cpp b/modules/videoio/src/cap_winrt_capture.cpp index 7a38617e6a..d7f2aa5bc0 100644 --- a/modules/videoio/src/cap_winrt_capture.cpp +++ b/modules/videoio/src/cap_winrt_capture.cpp @@ -154,6 +154,7 @@ namespace cv { // see VideoCapture::read bool VideoCapture_WinRT::retrieveFrame(int channel, cv::OutputArray outArray) { + CV_UNUSED(channel); if (!started) { int width, height; diff --git a/modules/videoio/src/cap_winrt_video.cpp b/modules/videoio/src/cap_winrt_video.cpp index 174f680d88..c29a34b38e 100644 --- a/modules/videoio/src/cap_winrt_video.cpp +++ b/modules/videoio/src/cap_winrt_video.cpp @@ -238,9 +238,9 @@ void Video::CopyOutput() { auto inAr = VideoioBridge::getInstance().frontInputPtr; auto outAr = GetData(VideoioBridge::getInstance().frontOutputBuffer->PixelBuffer); - const unsigned int bytesPerPixel = 3; + const unsigned int bytesPerPixel_ = 3; auto pbScanline = inAr; - auto plPitch = width * bytesPerPixel; + auto plPitch = width * bytesPerPixel_; auto buf = outAr; unsigned int colBytes = width * 4; @@ -254,7 +254,7 @@ void Video::CopyOutput() { // used for RGB24: // nb. alpha is set to full opaque - for (unsigned int i = 0, j = 0; i < plPitch; i += bytesPerPixel, j += 4) + for (unsigned int i = 0, j = 0; i < plPitch; i += bytesPerPixel_, j += 4) { // swizzle the R and B values (RGB24 to Bgr8) buf[j] = pbScanline[i + 2]; @@ -317,4 +317,4 @@ bool Video::listDevices() { return result.get(); } -// end \ No newline at end of file +// end