OpenCV 3.1.0 built from source with Gstreamer support
-DWITH_GSTREAMER=ON \
-DWITH_GSTREAMER_0_10=ON
Camera is OV5640 connected to the board via CSI
Code to replicate problem
//Various Pipelines I have tried//
//const std::string gst_pipeline = "v4l2src ! queue ! 'video/x-raw-yuv,format=(fourcc)Y444,width=1920,height=1080,framerate=25/1' ! queue ! appsink";
const std::string gst_pipeline = "v4l2src ! videoconvert ! appsink";
cv::VideoCapture cap(gst_pipeline, cv::CAP_GSTREAMER);
if (!cap.isOpened()){
printf("Camera not opened \n");
return -1;
}
// View video
cv::Mat frame;
for(int i = 0; i < 1500; i++) {
cap >> frame; // Get a new frame from camera
}
When I try the command you listed I get this error:
Setting pipeline to PAUSED ...
Inside NvxLiteH264DecoderLowLatencyInitNvxLiteH264DecoderLowLatencyInit set DPB and MjstreamingERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Cannot identify device 'dev/video0'.
Additional debug info:
v4l2_calls.c(568): gst_v4l2_open (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
system error: No such file or directory
Setting pipeline to NULL ...
Freeing pipeline ...
Setting pipeline to PAUSED ...
Inside NvxLiteH264DecoderLowLatencyInitNvxLiteH264DecoderLowLatencyInit set DPB and MjstreamingPipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data flow error.
Additional debug info:
gstbasesrc.c(2865): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming task paused, reason not-negotiated (-4)
EOS on shutdown enabled -- waiting for EOS after Error
Waiting for EOS...
I can always try rebuilding OpenCV with gstreamer-1.0 support and without 0.10 support but as I understand they are two different programs and should not interfere with each other in any way.