[gst-devel] Warning while changing visualisation using playbin2

Yogesh Marwaha yogeshm.007 at gmail.com
Sun Jun 14 14:09:06 CEST 2009


Hi,

I'm trying to switch visualisation using playbin2. If the pipeline is
playing, when I switch from "none" to "goom" or "goom2k1" gstreamer
sends a warning saying "Internal data flow problem". What is the
significance of this warning? Relevant code is given below, please
check it for any mistake.

void SPlayer::setCurrentVisualisation(const QString &visualisation){
    if(mCurrentVisualisation == visualisation)
        return;
    GstElement *oldVisualisation;
    g_object_get(G_OBJECT(m_pPlayBin), "vis-plugin", &oldVisualisation, NULL);
    if(visualisation == "none"){//none means no visualisation should
be displayed.
        g_object_set(G_OBJECT(m_pPlayBin), "flags", 23, NULL);
        g_object_set(G_OBJECT(m_pPlayBin), "vis-plugin", NULL, NULL);
        if(oldVisualisation){
            gst_element_set_state(oldVisualisation, GST_STATE_NULL);
            gst_object_unref(oldVisualisation);
        }
        mCurrentVisualisation = visualisation;
        return;
    }
    GstElement *newVisualisation =
gst_element_factory_make(visualisation.toLocal8Bit(),
"gravity-playbin-visualisation");
    if(newVisualisation){
        g_object_set(G_OBJECT(m_pPlayBin), "vis-plugin",
newVisualisation, NULL);
        g_object_set(G_OBJECT(m_pPlayBin), "flags", 31, NULL);
        if(oldVisualisation){
            gst_element_set_state(oldVisualisation, GST_STATE_NULL);
            gst_object_unref(oldVisualisation);
        }
        mCurrentVisualisation = visualisation;
    }else{
        qDebug() << "## SPlayer ## Could not load requested
visualisation:" << visualisation;
    }
}

Regards,

--
Yogesh M
http://sparklemedia.sourceforge.net/
http://snakeeyes.wordpress.com/




More information about the gstreamer-devel mailing list