}
break;
}
+ case GST_QUERY_SEGMENT:{
+ GstFormat format;
+ gint64 start, stop;
+
+ format = demux->src_segment.format;
+
+ start =
+ gst_segment_to_stream_time (&demux->src_segment, format,
+ demux->src_segment.start);
+ if ((stop = demux->src_segment.stop) == -1)
+ stop = demux->src_segment.duration;
+ else
+ stop = gst_segment_to_stream_time (&demux->src_segment, format, stop);
+
+ if (demux->src_segment.rate < 0.0) {
+ gint64 tmp;
+ tmp = stop;
+ stop = start;
+ start = tmp;
+ }
+
+ gst_query_set_segment (query, demux->src_segment.rate, format, start,
+ stop);
+ res = TRUE;
+ break;
+ }
default:
res = gst_pad_query_default (pad, parent, query);
break;