X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=lib%2Fservice%2Fservicemp3.cpp;h=6aed8655896ad62687de7da0782515b3c32bcf5a;hp=be55d0cd331c55008af6bcee317624ac2d46cd36;hb=5e5249fb5503619b725d2c652a3b82a98a503075;hpb=a582f7d2a1ff336a1edc59a7d9d7a0707e0c8741 diff --git a/lib/service/servicemp3.cpp b/lib/service/servicemp3.cpp old mode 100644 new mode 100755 index be55d0c..6aed865 --- a/lib/service/servicemp3.cpp +++ b/lib/service/servicemp3.cpp @@ -47,6 +47,10 @@ eServiceFactoryMP3::eServiceFactoryMP3() extensions.push_back("mp4"); extensions.push_back("mov"); extensions.push_back("m4a"); + extensions.push_back("flv"); + extensions.push_back("3gp"); + extensions.push_back("3g2"); + extensions.push_back("dts"); sc->addServiceFactory(eServiceFactoryMP3::id, this, extensions); } @@ -229,6 +233,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); @@ -284,7 +290,7 @@ eServiceMP3::eServiceMP3(eServiceReference ref) m_sourceinfo.containertype = ctVCD; m_sourceinfo.is_video = TRUE; } - if ( (strncmp(filename, "http://", 7)) == 0 || (strncmp(filename, "udp://", 6)) == 0 || (strncmp(filename, "rtp://", 6)) == 0 || (strncmp(filename, "https://", 8)) == 0 || (strncmp(filename, "mms://", 6)) == 0 || (strncmp(filename, "rtsp://", 7)) == 0 || (strncmp(filename, "rtspt://", 7)) == 0 ) + if ( strstr(filename, "://") ) m_sourceinfo.is_streaming = TRUE; gchar *uri; @@ -1187,7 +1193,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); @@ -1241,7 +1255,7 @@ void eServiceMP3::gstBusCall(GstBus *bus, GstMessage *msg) GError *err; gst_message_parse_error (msg, &err, &debug); g_free (debug); - eWarning("Gstreamer error: %s (%i) from %s", err->message, err->code, sourceName ); + eWarning("Gstreamer error: %s (domain:%i, code:%i) from %s", err->message, err->domain, err->code, sourceName ); if ( err->domain == GST_STREAM_ERROR ) { if ( err->code == GST_STREAM_ERROR_CODEC_NOT_FOUND ) @@ -1252,6 +1266,11 @@ void eServiceMP3::gstBusCall(GstBus *bus, GstMessage *msg) m_event((iPlayableService*)this, evUser+10); } } + else //if( err->domain == 1232 ) + { + if ( err->code == 5 ) + m_event((iPlayableService*)this, evUser+20); + } g_error_free(err); break; } @@ -1466,7 +1485,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);