+2005-10-20 Wim Taymans <wim@fluendo.com>
+
+ * docs/design/part-TODO.txt:
+ Update TODO
+
+ * gst/base/gstbasesink.c: (gst_base_sink_get_position),
+ (gst_base_sink_query):
+ Don't use clock time to report position when in EOS.
+
2005-10-20 Tim-Philipp Müller <tim at centricular dot net>
* tools/gst-inspect.c: (print_interfaces),
- implement return values from events in addition to the gboolean. This should be
done by making the event contain a GstStructure with input/output values, similar
- to GstMessage.
+ to GstQuery. A typical use case is performing a non-accurate seek to a keyframe,
+ after the seek you want to get the new stream time that will actually be used to
+ update the slider bar.
- unlinking pads in the PAUSED state needs to make sure the stream thread is not
executing code. Can this be done with a flush to unlock all downstream chain
- implement BUFFERSIZE.
+- make bin_bus_handler a vmethod so subclasses can use their own implementation
+ or chain to the parent.
+
gst_object_unref (clock);
res = TRUE;
- } else {
}
GST_UNLOCK (basesink);
}
{
gint64 cur = 0;
GstFormat format;
+ gboolean eos;
- gst_query_parse_position (query, &format, NULL);
-
- GST_DEBUG_OBJECT (basesink, "current position format %d", format);
+ GST_PREROLL_LOCK (basesink->sinkpad);
+ eos = basesink->eos;
+ GST_PREROLL_UNLOCK (basesink->sinkpad);
- if ((res = gst_base_sink_get_position (basesink, format, &cur))) {
- gst_query_set_position (query, format, cur);
- } else {
+ if (eos) {
res = gst_base_sink_peer_query (basesink, query);
+ } else {
+ gst_query_parse_position (query, &format, NULL);
+
+ GST_DEBUG_OBJECT (basesink, "current position format %d", format);
+
+ if ((res = gst_base_sink_get_position (basesink, format, &cur))) {
+ gst_query_set_position (query, format, cur);
+ } else {
+ res = gst_base_sink_peer_query (basesink, query);
+ }
}
break;
}
gst_object_unref (clock);
res = TRUE;
- } else {
}
GST_UNLOCK (basesink);
}
{
gint64 cur = 0;
GstFormat format;
+ gboolean eos;
- gst_query_parse_position (query, &format, NULL);
-
- GST_DEBUG_OBJECT (basesink, "current position format %d", format);
+ GST_PREROLL_LOCK (basesink->sinkpad);
+ eos = basesink->eos;
+ GST_PREROLL_UNLOCK (basesink->sinkpad);
- if ((res = gst_base_sink_get_position (basesink, format, &cur))) {
- gst_query_set_position (query, format, cur);
- } else {
+ if (eos) {
res = gst_base_sink_peer_query (basesink, query);
+ } else {
+ gst_query_parse_position (query, &format, NULL);
+
+ GST_DEBUG_OBJECT (basesink, "current position format %d", format);
+
+ if ((res = gst_base_sink_get_position (basesink, format, &cur))) {
+ gst_query_set_position (query, format, cur);
+ } else {
+ res = gst_base_sink_peer_query (basesink, query);
+ }
}
break;
}