Like this is still complicated?
if (m_use_prefillbuffer) uri = g_strndup(filename, strlen(filename)-9); else uri = g_strdup_printf ("%s", filename);
Posted 20 November 2013 - 11:59
Like this is still complicated?
if (m_use_prefillbuffer) uri = g_strndup(filename, strlen(filename)-9); else uri = g_strdup_printf ("%s", filename);
Posted 20 November 2013 - 18:05
--- a/lib/service/servicemp3.cpp +++ b/lib/service/servicemp3.cpp @@ -438,7 +438,6 @@ eServiceMP3::eServiceMP3(eServiceReference ref) if ( m_sourceinfo.is_streaming ) { - uri = g_strdup_printf ("%s", filename); m_streamingsrc_timeout = eTimer::create(eApp);; CONNECT(m_streamingsrc_timeout->timeout, eServiceMP3::sourceTimeout); @@ -464,6 +463,15 @@ eServiceMP3::eServiceMP3(eServiceReference ref) } m_use_prefillbuffer = true; } + if (m_use_prefillbuffer) + { + // buffer=X should be last in the filename + uri = g_strndup(filename, strlen(filename)-9); + } + else + { + uri = g_strdup_printf ("%s", filename); + } } else if ( m_sourceinfo.containertype == ctCDA ) {
Posted 20 November 2013 - 18:18
http://rtmpdump.mplayerhq.hu/librtmp.3.html buffer=num Set buffer time to num milliseconds. The default is 30000.So most probably we need to find last " buffer=" and remove it.
Posted 20 November 2013 - 18:53
--- a/lib/service/servicemp3.cpp +++ b/lib/service/servicemp3.cpp @@ -438,7 +438,6 @@ eServiceMP3::eServiceMP3(eServiceReference ref) if ( m_sourceinfo.is_streaming ) { - uri = g_strdup_printf ("%s", filename); m_streamingsrc_timeout = eTimer::create(eApp);; CONNECT(m_streamingsrc_timeout->timeout, eServiceMP3::sourceTimeout); @@ -464,6 +463,16 @@ eServiceMP3::eServiceMP3(eServiceReference ref) } m_use_prefillbuffer = true; } + if (m_use_prefillbuffer) + { + size_t last = m_ref.path.rfind(" buffer="); + std::string tmpuri = m_ref.path.substr(0,last); + uri = g_strdup_printf ("%s", tmpuri.c_str()); + } + else + { + uri = g_strdup_printf ("%s", filename); + } } else if ( m_sourceinfo.containertype == ctCDA ) {0001-Don-t-send-buffer-flag-to-stream-server.patch.txt 1.26KB 1 downloads
--- a/lib/service/servicemp3.cpp +++ b/lib/service/servicemp3.cpp @@ -438,7 +438,6 @@ eServiceMP3::eServiceMP3(eServiceReference ref) if ( m_sourceinfo.is_streaming ) { - uri = g_strdup_printf ("%s", filename); m_streamingsrc_timeout = eTimer::create(eApp);; CONNECT(m_streamingsrc_timeout->timeout, eServiceMP3::sourceTimeout); @@ -464,6 +463,15 @@ eServiceMP3::eServiceMP3(eServiceReference ref) } m_use_prefillbuffer = true; } + if (m_use_prefillbuffer) + { + size_t last = m_ref.path.rfind(" buffer="); + uri = g_strndup(filename, last); + } + else + { + uri = g_strdup_printf ("%s", filename); + } } else if ( m_sourceinfo.containertype == ctCDA ) {0001-Don-t-send-buffer-flag-to-stream-server2.patch.txt 1.2KB 1 downloads
Edited by athoik, 20 November 2013 - 18:56.
Posted 21 November 2013 - 06:58
Posted 21 November 2013 - 09:41
Then you should strip space+buffer=X....
Or there should be another way found to forward the buffer setting.... There are a lot of zero's in the service reference.
Edited by littlesat, 21 November 2013 - 09:41.
WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W
Posted 21 November 2013 - 11:14
# REFTYPE:FLAGS:STYPE:SID:TSID:ONID:NS:PARENT_SID:PARENT_TSID:UNUSED # D D X X X X X X X X 4097:0:1:0:0:0:0:0:0:0:URL:NAME REFTYPE: 4097 FLAGS: 0 STYPE: 1 SID: 0 TSID: 0 ONID: 0 NS: 0 PARENT_SID: 0 PARENT_TSID: 0 UNUSED: 0
Edited by athoik, 21 November 2013 - 11:17.
Posted 21 November 2013 - 13:18
Edited by athoik, 21 November 2013 - 13:19.
Posted 21 November 2013 - 13:53
Posted 21 November 2013 - 17:24
--- a/lib/service/servicemp3.cpp +++ b/lib/service/servicemp3.cpp @@ -450,11 +450,13 @@ eServiceMP3::eServiceMP3(eServiceReference ref) if (m_useragent.empty()) m_useragent = "Enigma2 Mediaplayer"; m_extra_headers = eConfigManager::getConfigValue("config.mediaplayer.extraHeaders"); - if (strstr(filename, " buffer=1")) + + /* use service reference flag field as flag for buffering */ + if ( m_ref.flags == 1 ) { m_use_prefillbuffer = true; } - else if (strstr(filename, " buffer=2")) + else if ( m_ref.flags == 2 ) { /* progressive download buffering */ if (::access("/hdd/movie", X_OK) >= 0)
--- a/lib/service/servicemp3.cpp +++ b/lib/service/servicemp3.cpp @@ -450,11 +450,13 @@ eServiceMP3::eServiceMP3(eServiceReference ref) if (m_useragent.empty()) m_useragent = "Enigma2 Mediaplayer"; m_extra_headers = eConfigManager::getConfigValue("config.mediaplayer.extraHeaders"); - if (strstr(filename, " buffer=1")) + + /* use service reference unused field as flag for buffering */ + if ( m_ref.getData(7) == 1 ) { m_use_prefillbuffer = true; } - else if (strstr(filename, " buffer=2")) + else if ( m_ref.getData(7) == 2 ) { /* progressive download buffering */ if (::access("/hdd/movie", X_OK) >= 0)
Edited by athoik, 21 November 2013 - 17:26.
Posted 21 November 2013 - 18:41
Hi it seems that flags already used on channel list.
4097_0_1_0_0_0_0_0_0_1.jpg 39.23KB
50 downloads
When flag is odd (1,3,5,...) we get folder picture.
So i think we must use unused flag (or perform more changes )
0 members, 1 guests, 0 anonymous users