1 | initial version |
I think I solved it.
Download pkg-config-lite-0.28-1_bin-win32
Add following system paths
C:\Program Files (x86)\pkg-config-lite-0.28-1\bin
C:\Gstreamer\1.0\x86_64\lib\gstreamer-1.0
C:\Gstreamer\1.0\x86_64\lib
Add Environment Variable
PKG_CONFIG_PATH C:\Gstreamer\1.0\x86_64\lib\pkgconfig
Edit opencv\sources\CMakeLists.txt
...
OCV_OPTION(WITH_GSTREAMER "Include Gstreamer support" ON IF (WIN32 OR UNIX AND NOT ANDROID) )
...
...
if(WIN32)
find_package(PKGConfig QUIET)
include(CheckFunctionExists)
include(CheckIncludeFile)
endif()
Edit opencv\sources\modules\highgui\CMakeLists.txt
...
if(UNIX)
#these variables are set by CHECK_MODULE macro
foreach(P ${HIGHGUI_INCLUDE_DIRS})
ocv_include_directories(${P})
endforeach()
foreach(P ${HIGHGUI_LIBRARY_DIRS})
link_directories(${P})
endforeach()
endif()
if(WIN32 AND HAVE_GSTREAMER)
#these variables are set by CHECK_MODULE macro
foreach(P ${HIGHGUI_INCLUDE_DIRS})
ocv_include_directories(${P})
endforeach()
foreach(P ${HIGHGUI_LIBRARY_DIRS})
link_directories(${P})
endforeach()
endif()
Edit opencv\sources\modules\videoio\CMakeLists.txt
if(UNIX)
#these variables are set by CHECK_MODULE macro
foreach(P ${VIDEOIO_INCLUDE_DIRS})
ocv_include_directories(${P})
endforeach()
foreach(P ${VIDEOIO_LIBRARY_DIRS})
link_directories(${P})
endforeach()
endif()
if(WIN32 AND HAVE_GSTREAMER)
#these variables are set by CHECK_MODULE macro
foreach(P ${VIDEOIO_INCLUDE_DIRS})
ocv_include_directories(${P})
endforeach()
foreach(P ${VIDEOIO_LIBRARY_DIRS})
link_directories(${P})
endforeach()
endif()
And edit cap_gstreamer.cpp in modules/videoio
...
...
...
_fullpath(uri, filename, _MAX_PATH);
uri = realpath(filename, NULL);
Worked for me