AnsweredAssumed Answered

Error in setting up gstreamer pipeline in OpenCV Capture function

Question asked by Abhijeet Gokar on Sep 14, 2019
Latest reply on Sep 16, 2019 by igorpadykov

I am using Ubuntu 14.04. The cmake version being used is 2.4 and gstreamer-1.0 is used.

 

1. When this command is run through command line,
gst-launch-1.0 autovideosrc ! autovideosink


The video is observed on the display with following message in the terminal,


Setting pipeline to PAUSED ...
ERROR: v4l2 capture: unsupported ioctrl!
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock

 

2. When the cross-compiled application (using CMake) is run through opencv application on the cross platform,


VideoCapture cap("gst-launch-1.0 autovideosrc ! autovideosink");
ERROR: Error opening video stream or file

 

3. Following is the code:


#include "opencv2/opencv.hpp"
#include <iostream>
using namespace std;
using namespace cv;
int main()
{
 VideoCapture cap("gst-launch-1.0 autovideosrc ! autovideosink");
  //cap.open(3);
 //VideoCapture cap(VIDIOC_ENUM_FMT);
  // Check if camera opened successfully
 if(!cap.isOpened())
 {
  cout << "Error opening video stream or file" << endl;
  return -1;
  }

 

4. Where is the issue?

 

BHUPESH PATIL

Outcomes