- gst_segment_set_newsegment_full (segment, update, rate, arate, format, start,
- stop, time);
-
- if (format == GST_FORMAT_TIME) {
- GST_DEBUG_OBJECT (basesink,
- "configured NEWSEGMENT update %d, rate %lf, applied rate %lf, "
- "format GST_FORMAT_TIME, "
- "%" GST_TIME_FORMAT " -- %" GST_TIME_FORMAT
- ", time %" GST_TIME_FORMAT ", accum %" GST_TIME_FORMAT,
- update, rate, arate, GST_TIME_ARGS (segment->start),
- GST_TIME_ARGS (segment->stop), GST_TIME_ARGS (segment->time),
- GST_TIME_ARGS (segment->accum));
- } else {
- GST_DEBUG_OBJECT (basesink,
- "configured NEWSEGMENT update %d, rate %lf, applied rate %lf, "
- "format %d, "
- "%" G_GINT64_FORMAT " -- %" G_GINT64_FORMAT ", time %"
- G_GINT64_FORMAT ", accum %" G_GINT64_FORMAT, update, rate, arate,
- segment->format, segment->start, segment->stop, segment->time,
- segment->accum);
- }
+ /* the newsegment event is needed to bring the buffer timestamps to the
+ * stream time and to drop samples outside of the playback segment. */
+ gst_event_copy_segment (event, segment);
+ GST_DEBUG_OBJECT (basesink, "configured SEGMENT %" GST_SEGMENT_FORMAT,
+ segment);