Jump to content


Photo

DMM 3.2.0 IPTV in Bouquets - OpenPLI added this already?


  • Please log in to reply
311 replies to this topic

Re: DMM 3.2.0 IPTV in Bouquets - OpenPLI added this already? #261 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

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);

Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: DMM 3.2.0 IPTV in Bouquets - OpenPLI added this already? #262 adri

  • Senior Member
  • 373 posts

+5
Neutral

Posted 20 November 2013 - 13:19

Are we assuming the 'buffer=1' parameter is always the last parameter in the Uri?



Re: DMM 3.2.0 IPTV in Bouquets - OpenPLI added this already? #263 pieterg

  • PLi® Core member
  • 32,766 posts

+245
Excellent

Posted 20 November 2013 - 15:05

if indeed the full url is used by gstreamer, athoik is correct, we should remove it.

Re: DMM 3.2.0 IPTV in Bouquets - OpenPLI added this already? #264 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 20 November 2013 - 18:05

Here is the patch described on post #261.
--- 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 )
 	{

Attached Files


Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: DMM 3.2.0 IPTV in Bouquets - OpenPLI added this already? #265 pieterg

  • PLi® Core member
  • 32,766 posts

+245
Excellent

Posted 20 November 2013 - 18:08

I'd prefer to drop everything starting from " buffer=", instead of using a hardcoded length of 9, from the end of the string.

Re: DMM 3.2.0 IPTV in Bouquets - OpenPLI added this already? #266 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 20 November 2013 - 18:18

Droping everything starting from buffer= will cause problems (at least) to librtmp.
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.
Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: DMM 3.2.0 IPTV in Bouquets - OpenPLI added this already? #267 pieterg

  • PLi® Core member
  • 32,766 posts

+245
Excellent

Posted 20 November 2013 - 18:21

Then we should use a different token, for our own buffer setting

Re: DMM 3.2.0 IPTV in Bouquets - OpenPLI added this already? #268 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 20 November 2013 - 18:53

This removes last occurrence of " buffer=X" so there is no need break existing behaviour.
--- 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 )
 	{
Attached File  0001-Don-t-send-buffer-flag-to-stream-server.patch.txt   1.26KB   1 downloads

Or this one:
--- 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 )
 	{
Attached File  0001-Don-t-send-buffer-flag-to-stream-server2.patch.txt   1.2KB   1 downloads

Edited by athoik, 20 November 2013 - 18:56.

Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: DMM 3.2.0 IPTV in Bouquets - OpenPLI added this already? #269 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 21 November 2013 - 06:58

Hi,

Removing the last occurance of buffer is not ok?

We can change buffer to ebuffer in order not to mess with librtmp.

I can provide a patch based on one of the above. If above patch is complicated, please do it as you like.
Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: DMM 3.2.0 IPTV in Bouquets - OpenPLI added this already? #270 littlesat

  • PLi® Core member
  • 57,182 posts

+699
Excellent

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


Re: DMM 3.2.0 IPTV in Bouquets - OpenPLI added this already? #271 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 21 November 2013 - 11:14

Yes using service reference makes sence.
 
 
#        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
 
I think we can use flags. I don't know if we are using it. There is no documentation :(

When 4097:0: it will use no cache
When 4097:1: it will use memory caching
When 4097:2: it will use disk caching

Is this ok? Can we procced with the patch?

Patch will check strstr("4097:X:") instead of strstr(" buffer=X")

Edited by athoik, 21 November 2013 - 11:17.

Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: DMM 3.2.0 IPTV in Bouquets - OpenPLI added this already? #272 pieterg

  • PLi® Core member
  • 32,766 posts

+245
Excellent

Posted 21 November 2013 - 11:48

Patch will check strstr("4097:X:") instead of strstr(" buffer=X")

I think the servicetype should be ignored in the check. (that might change in the future)

Re: DMM 3.2.0 IPTV in Bouquets - OpenPLI added this already? #273 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 21 November 2013 - 13:18

So just check m_ref.flags == 1 or m_ref.flags == 2! (this is really non complicated!!)

m_ref is eServiceReference and flags contains the value we define on FLAGS right?

Edited by athoik, 21 November 2013 - 13:19.

Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: DMM 3.2.0 IPTV in Bouquets - OpenPLI added this already? #274 littlesat

  • PLi® Core member
  • 57,182 posts

+699
Excellent

Posted 21 November 2013 - 13:36

I suggest pieterg means that when you go that way, then do not use a defined flag, but use e.g. the unused flag.


WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: DMM 3.2.0 IPTV in Bouquets - OpenPLI added this already? #275 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 21 November 2013 - 13:53

Then we need just to use m_ref.getData(7) == X right?

Both ways are great! Much better than buffer=X
Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: DMM 3.2.0 IPTV in Bouquets - OpenPLI added this already? #276 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 21 November 2013 - 17:24

Here are the patches, using flags or unused field.

1. Using service reference flags field
 
--- 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)
 
Attached File  0001-Use-service-reference-flag-field-for-buffer-indicato.patch.txt   1.28KB   3 downloads
 
2. Using service reference unused field
 
--- 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)
 
Attached File  0001-Use-service-reference-unused-field-for-buffer-indica.patch.txt   1.31KB   3 downloads
 
They are compiling fine (i hope that i made the correct usage of service reference).

Thanks littlesat for pointing to the right direction, when you where saying it's compicated i tought you where mentioning the two lines code as complicated.

Using service reference it's much better, it's how it should be ;)

Edited by athoik, 21 November 2013 - 17:26.

Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: DMM 3.2.0 IPTV in Bouquets - OpenPLI added this already? #277 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 21 November 2013 - 18:41

Hi it seems that flags already used on channel list.


Attached File  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 :P)


Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: DMM 3.2.0 IPTV in Bouquets - OpenPLI added this already? #278 pieterg

  • PLi® Core member
  • 32,766 posts

+245
Excellent

Posted 21 November 2013 - 20:02

And we should use some defines, which can serve as 'documentation'

Re: DMM 3.2.0 IPTV in Bouquets - OpenPLI added this already? #279 littlesat

  • PLi® Core member
  • 57,182 posts

+699
Excellent

Posted 21 November 2013 - 20:03

Crasy....
And using an undefined one is also not recommendable...

Edited by littlesat, 21 November 2013 - 20:20.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: DMM 3.2.0 IPTV in Bouquets - OpenPLI added this already? #280 pieterg

  • PLi® Core member
  • 32,766 posts

+245
Excellent

Posted 21 November 2013 - 20:06

What do you mean?


3 user(s) are reading this topic

0 members, 3 guests, 0 anonymous users