diff options
author | Benjamin Otte <otte@gnome.org> | 2004-01-14 02:37:12 +0000 |
---|---|---|
committer | Benjamin Otte <otte@gnome.org> | 2004-01-14 02:37:12 +0000 |
commit | b9b9ae813fc1dd29e692e601a8cf0af08fe5d439 (patch) | |
tree | 7c6a5ffaa53b586c541c812184945ab2e1d30991 /gst-libs/gst | |
parent | 596506d44396ef26250b58f5ce2dbeb6a5fec369 (diff) | |
download | gst-plugins-bad-b9b9ae813fc1dd29e692e601a8cf0af08fe5d439.tar.gz gst-plugins-bad-b9b9ae813fc1dd29e692e601a8cf0af08fe5d439.tar.bz2 gst-plugins-bad-b9b9ae813fc1dd29e692e601a8cf0af08fe5d439.zip |
gst-libs/gst/play/gstplay.c: Query the audio element to get the time, not the clock. We're interested in the element'...
Original commit message from CVS:
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.
Diffstat (limited to 'gst-libs/gst')
-rw-r--r-- | gst-libs/gst/play/gstplay.c | 9 | ||||
-rw-r--r-- | gst-libs/gst/play/play.c | 9 |
2 files changed, 12 insertions, 6 deletions
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); |