Display Gstreamer video in QML
<p>I try to use Gstreamer(not QtGstreamer or QtMultimedia) in QML(Qt Quick Controls Application):</p>

<pre><code>QQmlEngine engine;
   QQmlComponent component(&amp;engine,
           QUrl(QStringLiteral("qrc:/main.qml")));
   QObject *object = component.create();

   QWidget *rect = (QWidget*) object-&gt;findChild&lt;QObject*&gt;("rectangle1");

   gst_init(NULL, NULL);

   GstElement *pipeline;
   pipeline = gst_element_factory_make("playbin", "player");

   g_object_set (G_OBJECT (pipeline), "uri", "file:///home/user/Downloads/test.mp4", NULL);

   gst_element_set_state(pipeline, GST_STATE_NULL);
   gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY(pipeline), rect-&gt;winId());
   gst_element_set_state(pipeline, GST_STATE_PLAYING);
</code></pre>

<p>But my application crashes after start. This code works fine for Qt Widgets, but problem occurs only with QML.</p>

<p><strong>So how can I display video in QML item via pure Gstreamer(not QtGstreamer or QtMultimedia)?</strong></p>

<p>P.S. Of course without backend compiling or something like this(if it possible). I think I just can use right QML item or Widget.</p>

<p>P.S.S I also heard about QDeclarativeItem, can I use it for this purposes? And how?</p>