gst_init(NULL, NULL); pipeline = gst_parse_launch("v4l2src device=/dev/video[0|1] ! xvimagesink", NULL); GstIterator* iter = gst_bin_iterate_sinks((GstBin*)pipeline); GstElement* thisElem; // Find sink at end of pipeline - there should be only one! if (gst_iterator_next(iter, (void**)&thisElem) == GST_ITERATOR_OK) { sink = thisElem; QApplication::syncX(); gst_element_set_state(pipeline, GST_STATE_READY); gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(sink), Widget.winID()); gst_element_set_state(pipeline, GST_STATE_PLAYING); }