Hi,<br>I&#39;m new to gstreamer.<br>I&#39;m trying to make a pipe &quot;filesrc ! ffdemux... ! vaapidecode ! appsink&quot; to obtain frame or texture id of accelerated video.<br>I have alredy made working code with vaapisink, but i have to somehow get frame or texture id, and not show the video (this woud be done in another part of application, using opengl, and showing with other media). I&#39;m not even sure, that appsink is way to go, but this is the best I have found.<br>
To use appsink, I have set cap &quot;video/x-vaapi-surface&quot; and turned on &quot;emit-signals&quot;. Flesrc have proper file location.<br>Elements links ok, but I get &quot;Internal data stream error&quot;. Any help?<br>
<br>code fragment:<br><br>GstElement *source=gst_element_factory_make(&quot;filesrc&quot;,&quot;source&quot;;<br>GstElement *demuxer=gst_element_factory_make(&quot;ffdemux_mov_mp4_m4a_3gp_3g2_mj2&quot;,&quot;demuxer&quot;);<br>
GstElement *decoder=gst_element_factory_make(&quot;vaapidecode&quot;,&quot;decoder&quot;);<br>GstElement *sink=gst_element_factory_make(&quot;appsink&quot;,&quot;sink&quot;);<br>GstElement *pipeline; <br>pipeline = gst_pipeline_new (&quot;mypipeline&quot;);<br>
    <br>//setting values for appsink<br>GstCaps *cap = gst_caps_from_string(&quot;video/x-vaapi-surface&quot;);<br>gst_app_sink_set_caps((GstAppSink*) sink, cap);<br>g_object_set (G_OBJECT (sink, &quot;emit-signals&quot;, true, NULL);<br>
    <br>//file location for filesrc<br>g_object_set (G_OBJECT (filesrc, &quot;location&quot;, filePath.toAscii().data(), NULL);<br>    <br>//adding to bin<br>gst_bin_add (GST_BIN (pipeline), source);<br>gst_bin_add (GST_BIN (pipeline), demuxer);<br>
gst_bin_add (GST_BIN (pipeline), decoder);<br>gst_bin_add (GST_BIN (pipeline), sink);<br>    <br>//linking<br>qDebug() &lt;&lt; gst_element_link(source,demuxer);<br>qDebug() &lt;&lt; gst_element_link(decoder,sink);<br>g_signal_connect (demuxer, &quot;pad-added&quot;, G_CALLBACK (cb_new_pad), decoder); //linking demuxer with decoder<br>
<br><br><br>best regards,<br>Bober<br>