mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-26 17:18:15 +00:00
Fixed seeking discont with visualisation
Original commit message from CVS: Fixed seeking discont with visualisation
This commit is contained in:
parent
a9464c5893
commit
5208f05176
3 changed files with 26 additions and 2 deletions
|
@ -656,6 +656,7 @@ gst_play_seek_to_time ( GstPlay *play,
|
|||
guint8 prev_state;
|
||||
gboolean audio_seek_worked = FALSE;
|
||||
gboolean video_seek_worked = FALSE;
|
||||
gboolean visualisation_seek_worked = FALSE;
|
||||
|
||||
g_return_if_fail (GST_IS_PLAY (play));
|
||||
if (time_nanos < 0LL){
|
||||
|
@ -677,11 +678,18 @@ gst_play_seek_to_time ( GstPlay *play,
|
|||
GST_SEEK_FLAG_FLUSH, play->seek_time);
|
||||
if (play->audio_sink_element != NULL){
|
||||
gst_event_ref (s_event);
|
||||
audio_seek_worked = gst_element_send_event (play->audio_sink_element, s_event);
|
||||
audio_seek_worked = gst_element_send_event (
|
||||
play->audio_sink_element, s_event);
|
||||
}
|
||||
if (play->visualisation_sink_element != NULL){
|
||||
gst_event_ref (s_event);
|
||||
visualisation_seek_worked = gst_element_send_event (
|
||||
play->visualisation_sink_element, s_event);
|
||||
}
|
||||
if (play->video_sink_element != NULL){
|
||||
gst_event_ref (s_event);
|
||||
video_seek_worked = gst_element_send_event (play->video_sink_element, s_event);
|
||||
video_seek_worked = gst_element_send_event (
|
||||
play->video_sink_element, s_event);
|
||||
}
|
||||
gst_event_unref (s_event);
|
||||
|
||||
|
|
|
@ -108,6 +108,7 @@ struct _GstPlay
|
|||
GstElement *video_sink_element;
|
||||
GstElement *audio_sink;
|
||||
GstElement *audio_sink_element;
|
||||
GstElement *visualisation_sink_element;
|
||||
|
||||
GstDParamManager *vol_dpman;
|
||||
GstDParam *vol_dparam;
|
||||
|
|
|
@ -201,6 +201,11 @@ gst_play_audiot_set_audio ( GstPlay *play,
|
|||
audio_sink,
|
||||
GST_PLAY_SINK_TYPE_AUDIO);
|
||||
|
||||
play->visualisation_sink_element = gst_play_get_sink_element (
|
||||
play,
|
||||
audio_sink,
|
||||
GST_PLAY_SINK_TYPE_VIDEO);
|
||||
|
||||
if (play->audio_sink_element != NULL) {
|
||||
g_signal_connect (G_OBJECT (play->audio_sink_element), "eos",
|
||||
G_CALLBACK (callback_audio_sink_eos), play);
|
||||
|
@ -352,6 +357,11 @@ gst_play_audioht_set_audio ( GstPlay *play,
|
|||
audio_sink,
|
||||
GST_PLAY_SINK_TYPE_AUDIO);
|
||||
|
||||
play->visualisation_sink_element = gst_play_get_sink_element (
|
||||
play,
|
||||
audio_sink,
|
||||
GST_PLAY_SINK_TYPE_VIDEO);
|
||||
|
||||
if (play->audio_sink_element != NULL) {
|
||||
g_signal_connect (G_OBJECT (play->audio_sink_element), "eos",
|
||||
G_CALLBACK (callback_audio_sink_eos), play);
|
||||
|
@ -660,6 +670,11 @@ gst_play_video_set_audio ( GstPlay *play,
|
|||
audio_sink,
|
||||
GST_PLAY_SINK_TYPE_AUDIO);
|
||||
|
||||
play->visualisation_sink_element = gst_play_get_sink_element (
|
||||
play,
|
||||
audio_sink,
|
||||
GST_PLAY_SINK_TYPE_VIDEO);
|
||||
|
||||
if (play->audio_sink_element != NULL) {
|
||||
g_signal_connect (G_OBJECT (play->audio_sink_element), "eos",
|
||||
G_CALLBACK (callback_audio_sink_eos), play);
|
||||
|
|
Loading…
Reference in a new issue