[gstreamer-bugs] [Bug 635226] [PATCH] gdppay fails to sync if added to pipeline during playback

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Mon Dec 13 07:33:33 PST 2010


https://bugzilla.gnome.org/show_bug.cgi?id=635226
  GStreamer | gst-plugins-base | 0.10.31

--- Comment #12 from Nicola <lists at svrinformatica.it> 2010-12-13 15:33:30 UTC ---
Alexey, my retimestamper element send a newsegment event before reset the
timestamp (I think resettime do this too) here is the relevant code:

GstReTimeStamper *filter;

    filter = GST_RETIMESTAMPER(GST_OBJECT_PARENT(pad));

    if (filter->silent == FALSE) {
        g_print("buffer timestamp: %-2.9f seconds\n", buf->timestamp /
1000000000.0);
        g_print("buffer offset: %ld\n", buf->offset);
        g_print("buffer duration: %-2.9f seconds\n", buf->duration /
1000000000.0);
        g_print("buffer size: %d \n", buf->size);
        g_print("filter offset: %-2.9f seconds\n", filter->time_offset /
1000000000.0);
    }
    if (filter->reset_timestamp == TRUE) {
        if (GST_CLOCK_TIME_IS_VALID(buf->timestamp)) {
            GstEvent *news;
            news = gst_event_new_new_segment(FALSE, 1.0, GST_FORMAT_TIME, 0,
-1, buf->timestamp);
            gst_element_send_event(filter, news);
            filter->reset_timestamp = FALSE;
            filter->time_offset = buf->timestamp;
            filter->buf_offset = buf->offset;
        }
        else {
            g_print("INVALID buffer timestamp on reset: %-2.9f seconds\n",
buf->timestamp / 1000000000.0);
        }
    }
    if (GST_CLOCK_TIME_IS_VALID(buf->timestamp)) {
        buf->timestamp -= filter->time_offset;
        if (filter->buf_offset > 0) {
            buf->offset -= filter->buf_offset;
        }
        if (filter->silent == FALSE) {
            g_print("buffer timestamp dopo reset: %-2.9f seconds\n",
buf->timestamp / 1000000000.0);
            g_print("buffer offset dopo il reset: %ld\n", buf->offset);
        }
    }
    else {
        g_print("INVALID buffer timestamp: %-2.9f seconds\n", buf->timestamp /
1000000000.0);
    }
    return gst_pad_push(filter->srcpad, buf);

hope it helps,

Nicola

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.




More information about the Gstreamer-bugs mailing list