How to handle "Could not determine type of stream" in GstApp?

jmz jmzheng at gmail.com
Wed Jul 26 10:02:42 UTC 2017


Hi,

I have a program using "appsrc ! decodebin ! ... ! appsink" as a pipeline.

The appsrc pushes data within buf and EOS to its source pad. The appsink
handles data until EOS has been received.

    // appsrc pushes data
    gst_app_src_push_buffer (GST_APP_SRC (app->src), buf);
    gst_app_src_end_of_stream (GST_APP_SRC (app->src));

    // blocking here if could not determine type of stream

    while (!gst_app_sink_is_eos(GST_APP_SINK(sink))) {
        // appsink handles data
    }

The program is blocked if the data feeded by appsrc can't be decoded. The
debugging messages are shown as follows.

0:00:00.022883965 25934       0xb5e720 INFO                 basesrc
gstbasesrc.c:2668:gst_base_src_loop:<source> pausing after
gst_base_src_get_range() = eos
0:00:00.022933010 25934       0xb5e720 INFO                typefind
gsttypefindelement.c:639:gst_type_find_element_sink_event:<typefind> Got EOS
and no type found yet
0:00:00.023446822 25934       0xb5e720 INFO        GST_ERROR_SYSTEM
gstelement.c:1835:gst_element_message_full:<typefind> posting message: Could
not determine type of stream.
0:00:00.023468101 25934       0xb5e720 INFO        GST_ERROR_SYSTEM
gstelement.c:1858:gst_element_message_full:<typefind> posted error message:
Could not determine type of stream.
0:00:00.023482702 25934       0xb5e720 INFO                    task
gsttask.c:300:gst_task_func:<source:src> Task going to paused

I have a bus message handler which can get GST_MESSAGE_ERROR on the error.
However, I can't stop the program using g_main_loop_quit() in "case
GST_MESSAGE_ERROR" because I don't use a GLib event loop.

How can I stop the program on the "Could not determine type of stream"?

Best Regards




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/How-to-handle-Could-not-determine-type-of-stream-in-GstApp-tp4683956.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list