mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
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.
This commit is contained in:
parent
3a64b7c99f
commit
11c4fea0c8
3 changed files with 18 additions and 6 deletions
|
@ -1,3 +1,9 @@
|
|||
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):
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue