[Bug 796476] New: Appsink callback in tutorial is missing the return value

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Thu May 31 22:33:23 UTC 2018


https://bugzilla.gnome.org/show_bug.cgi?id=796476

            Bug ID: 796476
           Summary: Appsink callback in tutorial is missing the return
                    value
    Classification: Platform
           Product: GStreamer
           Version: 1.14.1
                OS: All
            Status: NEW
          Severity: minor
          Priority: Normal
         Component: documentation
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: jdebroin at yahoo.ca
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

In the "crude waveform generator" sample application in 
"Basic tutorial 8: Short-cutting the pipeline",
https://gstreamer.freedesktop.org/documentation/tutorials/basic/short-cutting-the-pipeline.html,
please update the new_sample function to return GstFlowReturn values.

static GstFlowReturn new_sample (GstElement *sink, CustomData *data) {
  GstSample *sample;

  /* Retrieve the buffer */
  g_signal_emit_by_name (sink, "pull-sample", &sample);
  if (sample) {
    /* The only thing we do in this example is print a * to indicate a received
buffer */
    g_print ("*");
    gst_sample_unref (sample);
    return GST_FLOW_OK;
  }
  return GST_FLOW_ERROR;
}

I spent a while wondering why the callback was only invoked once!
Thanks

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list