[gst-devel] Fakesrc signal handoff question

Riccardo Corona coronariccardo at gmail.com
Tue May 29 19:26:48 CEST 2007


Hi,
during my test with gstreamer app for win32 I've used a fakesrc with an
handoff function in which I obtain some mpeg4 fragment that is put into a
gstbuffer.
I've also used the right plugin to visualize the mpeg4 packet on my
directdraw sink.
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't gstreamer thread.
This is main part of may handoff:


static void cb_handoff (GstElement *fakesrc,
        GstBuffer  *buffer,
        GstPad     *pad,
        gpointer    user_data)
{
       MyClass* dlg=(MyClass*)user_data;


        //fg_image is the object that contains the corretc (I've checked
it...) mpeg4 fragment
       //dt contains the time of the fragment
       //dlg->t is a struct tm that allows to obtain time_t


        dlg->t.tm_sec=dt.sec;
        dlg->t.tm_min=dt.min;
        dlg->t.tm_hour=dt.hour;
        dlg->t.tm_mday=dt.day;
        dlg->t.tm_mon=dt.month-1;
        dlg->t.tm_year=dt.year-1900;

        buffer->timestamp = mktime(&dlg->t);//GST_CLOCK_TIME_NONE;

        buffer->duration = GST_CLOCK_TIME_NONE;

        //fg_image->pixel_ptr contains the mpeg4 image buffer
        gst_buffer_set_data(buffer,fg_image->pixel_ptr,fg_image->dimension);


       //I've also tried withot this unref/ref but nothing to do...
        gst_buffer_unref(buffer);
        gst_buffer_ref(buffer);

        return;

}



So, all I see is the first frame, sometimes 2 or 3 and then all is stop but
I can't catch any error message in my bus_call (I'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.
My question is about the general usage of fakesrc: there's the need of some
kind of buffering or some kind of buffer control?

Thank's and best regards.

-- 
Riccardo Corona
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20070529/38a001de/attachment.htm>


More information about the gstreamer-devel mailing list