Is gst_base_sink_set_sync(sink,false) is equivalent to sync=false ?

ooznerol ooznerol at gmail.com
Mon Feb 8 13:39:01 UTC 2016


Hi all,

I had this pipeline running without any problem :

pipeline = gst_parse_launch("udpsrc caps=\"application/x-rtp,
media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264,
payload=(int)96\" port=5002 ! queue2 ! rtph264depay ! decodebin !
d3dvideosink sync=false", &Gerror);

I try to build it without gst_parse_launch command :

    udpsrc = gst_element_factory_make ("udpsrc", NULL);
    if (udpsrc == NULL)
        g_error ("Could not create Udpsrc element");

    GstCaps *caps = gst_caps_new_simple (
            "application/x-rtp",
            "media",           G_TYPE_STRING, "video",
            "clock-rate",      G_TYPE_INT,    90000,
            "encoding-name",   G_TYPE_STRING, "H264",
            "payload",         G_TYPE_INT,    96,
            NULL);

    g_object_set(udpsrc,"port",5002,NULL);
    g_object_set (G_OBJECT (udpsrc), "caps", caps,      NULL);
    gst_caps_unref (caps);


    //make queue2 element
    GstElement *queue2  = gst_element_factory_make ("queue2", NULL);
    if (queue2  == NULL)
        g_error ("Could not create queue2  element");

    //make rtp element
    GstElement *rtp  = gst_element_factory_make ("rtph264depay", NULL);
    if (rtp  == NULL)
        g_error ("Could not create rtp  element");


    //make decoder element
    GstElement *decoder = gst_element_factory_make ("decodebin", NULL);
    if (decoder == NULL)
        g_error ("Could not create decode element");


    //make videosink element
    //GstElement *sink = gst_element_factory_make ("d3dvideosink", NULL);
    videosink = gst_element_factory_make ("d3dvideosink", "videosink");
    if (videosink == NULL)
        g_error ("Could not create 'autovideosink' element");
    else
    {
        //try so set sync =false
        gst_base_sink_set_async_enabled (GST_BASE_SINK(videosink),FALSE);
    }


    /* decodebin pad created dynamically */
    g_signal_connect(decoder, "pad-added", G_CALLBACK(NewDecodedPad),  
videosink);

    gst_bin_add_many (GST_BIN (pipeline), udpsrc, queue2 ,rtp,
decoder,videosink, NULL);


    if (!gst_element_link_pads(udpsrc, "src", decoder, "sink"))
    {
        qDebug() << ("Failed to link pads!\n");
        return;
    }

but with this my video has a lot freeze/lag. Seems like I haven't set
sync=false.

Is gst_base_sink_set_async_enabled (GST_BASE_SINK(videosink),FALSE)
equivalent to sync=false?

thanks a lot




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Is-gst-base-sink-set-sync-sink-false-is-equivalent-to-sync-false-tp4675718.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list