From 49fcab8fd60752c06b91c2e3b217c123d7b8a6b2 Mon Sep 17 00:00:00 2001 From: kos Date: Thu, 2 Feb 2012 13:38:49 +0900 Subject: [PATCH] fix serviecmp3 bug. - stop response timeout when stream is HLS. --- lib/service/servicemp3.cpp | 18 +++++++++++++++++- lib/service/servicemp3.h | 3 +++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/lib/service/servicemp3.cpp b/lib/service/servicemp3.cpp index 937032a..edcc42a 100644 --- a/lib/service/servicemp3.cpp +++ b/lib/service/servicemp3.cpp @@ -229,6 +229,8 @@ eServiceMP3::eServiceMP3(eServiceReference ref) m_prev_decoder_time = -1; m_decoder_time_valid_state = 0; m_errorInfo.missing_codec = ""; + //vuplus + m_is_hls_stream = 0; CONNECT(m_seekTimeout->timeout, eServiceMP3::seekTimeoutCB); CONNECT(m_subtitle_sync_timer->timeout, eServiceMP3::pushSubtitles); @@ -1187,7 +1189,15 @@ void eServiceMP3::gstBusCall(GstBus *bus, GstMessage *msg) case GST_MESSAGE_STATE_CHANGED: { if(GST_MESSAGE_SRC(msg) != GST_OBJECT(m_gst_playbin)) + { + //vuplus + if(!strncmp(sourceName, "hls", 3)) + { + //eDebug("HLS Protocol detected : source [%s]", sourceName); + m_is_hls_stream = 1; + } break; + } GstState old_state, new_state; gst_message_parse_state_changed(msg, &old_state, &new_state, NULL); @@ -1466,7 +1476,13 @@ void eServiceMP3::gstBusCall(GstBus *bus, GstMessage *msg) g_object_set (G_OBJECT (owner), "timeout", HTTP_TIMEOUT, NULL); eDebug("eServiceMP3::GST_STREAM_STATUS_TYPE_CREATE -> setting timeout on %s to %is", name, HTTP_TIMEOUT); } - + //vuplus + else if (m_is_hls_stream && !strncmp(name, "queue", 5)) + { + m_streamingsrc_timeout->stop(); + m_is_hls_stream = 0; + //eDebug("Stoped response timeout!! : HLS"); + } } if ( GST_IS_PAD(source) ) gst_object_unref(owner); diff --git a/lib/service/servicemp3.h b/lib/service/servicemp3.h index f3cc6dd..00dd5ca 100644 --- a/lib/service/servicemp3.h +++ b/lib/service/servicemp3.h @@ -194,6 +194,9 @@ private: friend class eServiceFactoryMP3; eServiceReference m_ref; int m_buffer_size; + //vuplus + int m_is_hls_stream; + bufferInfo m_bufferInfo; errorInfo m_errorInfo; eServiceMP3(eServiceReference ref); -- 2.7.4