summaryrefslogtreecommitdiffstats
path: root/gst-libs/gst/play
diff options
context:
space:
mode:
authorJulien Moutte <julien@moutte.net>2003-12-16 22:52:01 +0000
committerJulien Moutte <julien@moutte.net>2003-12-16 22:52:01 +0000
commitda2b8a4f3b4f32604a3a9cb6f2ee7c9913993b2f (patch)
treed97d557f7760f8b1970977f7ed46ea7b91979494 /gst-libs/gst/play
parent73d5b4cff4df14a9f8753bca9ac687e8c0a88ee4 (diff)
downloadgst-plugins-bad-da2b8a4f3b4f32604a3a9cb6f2ee7c9913993b2f.tar.gz
gst-plugins-bad-da2b8a4f3b4f32604a3a9cb6f2ee7c9913993b2f.tar.bz2
gst-plugins-bad-da2b8a4f3b4f32604a3a9cb6f2ee7c9913993b2f.zip
Harmonize state of sinks with the pipeline state.
Original commit message from CVS: Harmonize state of sinks with the pipeline state.
Diffstat (limited to 'gst-libs/gst/play')
-rw-r--r--gst-libs/gst/play/gstplay.c11
-rw-r--r--gst-libs/gst/play/play.c11
2 files changed, 10 insertions, 12 deletions
diff --git a/gst-libs/gst/play/gstplay.c b/gst-libs/gst/play/gstplay.c
index e3a472b2..7a0838ee 100644
--- a/gst-libs/gst/play/gstplay.c
+++ b/gst-libs/gst/play/gstplay.c
@@ -554,8 +554,6 @@ gst_play_seek_to_time (GstPlay * play, gint64 time_nanos)
g_return_val_if_fail (play != NULL, FALSE);
g_return_val_if_fail (GST_IS_PLAY (play), FALSE);
- g_message ("trying to seek");
-
if (time_nanos < 0LL)
time_nanos = 0LL;
@@ -567,7 +565,7 @@ gst_play_seek_to_time (GstPlay * play, gint64 time_nanos)
if (GST_IS_ELEMENT (audio_sink_element) &&
GST_IS_ELEMENT (video_sink_element)) {
gboolean s = FALSE;
-
+
s = gst_element_seek (audio_sink_element, GST_FORMAT_TIME |
GST_SEEK_METHOD_SET | GST_SEEK_FLAG_FLUSH,
time_nanos);
@@ -580,12 +578,9 @@ gst_play_seek_to_time (GstPlay * play, gint64 time_nanos)
if (s) {
GstClock *clock = gst_bin_get_clock (GST_BIN (play));
play->priv->time_nanos = gst_clock_get_time (clock);
- g_message ("seek succeeded");
g_signal_emit (G_OBJECT (play), gst_play_signals[TIME_TICK],
0,play->priv->time_nanos);
}
- else
- g_message ("seek failed");
}
return TRUE;
@@ -686,6 +681,8 @@ gst_play_set_video_sink (GstPlay *play, GstElement *video_sink)
G_CALLBACK (gst_play_have_video_size), play);
}
+ gst_element_set_state (video_sink, GST_STATE (GST_ELEMENT(play)));
+
return TRUE;
}
@@ -748,6 +745,8 @@ gst_play_set_audio_sink (GstPlay *play, GstElement *audio_sink)
audio_sink_element);
}
+ gst_element_set_state (audio_sink, GST_STATE (GST_ELEMENT(play)));
+
return TRUE;
}
diff --git a/gst-libs/gst/play/play.c b/gst-libs/gst/play/play.c
index e3a472b2..7a0838ee 100644
--- a/gst-libs/gst/play/play.c
+++ b/gst-libs/gst/play/play.c
@@ -554,8 +554,6 @@ gst_play_seek_to_time (GstPlay * play, gint64 time_nanos)
g_return_val_if_fail (play != NULL, FALSE);
g_return_val_if_fail (GST_IS_PLAY (play), FALSE);
- g_message ("trying to seek");
-
if (time_nanos < 0LL)
time_nanos = 0LL;
@@ -567,7 +565,7 @@ gst_play_seek_to_time (GstPlay * play, gint64 time_nanos)
if (GST_IS_ELEMENT (audio_sink_element) &&
GST_IS_ELEMENT (video_sink_element)) {
gboolean s = FALSE;
-
+
s = gst_element_seek (audio_sink_element, GST_FORMAT_TIME |
GST_SEEK_METHOD_SET | GST_SEEK_FLAG_FLUSH,
time_nanos);
@@ -580,12 +578,9 @@ gst_play_seek_to_time (GstPlay * play, gint64 time_nanos)
if (s) {
GstClock *clock = gst_bin_get_clock (GST_BIN (play));
play->priv->time_nanos = gst_clock_get_time (clock);
- g_message ("seek succeeded");
g_signal_emit (G_OBJECT (play), gst_play_signals[TIME_TICK],
0,play->priv->time_nanos);
}
- else
- g_message ("seek failed");
}
return TRUE;
@@ -686,6 +681,8 @@ gst_play_set_video_sink (GstPlay *play, GstElement *video_sink)
G_CALLBACK (gst_play_have_video_size), play);
}
+ gst_element_set_state (video_sink, GST_STATE (GST_ELEMENT(play)));
+
return TRUE;
}
@@ -748,6 +745,8 @@ gst_play_set_audio_sink (GstPlay *play, GstElement *audio_sink)
audio_sink_element);
}
+ gst_element_set_state (audio_sink, GST_STATE (GST_ELEMENT(play)));
+
return TRUE;
}