From 17b62f03536b95435feb119a0efcbedf866870cb Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 20 Oct 2005 17:18:12 +0000 Subject: [PATCH] docs/design/part-TODO.txt: Update TODO Original commit message from CVS: * 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. --- ChangeLog | 9 +++++++++ docs/design/part-TODO.txt | 7 ++++++- gst/base/gstbasesink.c | 22 +++++++++++++++------- libs/gst/base/gstbasesink.c | 22 +++++++++++++++------- 4 files changed, 45 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8e27dd1..4e52fad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2005-10-20 Wim Taymans + + * 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 * tools/gst-inspect.c: (print_interfaces), diff --git a/docs/design/part-TODO.txt b/docs/design/part-TODO.txt index 799b334..720eb74 100644 --- a/docs/design/part-TODO.txt +++ b/docs/design/part-TODO.txt @@ -6,7 +6,9 @@ - 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 @@ -26,3 +28,6 @@ - implement BUFFERSIZE. +- make bin_bus_handler a vmethod so subclasses can use their own implementation + or chain to the parent. + diff --git a/gst/base/gstbasesink.c b/gst/base/gstbasesink.c index d2b87de..ba6934f 100644 --- a/gst/base/gstbasesink.c +++ b/gst/base/gstbasesink.c @@ -1425,7 +1425,6 @@ gst_base_sink_get_position (GstBaseSink * basesink, GstFormat format, gst_object_unref (clock); res = TRUE; - } else { } GST_UNLOCK (basesink); } @@ -1447,15 +1446,24 @@ gst_base_sink_query (GstElement * element, GstQuery * query) { 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; } diff --git a/libs/gst/base/gstbasesink.c b/libs/gst/base/gstbasesink.c index d2b87de..ba6934f 100644 --- a/libs/gst/base/gstbasesink.c +++ b/libs/gst/base/gstbasesink.c @@ -1425,7 +1425,6 @@ gst_base_sink_get_position (GstBaseSink * basesink, GstFormat format, gst_object_unref (clock); res = TRUE; - } else { } GST_UNLOCK (basesink); } @@ -1447,15 +1446,24 @@ gst_base_sink_query (GstElement * element, GstQuery * query) { 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; } -- 2.7.4