ext/gnomevfs/gstgnomevfssrc.c: Fixing seeking emiting FLUSH and even before DISCONT.

Original commit message from CVS:
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!
This commit is contained in:
Julien Moutte 2004-01-29 22:44:42 +00:00
parent 110728b45b
commit 4ea716a6fe
3 changed files with 27 additions and 14 deletions

View file

@ -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:

View file

@ -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);
}

View file

@ -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);
}