mirror of
https://github.com/opencv/opencv.git
synced 2024-11-28 21:20:18 +08:00
Update cap_gstreamer.cpp
fixed call open(int id) failed
This commit is contained in:
parent
4fe900c399
commit
715f23127c
@ -613,10 +613,12 @@ int GStreamerCapture::getCaptureDomain() { return CAP_GSTREAMER; }
|
||||
*/
|
||||
bool GStreamerCapture::open(int id)
|
||||
{
|
||||
gst_initializer::init();
|
||||
|
||||
if (!is_gst_element_exists("v4l2src"))
|
||||
return false;
|
||||
std::ostringstream desc;
|
||||
desc << "v4l2src device-name=/dev/video" << id
|
||||
desc << "v4l2src device=/dev/video" << id
|
||||
<< " ! " << COLOR_ELEM
|
||||
<< " ! appsink";
|
||||
return open(desc.str());
|
||||
|
Loading…
Reference in New Issue
Block a user