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