AppSink in Gstreamer 1.0

InnerPeace Nature innerpeace.nature at gmail.com
Tue Nov 25 02:52:10 PST 2014


Hello All,

I'm trying to use AppSink in playbin. Here is my code -

*/* Create AppSink & add to playbin */*
data->audioSinkElement = gst_element_factory_make ("appsink",
"appsink");
g_object_set (G_OBJECT(data->playBin), "audio-sink",
data->audioSinkElement, NULL);

*/* Configure appsink */*
g_object_set (G_OBJECT (vdata->audioSinkElement), "sync", TRUE, NULL);
g_object_set (data->audioSinkElement, "emit-signals", TRUE, NULL);
g_signal_connect (data->audioSinkElement, "new-sample", G_CALLBACK
(new_sample), NULL);

*/* signalled when a new sample buffer is available */*
static void new_sample (GstElement * appsink, gpointer user_data)
{
  GstSample *sample=NULL;

  g_signal_emit_by_name (appsink, "pull-sample", &sample, NULL);
  if (sample) {
    g_print("Got sample=%p", sample);
    gst_sample_unref (sample);
  }
}

*Problem is -*
I see "Got sample" print only couple of times after which pipeline hangs.

Please help me find bug in my code. Thanks in advance.

Thanks & Regards,
MB
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20141125/e7401b75/attachment.html>


More information about the gstreamer-devel mailing list