Commit 39f5e573 authored by Maksim Shabunin's avatar Maksim Shabunin

Merge pull request #12159 from zarelaky:master

parents f0f652f9 715f2312
...@@ -613,10 +613,12 @@ int GStreamerCapture::getCaptureDomain() { return CAP_GSTREAMER; } ...@@ -613,10 +613,12 @@ int GStreamerCapture::getCaptureDomain() { return CAP_GSTREAMER; }
*/ */
bool GStreamerCapture::open(int id) bool GStreamerCapture::open(int id)
{ {
gst_initializer::init();
if (!is_gst_element_exists("v4l2src")) if (!is_gst_element_exists("v4l2src"))
return false; return false;
std::ostringstream desc; std::ostringstream desc;
desc << "v4l2src device-name=/dev/video" << id desc << "v4l2src device=/dev/video" << id
<< " ! " << COLOR_ELEM << " ! " << COLOR_ELEM
<< " ! appsink"; << " ! appsink";
return open(desc.str()); return open(desc.str());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment