Built OpenCV highgui without GSTREAMER support but with PvAPI support fails, adapting cmake doesn't work
So basically I want to built OpenCV with only PvAPI support to be sure that it can connect to my AVT Manta camera instead of running through a own created script.
I put explicitly in cmake-gui and in command line all other video supports off, but still GSTREAMER stays on YES.
Video I/O:
DC1394 1.x: NO
DC1394 2.x: NO
FFMPEG: NO
codec: NO
format: NO
util: NO
swscale: NO
gentoo-style: NO
GStreamer:
base: YES (ver 0.10.36)
video: YES (ver 0.10.36)
app: YES (ver 0.10.36)
riff: YES (ver 0.10.36)
pbutils: YES (ver 0.10.36)
OpenNI: NO
OpenNI PrimeSensor Modules: NO
PvAPI: YES
GigEVisionSDK: NO
UniCap: NO
UniCap ucil: NO
V4L/V4L2: NO/NO
XIMEA: NO
Xine: NO
Result is that it first tries to connect to a camera index 0 using the GSTREAMER interface instead of through the PvAPI interface. Can anyone check if they have the same problem with the following extra build parameter
-D WITH_GSTREAMER=OFF
UPDATE 1
Found this part at https://github.com/Itseez/opencv/blob/01a883df0cae0c12acbbdaa2eb5e3a99dd8a3bfa/cmake/OpenCVFindLibsVideo.cmake
# --- GStreamer ---
ocv_clear_vars(HAVE_GSTREAMER)
# try to find gstreamer 1.x first
if(WITH_GSTREAMER AND NOT WITH_GSTREAMER_0_10)
CHECK_MODULE(gstreamer-base-1.0 HAVE_GSTREAMER_BASE)
CHECK_MODULE(gstreamer-video-1.0 HAVE_GSTREAMER_VIDEO)
CHECK_MODULE(gstreamer-app-1.0 HAVE_GSTREAMER_APP)
CHECK_MODULE(gstreamer-riff-1.0 HAVE_GSTREAMER_RIFF)
CHECK_MODULE(gstreamer-pbutils-1.0 HAVE_GSTREAMER_PBUTILS)
if(HAVE_GSTREAMER_BASE AND HAVE_GSTREAMER_VIDEO AND HAVE_GSTREAMER_APP AND HAVE_GSTREAMER_RIFF AND HAVE_GSTREAMER_PBUTILS)
set(HAVE_GSTREAMER TRUE)
set(GSTREAMER_BASE_VERSION ${ALIASOF_gstreamer-base-1.0_VERSION})
set(GSTREAMER_VIDEO_VERSION ${ALIASOF_gstreamer-video-1.0_VERSION})
set(GSTREAMER_APP_VERSION ${ALIASOF_gstreamer-app-1.0_VERSION})
set(GSTREAMER_RIFF_VERSION ${ALIASOF_gstreamer-riff-1.0_VERSION})
set(GSTREAMER_PBUTILS_VERSION ${ALIASOF_gstreamer-pbutils-1.0_VERSION})
endif()
endif(WITH_GSTREAMER AND NOT WITH_GSTREAMER_0_10)
# if gstreamer 1.x was not found, or we specified we wanted 0.10, try to find it
if(WITH_GSTREAMER_0_10 OR NOT HAVE_GSTREAMER)
CHECK_MODULE(gstreamer-base-0.10 HAVE_GSTREAMER_BASE)
CHECK_MODULE(gstreamer-video-0.10 HAVE_GSTREAMER_VIDEO)
CHECK_MODULE(gstreamer-app-0.10 HAVE_GSTREAMER_APP)
CHECK_MODULE(gstreamer-riff-0.10 HAVE_GSTREAMER_RIFF)
CHECK_MODULE(gstreamer-pbutils-0.10 HAVE_GSTREAMER_PBUTILS)
if(HAVE_GSTREAMER_BASE AND HAVE_GSTREAMER_VIDEO AND HAVE_GSTREAMER_APP AND HAVE_GSTREAMER_RIFF AND HAVE_GSTREAMER_PBUTILS)
set(HAVE_GSTREAMER TRUE)
set(GSTREAMER_BASE_VERSION ${ALIASOF_gstreamer-base-0.10_VERSION})
set(GSTREAMER_VIDEO_VERSION ${ALIASOF_gstreamer-video-0.10_VERSION})
set(GSTREAMER_APP_VERSION ${ALIASOF_gstreamer-app-0.10_VERSION})
set(GSTREAMER_RIFF_VERSION ${ALIASOF_gstreamer-riff-0.10_VERSION})
set(GSTREAMER_PBUTILS_VERSION ${ALIASOF_gstreamer-pbutils-0.10_VERSION})
endif()
endif(WITH_GSTREAMER_0_10 OR NOT HAVE_GSTREAMER)
If you look into the CMake configuration there are only two possible solutions, either GSTREAMER 1 OR GSTREAMER 0.1. However there is not a single case where you can decide NOT to use GSTREAMER.
So now I am wondering if there is a reason for that?
EXTRA
Got it to worl but now it cant find the cam, non-opencv interface does however... I think it could be due to the camera not being connected to eth0 interface but eth1. The opening of the capture is not working.
CvCaptureCAM_PvAPI* capture = new CvCaptureCAM_PvAPI;
if ( capture->open( index ))
return capture;