mssdemux will tolerate a few download errors before emitting an
error message to the bus
#define DEFAULT_BITRATE_LIMIT 0.8
#define DOWNLOAD_RATE_MAX_HISTORY_LENGTH 5
#define DEFAULT_BITRATE_LIMIT 0.8
#define DOWNLOAD_RATE_MAX_HISTORY_LENGTH 5
+#define MAX_DOWNLOAD_ERROR_COUNT 3
+ stream->download_error_count = 0;
+
if (buffer) {
gst_mss_stream_advance_fragment (stream->manifest_stream);
}
if (buffer) {
gst_mss_stream_advance_fragment (stream->manifest_stream);
}
error:
{
GST_WARNING_OBJECT (mssdemux, "Error while pushing fragment");
error:
{
GST_WARNING_OBJECT (mssdemux, "Error while pushing fragment");
- gst_task_pause (stream->download_task);
+ if (++stream->download_error_count >= DOWNLOAD_RATE_MAX_HISTORY_LENGTH) {
+ GST_ELEMENT_ERROR (mssdemux, RESOURCE, NOT_FOUND,
+ (_("Couldn't download fragments")),
+ ("fragment downloading has failed too much consecutive times"));
+ }
gboolean have_data;
GstDownloadRate download_rate;
gboolean have_data;
GstDownloadRate download_rate;
+
+ guint download_error_count;