something about the caps of the pipeline

Jerry zhuangzhida1989 at gmail.com
Sun Jul 14 20:39:14 PDT 2013


the following is my pipeline:
shmsrc ! video/x-h264,width=640,height=480,framerate=25/1 ! rtph264pay
name=tmppay ! udpsink host=*.*.*.* port=39999

the pipeline is running, and I get the caps from the pipeline, but the caps
is null,why? The follow is what I do:
    GstElement *tmppay = gst_bin_get_by_name(GST_BIN(pipeline), "tmppay");
    if(tmppay == NULL)
    {
        KD_DBG_INFO("tmppay is null");
    }
    GstPad *pad = gst_element_get_static_pad(tmppay, "src");
    GstCaps *caps = NULL;
    while(caps == NULL)
    {
        caps = GST_PAD_CAPS(pad);
    }
    KD_DBG_INFO("CAPS=%s", gst_caps_to_string(caps));
    GstStructure *gst_struct = gst_caps_get_structure(caps, 0); //const
    if(gst_struct == NULL)
    {
        KD_DBG_WARN("gst_struct is null");
    }
    const GValue * value = gst_structure_get_value(gst_struct,
"sprop-parameter-sets"); //const

Anybody help? Thanks.



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/something-about-the-caps-of-the-pipeline-tp4661032.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list