create a pipeline in a callback funtion

nero88 vazlup at gmail.com
Tue Feb 10 14:05:31 PST 2015


Hi!
I want to know if it is correct create a pipeline within a callback 
I give you an example of what I have implemented:
I have a callback that is responsible for receiving error messages. When I
get an error that's the problem I launch a new pipeline to the problem
fixed. This works but not if it is correct implementation or can give any
problems later.
------
static gboolean
bus_cb (GstBus *bus,
        GstMessage *msg,
        gpointer data)
{
    switch (GST_MESSAGE_TYPE (msg))
    {
        case GST_MESSAGE_EOS:
            {
                g_debug ("end-of-stream");
                break;
            }
        case GST_MESSAGE_ERROR:
            {
               gchar *debug_info;
               GError *err;
                gst_message_parse_error (msg, &err, &debug_info);
                if((err->code) == GST_CORE_ERROR_NEGOTIATION)//Error 
                {
                	start_pipeline();
                }

                break;
            }
        default:
            break;
    }

    return TRUE;
}



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/create-a-pipeline-in-a-callback-funtion-tp4670673.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list