[gst-devel] setting packet time on playbin

Alfred E. Heggestad aeh at db.org
Sat Oct 6 17:52:41 CEST 2007


I am using the 'playbin' source with my own fakesink callback function
to get the raw pcm data, which works fine.

static void handoff_handler(GstFakeSink *fakesink, GstBuffer *buffer,
                 GstPad *pad, gpointer user_data)
     /* ... */

void init(void)
     /* Override audio-sink handoff handler */
     g_object_set(G_OBJECT(g->sink), "signal-handoffs", TRUE, NULL);
     g_signal_connect (g->sink, "handoff", G_CALLBACK (handoff_handler), g);
     g_object_set(G_OBJECT(g->source), "audio-sink", g->sink, NULL);

current the PCM data on the handoff_handler is 44.1kHz/2ch, which gives
2304 samples each time the function is called. that corresponds to a packet
time of ~38 milliseconds.

my question is basically; is it possible to set the packet time so my
callback function is called with a packet time of e.g. 20 milliseconds
(i.e. 50 times per second). ?

Thanks for this great software


More information about the gstreamer-devel mailing list