adaptivedemux: fixed multithread support

https://bugzilla.gnome.org/show_bug.cgi?id=755169
This commit is contained in:
Florin Apostol 2015-09-16 16:46:29 +01:00 committed by Vincent Penquerc'h
parent cdfec06092
commit eab158a669
3 changed files with 578 additions and 193 deletions

View file

@ -798,7 +798,7 @@ retry:
TRUE, TRUE, TRUE, err);
g_free (main_uri);
if (download == NULL) {
if (!adaptive_demux->cancelled && update && !main_checked
if (update && !main_checked
&& gst_m3u8_client_has_variant_playlist (demux->client)
&& gst_m3u8_client_has_main (demux->client)) {
GError *err2 = NULL;

File diff suppressed because it is too large Load diff

View file

@ -72,10 +72,6 @@ G_BEGIN_DECLS
*/
#define GST_ADAPTIVE_DEMUX_STATISTICS_MESSAGE_NAME "adaptive-streaming-statistics"
#define GST_MANIFEST_GET_LOCK(d) (&(GST_ADAPTIVE_DEMUX_CAST(d)->manifest_lock))
#define GST_MANIFEST_LOCK(d) (g_mutex_lock (GST_MANIFEST_GET_LOCK (d)))
#define GST_MANIFEST_UNLOCK(d) (g_mutex_unlock (GST_MANIFEST_GET_LOCK (d)))
#define GST_ELEMENT_ERROR_FROM_ERROR(el, msg, err) G_STMT_START { \
gchar *__dbg = g_strdup_printf ("%s: %s", msg, err->message); \
GST_WARNING_OBJECT (el, "error: %s", __dbg); \
@ -144,7 +140,8 @@ struct _GstAdaptiveDemuxStream
GstPad *src_srcpad;
GMutex fragment_download_lock;
GCond fragment_download_cond;
gboolean download_finished;
gboolean download_finished; /* protected by fragment_download_lock */
gboolean cancelled; /* protected by fragment_download_lock */
gboolean starting_fragment;
gboolean first_fragment_buffer;
gint64 download_start_time;
@ -192,11 +189,6 @@ struct _GstAdaptiveDemux
GstSegment segment;
gboolean cancelled;
GMutex manifest_lock;
GCond manifest_cond;
gchar *manifest_uri;
gchar *manifest_base_uri;
@ -451,10 +443,6 @@ gst_adaptive_demux_stream_advance_fragment (GstAdaptiveDemux * demux,
void gst_adaptive_demux_stream_queue_event (GstAdaptiveDemuxStream * stream,
GstEvent * event);
GstFlowReturn
gst_adaptive_demux_stream_advance_fragment_unlocked (GstAdaptiveDemux * demux,
GstAdaptiveDemuxStream * stream, GstClockTime duration);
G_END_DECLS
#endif