<div>Hi,</div>
<div> </div>
<div>To precise my problem, here is the result of the GST_DEBUG :</div>
<div><span lang="FR">
<p>2023.68 Kbps 13 frames received 6.31579 fps Decoding... </p>
<p>Media type video/mpeg, systemstream=(boolean)false, mpegversion=(int)2, framerate=(fraction)25/1, width=(int)720, height=(int)576 found, probability 100%</p>
<p>0:00:01.858608759 18267 0x23f4550 WARN basevideodecoder gstbasevideodecoder.c:664:gst_base_video_decoder_chain: Received buffer without a new-segment. Assuming timestamps start from 0.</p>
<p>2081.5 Kbps 14 frames received 6.5 fps Decoding... </p>
<p>Media type video/mpeg, systemstream=(boolean)false, mpegversion=(int)2, framerate=(fraction)25/1, width=(int)720, height=(int)576 found, probability 100%</p>
<p>0:00:02.038699964 18267 0x23f4550 <strong>WARN</strong> basevideodecoder gstbasevideodecoder.c:664:gst_base_video_decoder_chain: Received buffer without a new-segment. Assuming timestamps start from 0.</p>
<p>0:00:02.038733007 18267 0x23f4550 <strong>ERROR</strong> basevideodecoder gstbasevideodecoder.c:677:gst_base_video_decoder_chain: new segment event ret=0</p>
<p>0:00:02.038752871 18267 0x23f4550 <strong>WARN</strong> basesrc gstbasesrc.c:2582:gst_base_src_loop:<app-src> error: Erreur interne de flux de données.</p>
<p>0:00:02.038761733 18267 0x23f4550 <strong>WARN</strong> basesrc gstbasesrc.c:2582:gst_base_src_loop:<app-src> error: streaming task paused, reason error (-5)</p></span></div>
<div>The code I used :</div>
<div><span lang="FR">
<p>printf("Accelerated vdpau decoding from appsrc...\n");</p>
<p>// Gstreamer initialisation</p>
<p>gst_init (NULL, NULL);</p>
<p>GMainLoop *loop;</p>
<p>GstBus *bus;</p>
<p>GstElement *pipeline, *appsrc, *demuxer, *decoder, *postprocess, *videosink, *typefind;</p>
<p>loop = g_main_loop_new (NULL, FALSE);</p>
<p>//Create gstreamer elements</p>
<p>pipeline = gst_pipeline_new ("pipeline");</p>
<p>appsrc = gst_element_factory_make ("appsrc", "app-src");</p>
<p>// VDPAU traitement :</p>
<p>decoder = gst_element_factory_make ("vdpaumpegdec", "vdpau-decoder");</p>
<p>postprocess = gst_element_factory_make ("vdpauvideopostprocess", "vdpau-video-post-process");</p>
<p>videosink = gst_element_factory_make ("vdpausink", "vdpau-sink");</p>
<p>// detection elements</p>
<p>typefind = gst_element_factory_make ("typefind", "typefinder");</p>
<p>g_signal_connect (typefind, "have-type", G_CALLBACK (cb_typefound), loop);</p>
<p>if (!pipeline || !appsrc || !decoder || !videosink || !typefind || !postprocess)</p>
<p>{</p>
<p>g_printerr ("One element could not be created. Exiting.\n");</p>
<p>return -1;</p>
<p>}</p>
<p>/* we add a message handler */</p>
<p>bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));</p>
<p>gst_bus_add_watch (bus, bus_call, loop);</p>
<p>gst_object_unref (bus);</p>
<p>/* set the capabilities of the appsrc element */</p>
<p>GstCaps *caps = gst_caps_new_simple ("video/mpeg",</p>
<p>"systemstream", G_TYPE_BOOLEAN, false,</p>
<p>"mpegversion", G_TYPE_INT, 2,</p>
<p>"framerate",GST_TYPE_FRACTION,25,1,</p>
<p>"width",G_TYPE_INT,720,</p>
<p>"height",G_TYPE_INT,576,</p>
<p>NULL);</p>
<p>gst_app_src_set_caps(GST_APP_SRC(appsrc), caps);</p>
<p>/* we add all elements into the pipeline */</p>
<p>gst_bin_add_many (GST_BIN (pipeline),</p>
<p>appsrc, typefind, decoder, postprocess, videosink, NULL);</p>
<p>gst_element_link_many(appsrc, typefind, decoder, postprocess, videosink, NULL);</p>
<p>/* play */</p>
<p>printf("Now playing...\n");</p>
<p>gst_element_set_state (pipeline, GST_STATE_PLAYING);</p>
<p>/* create the buffer */</p>
<p>int BUFFER_SIZE = _avPacket.size;</p>
<p>GstBuffer *buffer = gst_buffer_new();</p>
<p>GST_BUFFER_DATA (buffer) = _avPacket.data;</p>
<p>GST_BUFFER_SIZE (buffer) = BUFFER_SIZE;</p>
<p>/* push the buffer to pipeline via appsrc */</p>
<p>GstFlowReturn gstFlowReturn = gst_app_src_push_buffer(GST_APP_SRC(appsrc), buffer);</p>
<p>printf("Return flow value = %d \n", gstFlowReturn);</p>
<p>/* and loop... */</p>
<p>g_main_loop_run (loop);</p>
<p>/* clean up */</p>
<p>gst_element_set_state (pipeline, GST_STATE_NULL);</p>
<p>gst_object_unref (GST_OBJECT (pipeline));</p>
<p>return 0;</p></span></div>