summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--gst-libs/gst/play/gstplay.c17
-rw-r--r--gst-libs/gst/play/play.c17
3 files changed, 27 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 3d4234ff..9132bbab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2004-01-29 Julien MOUTTE <julien@moutte.net>
+
+ * ext/gnomevfs/gstgnomevfssrc.c: (gst_gnomevfssrc_get): Fixing seeking
+ emiting FLUSH and even before DISCONT.
+ * gst-libs/gst/play/gstplay.c: (gst_play_seek_to_time): Fix seeking to
+ get the best instant seeking as possible yay!
+
2004-01-29 Ronald Bultje <rbultje@ronald.bitfreak.net>
* gst/mpeg1videoparse/gstmp1videoparse.c:
diff --git a/gst-libs/gst/play/gstplay.c b/gst-libs/gst/play/gstplay.c
index f9389ea1..35f6d5cc 100644
--- a/gst-libs/gst/play/gstplay.c
+++ b/gst-libs/gst/play/gstplay.c
@@ -624,7 +624,7 @@ gst_play_get_location (GstPlay *play)
gboolean
gst_play_seek_to_time (GstPlay * play, gint64 time_nanos)
{
- GstElement *audio_sink_element, *video_sink_element;
+ GstElement *audio_seek_element, *video_seek_element, *audio_sink_element;
g_return_val_if_fail (play != NULL, FALSE);
g_return_val_if_fail (GST_IS_PLAY (play), FALSE);
@@ -632,20 +632,23 @@ gst_play_seek_to_time (GstPlay * play, gint64 time_nanos)
if (time_nanos < 0LL)
time_nanos = 0LL;
+ audio_seek_element = g_hash_table_lookup (play->priv->elements,
+ "audioconvert");
audio_sink_element = g_hash_table_lookup (play->priv->elements,
"audio_sink_element");
- video_sink_element = g_hash_table_lookup (play->priv->elements,
- "video_sink_element");
+ video_seek_element = g_hash_table_lookup (play->priv->elements,
+ "identity");
- if (GST_IS_ELEMENT (audio_sink_element) &&
- GST_IS_ELEMENT (video_sink_element)) {
+ if (GST_IS_ELEMENT (audio_seek_element) &&
+ GST_IS_ELEMENT (video_seek_element) &&
+ GST_IS_ELEMENT (audio_sink_element)) {
gboolean s = FALSE;
- s = gst_element_seek (video_sink_element, GST_FORMAT_TIME |
+ s = gst_element_seek (video_seek_element, GST_FORMAT_TIME |
GST_SEEK_METHOD_SET | GST_SEEK_FLAG_FLUSH,
time_nanos);
if (!s) {
- s = gst_element_seek (audio_sink_element, GST_FORMAT_TIME |
+ s = gst_element_seek (audio_seek_element, GST_FORMAT_TIME |
GST_SEEK_METHOD_SET | GST_SEEK_FLAG_FLUSH,
time_nanos);
}
diff --git a/gst-libs/gst/play/play.c b/gst-libs/gst/play/play.c
index f9389ea1..35f6d5cc 100644
--- a/gst-libs/gst/play/play.c
+++ b/gst-libs/gst/play/play.c
@@ -624,7 +624,7 @@ gst_play_get_location (GstPlay *play)
gboolean
gst_play_seek_to_time (GstPlay * play, gint64 time_nanos)
{
- GstElement *audio_sink_element, *video_sink_element;
+ GstElement *audio_seek_element, *video_seek_element, *audio_sink_element;
g_return_val_if_fail (play != NULL, FALSE);
g_return_val_if_fail (GST_IS_PLAY (play), FALSE);
@@ -632,20 +632,23 @@ gst_play_seek_to_time (GstPlay * play, gint64 time_nanos)
if (time_nanos < 0LL)
time_nanos = 0LL;
+ audio_seek_element = g_hash_table_lookup (play->priv->elements,
+ "audioconvert");
audio_sink_element = g_hash_table_lookup (play->priv->elements,
"audio_sink_element");
- video_sink_element = g_hash_table_lookup (play->priv->elements,
- "video_sink_element");
+ video_seek_element = g_hash_table_lookup (play->priv->elements,
+ "identity");
- if (GST_IS_ELEMENT (audio_sink_element) &&
- GST_IS_ELEMENT (video_sink_element)) {
+ if (GST_IS_ELEMENT (audio_seek_element) &&
+ GST_IS_ELEMENT (video_seek_element) &&
+ GST_IS_ELEMENT (audio_sink_element)) {
gboolean s = FALSE;
- s = gst_element_seek (video_sink_element, GST_FORMAT_TIME |
+ s = gst_element_seek (video_seek_element, GST_FORMAT_TIME |
GST_SEEK_METHOD_SET | GST_SEEK_FLAG_FLUSH,
time_nanos);
if (!s) {
- s = gst_element_seek (audio_sink_element, GST_FORMAT_TIME |
+ s = gst_element_seek (audio_seek_element, GST_FORMAT_TIME |
GST_SEEK_METHOD_SET | GST_SEEK_FLAG_FLUSH,
time_nanos);
}