Hi,<br>during my test with gstreamer app for win32 I&#39;ve used a fakesrc with an handoff function in which I obtain some mpeg4 fragment that is put into a gstbuffer.<br>I&#39;ve also used the right plugin to visualize the mpeg4 packet on my directdraw sink.
<br>It works weel only for the first 2-3 packets received and then the refresh of the images stops and, if I run in debug mode, I can see that some thread stop its execution but there isn&#39;t gstreamer thread.<br>This is main part of may handoff:
<br><br><br>static void cb_handoff (GstElement *fakesrc,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; GstBuffer&nbsp; *buffer,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; GstPad&nbsp;&nbsp;&nbsp;&nbsp; *pad,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; gpointer&nbsp;&nbsp;&nbsp; user_data)<br>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MyClass* dlg=(MyClass*)user_data;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //fg_image is the object that contains the corretc (I&#39;ve checked it...) mpeg4 fragment
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //dt contains the time of the fragment<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //dlg-&gt;t is a struct tm that allows to obtain time_t<br>&nbsp;&nbsp;&nbsp; <br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; dlg-&gt;t.tm_sec=dt.sec;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; dlg-&gt;t.tm_min=dt.min;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; dlg-&gt;t.tm_hour=dt.hour
;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; dlg-&gt;t.tm_mday=dt.day;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; dlg-&gt;t.tm_mon=dt.month-1;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; dlg-&gt;t.tm_year=dt.year-1900;<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; buffer-&gt;timestamp = mktime(&amp;dlg-&gt;t);//GST_CLOCK_TIME_NONE;<br>&nbsp;&nbsp;&nbsp; <br>&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; buffer-&gt;duration = GST_CLOCK_TIME_NONE;
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //fg_image-&gt;pixel_ptr contains the mpeg4 image buffer<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; gst_buffer_set_data(buffer,fg_image-&gt;pixel_ptr,fg_image-&gt;dimension);<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //I&#39;ve also tried withot this unref/ref but nothing to do...
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; gst_buffer_unref(buffer);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; gst_buffer_ref(buffer);<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return;<br><br>}<br><br><br><br>So, all I see is the first frame, sometimes 2 or 3 and then all is stop but I can&#39;t catch any error message in my bus_call (I&#39;ve set this function with gst_bus_add_watch).Moreover if I send an eof message then gstreamer stop nicely like it was always in execution.
<br>My question is about the general usage of fakesrc: there&#39;s the need of some kind of buffering or some kind of buffer control?<br><br>Thank&#39;s and best regards.<br><br>-- <br>Riccardo Corona