summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--gst-libs/gst/play/gstplay.c9
-rw-r--r--gst-libs/gst/play/play.c9
3 files changed, 18 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 4c8bbb45..9437b0a0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2004-01-14 Benjamin Otte <in7y118@public.uni-hamburg.de>
+ * gst-libs/gst/play/gstplay.c: (gst_play_tick_callback):
+ Query the audio element to get the time, not the clock. We're
+ interested in the element's time here.
+
+2004-01-14 Benjamin Otte <in7y118@public.uni-hamburg.de>
+
* ext/aalib/gstaasink.c: (gst_aasink_chain):
* ext/alsa/gstalsasink.c: (gst_alsa_sink_check_event):
* ext/esd/esdsink.c: (gst_esdsink_chain):
diff --git a/gst-libs/gst/play/gstplay.c b/gst-libs/gst/play/gstplay.c
index dee3f8ef..69f6f187 100644
--- a/gst-libs/gst/play/gstplay.c
+++ b/gst-libs/gst/play/gstplay.c
@@ -262,7 +262,8 @@ gst_play_have_video_size (GstElement *element, gint width,
static gboolean
gst_play_tick_callback (GstPlay *play)
{
- GstClock *clock = NULL;
+ GstElement* audio_sink_element;
+ GstClockTime time;
g_return_val_if_fail (play != NULL, FALSE);
@@ -271,8 +272,10 @@ gst_play_tick_callback (GstPlay *play)
return FALSE;
}
- clock = gst_bin_get_clock (GST_BIN (play));
- play->priv->time_nanos = gst_clock_get_time (clock);
+ audio_sink_element = g_hash_table_lookup (play->priv->elements,
+ "audio_sink_element");
+ time = gst_element_get_time (audio_sink_element);
+ play->priv->time_nanos = GST_CLOCK_TIME_IS_VALID (time) ? time : 0;
g_signal_emit (G_OBJECT (play), gst_play_signals[TIME_TICK],
0,play->priv->time_nanos);
diff --git a/gst-libs/gst/play/play.c b/gst-libs/gst/play/play.c
index dee3f8ef..69f6f187 100644
--- a/gst-libs/gst/play/play.c
+++ b/gst-libs/gst/play/play.c
@@ -262,7 +262,8 @@ gst_play_have_video_size (GstElement *element, gint width,
static gboolean
gst_play_tick_callback (GstPlay *play)
{
- GstClock *clock = NULL;
+ GstElement* audio_sink_element;
+ GstClockTime time;
g_return_val_if_fail (play != NULL, FALSE);
@@ -271,8 +272,10 @@ gst_play_tick_callback (GstPlay *play)
return FALSE;
}
- clock = gst_bin_get_clock (GST_BIN (play));
- play->priv->time_nanos = gst_clock_get_time (clock);
+ audio_sink_element = g_hash_table_lookup (play->priv->elements,
+ "audio_sink_element");
+ time = gst_element_get_time (audio_sink_element);
+ play->priv->time_nanos = GST_CLOCK_TIME_IS_VALID (time) ? time : 0;
g_signal_emit (G_OBJECT (play), gst_play_signals[TIME_TICK],
0,play->priv->time_nanos);