[Bug 751216] New: gst_pad_add_probe works differently

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Fri Jun 19 04:18:54 PDT 2015


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

            Bug ID: 751216
           Summary: gst_pad_add_probe works differently
    Classification: Platform
           Product: GStreamer
           Version: 1.5.1
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gstreamer (core)
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: polezhaiev at ukr.net
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

Hello,
I have filesink element named urisink (created by GESPipeline).
I want to know when buffer has been sent to filesink by muxer.
On receiving GST_MESSAGE_STREAM_START on GESPipeline's bus I'm attaching probe
to filesink's sink, with several printfs to stdout (sorry for C++11):


...
            ges_pipeline_set_mode(pipeline, GES_PIPELINE_MODE_RENDER);
            GstBus *bus = gst_pipeline_get_bus(GST_PIPELINE(pipeline));
            gst_bus_add_watch(bus, [](GstBus *, GstMessage *msg, gpointer data)
-> gboolean
            {
...
                switch (GST_MESSAGE_TYPE(msg))
                {
...

                case GST_MESSAGE_STREAM_START:
...
                            {
                                GstElement *filesink =
gst_bin_get_by_name(GST_BIN(pipeline), "urisink");
                                fprintf(stdout, "filesink: %p\n", filesink);
                                fflush(stdout);
                                GstPad *sinkpad =
gst_element_get_static_pad(filesink, "sink");
                                fprintf(stdout, "sinkpad: %p\n", sinkpad);
                                fflush(stdout);
                                filesink_probe = gst_pad_add_probe(sinkpad,
GST_PAD_PROBE_TYPE_BUFFER,
                                    [](GstPad *pad, GstPadProbeInfo *info,
gpointer data) -> GstPadProbeReturn
                                {
...
                                    fprintf(stdout, "probe cb data: %p\n",
data);
...
                                        fprintf(stdout, "probe %u, offset:
%lu\n", info->size, info->offset);
                                        fflush(stdout);
...
                                    return GST_PAD_PROBE_OK;
                                }, impl,
                                    [](gpointer data) -> void
                                {
                                    fprintf(stdout, "probe dn data: %p\n",
data);
                                    fflush(stdout);
                                });
                                fprintf(stdout, "filesink_probe: %lu\n",
filesink_probe);
                                fflush(stdout);
...
                            }
                        }
...
                        break;
...

I added printf to probe's callback and to destroy notify callback.

Situation is following:
on OS X with GStreamer 1.4.5, I see a lot of printfs called from probe
callback.
on Ubuntu and CentOS with GStreamer 1.5.1 and 1.5.0 I can not see printfs from
callbacks being called.
But filesink writes data in both cases.

-- 
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