mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
hlsdemux: Port some things from the last commits
This commit is contained in:
parent
4df3fad9e4
commit
e3f00d6252
1 changed files with 12 additions and 12 deletions
|
@ -127,8 +127,8 @@ gst_hls_demux_dispose (GObject * obj)
|
|||
if (GST_TASK_STATE (demux->stream_task) != GST_TASK_STOPPED) {
|
||||
GST_DEBUG_OBJECT (demux, "Leaving streaming task");
|
||||
gst_task_stop (demux->stream_task);
|
||||
g_static_rec_mutex_lock (&demux->stream_lock);
|
||||
g_static_rec_mutex_unlock (&demux->stream_lock);
|
||||
g_rec_mutex_lock (&demux->stream_lock);
|
||||
g_rec_mutex_unlock (&demux->stream_lock);
|
||||
gst_task_join (demux->stream_task);
|
||||
}
|
||||
gst_object_unref (demux->stream_task);
|
||||
|
@ -141,8 +141,8 @@ gst_hls_demux_dispose (GObject * obj)
|
|||
GST_DEBUG_OBJECT (demux, "Leaving updates task");
|
||||
gst_task_stop (demux->updates_task);
|
||||
GST_TASK_SIGNAL (demux->updates_task);
|
||||
g_static_rec_mutex_lock (&demux->updates_lock);
|
||||
g_static_rec_mutex_unlock (&demux->updates_lock);
|
||||
g_rec_mutex_lock (&demux->updates_lock);
|
||||
g_rec_mutex_unlock (&demux->updates_lock);
|
||||
gst_task_join (demux->updates_task);
|
||||
}
|
||||
gst_object_unref (demux->updates_task);
|
||||
|
@ -323,8 +323,8 @@ gst_hls_demux_change_state (GstElement * element, GstStateChange transition)
|
|||
case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
|
||||
gst_task_stop (demux->updates_task);
|
||||
GST_TASK_SIGNAL (demux->updates_task);
|
||||
g_static_rec_mutex_lock (&demux->updates_lock);
|
||||
g_static_rec_mutex_unlock (&demux->updates_lock);
|
||||
g_rec_mutex_lock (&demux->updates_lock);
|
||||
g_rec_mutex_unlock (&demux->updates_lock);
|
||||
break;
|
||||
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
||||
demux->cancelled = TRUE;
|
||||
|
@ -407,8 +407,8 @@ gst_hls_demux_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
|||
gst_uri_downloader_cancel (demux->downloader);
|
||||
gst_task_stop (demux->updates_task);
|
||||
GST_TASK_SIGNAL (demux->updates_task);
|
||||
g_static_rec_mutex_lock (&demux->updates_lock);
|
||||
g_static_rec_mutex_unlock (&demux->updates_lock);
|
||||
g_rec_mutex_lock (&demux->updates_lock);
|
||||
g_rec_mutex_unlock (&demux->updates_lock);
|
||||
gst_task_pause (demux->stream_task);
|
||||
|
||||
/* wait for streaming to finish */
|
||||
|
@ -620,14 +620,14 @@ gst_hls_demux_stop (GstHLSDemux * demux)
|
|||
demux->stop_stream_task = TRUE;
|
||||
gst_task_stop (demux->updates_task);
|
||||
GST_TASK_SIGNAL (demux->updates_task);
|
||||
g_static_rec_mutex_lock (&demux->updates_lock);
|
||||
g_static_rec_mutex_unlock (&demux->updates_lock);
|
||||
g_rec_mutex_lock (&demux->updates_lock);
|
||||
g_rec_mutex_unlock (&demux->updates_lock);
|
||||
}
|
||||
|
||||
if (GST_TASK_STATE (demux->stream_task) != GST_TASK_STOPPED) {
|
||||
gst_task_stop (demux->stream_task);
|
||||
g_static_rec_mutex_lock (&demux->stream_lock);
|
||||
g_static_rec_mutex_unlock (&demux->stream_lock);
|
||||
g_rec_mutex_lock (&demux->stream_lock);
|
||||
g_rec_mutex_unlock (&demux->stream_lock);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue