Ask Your Question

Armin's profile - activity

2016-11-12 05:32:11 -0500 received badge  Necromancer (source)
2015-08-28 13:37:38 -0500 answered a question Opencv 3.0.0 build winder Windows 8 with Gstreamer1.0 support

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) )
...

----------------------------------------------------------------------------

CHECK FOR SYSTEM LIBRARIES, OPTIONS, ETC..

----------------------------------------------------------------------------

...
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
...

if defined(WIN32)

include <stdlib.h>

else

include <unistd.h>

endif


...

define VERSION_NUM(major, minor, micro) (major * 1000000 + minor * 1000 + micro)

define FULL_GST_VERSION VERSION_NUM(GST_VERSION_MAJOR, GST_VERSION_MINOR, GST_VERSION_MICRO)


if defined(WIN32)

define strcasecmp _stricmp

define strncasecmp _strnicmp

endif

...

if defined(WIN32)

_fullpath(uri, filename, _MAX_PATH);

else

uri = realpath(filename, NULL);

endif

Worked for me

2015-08-28 13:20:27 -0500 commented question Opencv 3.0.0 build winder Windows 8 with Gstreamer1.0 support

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()

2015-08-28 13:20:26 -0500 commented question Opencv 3.0.0 build winder Windows 8 with Gstreamer1.0 support

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) ) ...

----------------------------------------------------------------------------

CHECK FOR SYSTEM LIBRARIES, OPTIONS, ETC..

----------------------------------------------------------------------------

... if(WIN32) find_package(PKGConfig QUIET) include(CheckFunctionExists) include(CheckIncludeFile) endif()