From 418bb7f62c7a102f16dfd6a509680b6921486a6c Mon Sep 17 00:00:00 2001 From: "Chang.H.S" Date: Fri, 29 Jun 2012 14:35:26 +0900 Subject: [PATCH] db.cpp : 'Load Bouquets' support for non dvb services. sevvice.cpp : fix eServiceReference parsing.. servicemp3.cpp : streaming service is not seekable. --- lib/dvb/db.cpp | 5 ----- lib/service/service.cpp | 11 +++++++++-- lib/service/servicemp3.cpp | 2 ++ 3 files changed, 11 insertions(+), 7 deletions(-) mode change 100644 => 100755 lib/service/service.cpp diff --git a/lib/dvb/db.cpp b/lib/dvb/db.cpp index 0547407..f938cb1 100644 --- a/lib/dvb/db.cpp +++ b/lib/dvb/db.cpp @@ -651,11 +651,6 @@ void eDVBDB::loadBouquet(const char *path) { int offs = line[8] == ':' ? 10 : 9; eServiceReference tmp(line+offs); - if (tmp.type != eServiceReference::idDVB) - { - eDebug("only DVB Bouquets supported"); - continue; - } if ( tmp.flags&eServiceReference::canDescent ) { size_t pos = tmp.path.rfind('/'); diff --git a/lib/service/service.cpp b/lib/service/service.cpp old mode 100644 new mode 100755 index 11cf95b..77bfda9 --- a/lib/service/service.cpp +++ b/lib/service/service.cpp @@ -65,11 +65,18 @@ eServiceReference::eServiceReference(const std::string &string) if ( sscanf(c, "%d:%d:%x:%x:%x:%x:%n", &type, &flags, &data[0], &data[1], &data[2], &data[3], &pathl) < 2 ) type = idInvalid; } - if (pathl) { const char *pathstr = c+pathl; - const char *namestr = strchr(pathstr, ':'); + const char *namestr = NULL; + int found = strlen(pathstr)-1; + for(;found >= 0;found--) + { + if(pathstr[found] == ':') + break; + } + if (found != -1) + namestr = pathstr + found; if (namestr) { if (!strncmp(namestr, "://", 3)) // The path is a url (e.g. "http://...") diff --git a/lib/service/servicemp3.cpp b/lib/service/servicemp3.cpp index edcc42a..6aac29e 100644 --- a/lib/service/servicemp3.cpp +++ b/lib/service/servicemp3.cpp @@ -696,6 +696,8 @@ RESULT eServiceMP3::isCurrentlySeekable() return 0; if (m_state != stRunning) return 0; + if (m_sourceinfo.is_streaming) + return 0; g_object_get (G_OBJECT (m_gst_playbin), "video-sink", &sink, NULL); -- 2.7.4