mirror of
				https://github.com/rofafor/vdr-plugin-satip.git
				synced 2023-10-10 11:37:42 +00:00 
			
		
		
		
	Added a quirk to avoid addpids/delpids in PLAY commands.
This commit is contained in:
		
							
								
								
									
										11
									
								
								server.c
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								server.c
									
									
									
									
									
								
							@@ -25,15 +25,19 @@ cSatipServer::cSatipServer(const char *addressP, const char *descriptionP, const
 | 
				
			|||||||
  memset(modelCountM, 0, sizeof(modelCountM));
 | 
					  memset(modelCountM, 0, sizeof(modelCountM));
 | 
				
			||||||
  if (isempty(*modelM))
 | 
					  if (isempty(*modelM))
 | 
				
			||||||
     modelM = "DVBS-1";
 | 
					     modelM = "DVBS-1";
 | 
				
			||||||
 | 
					  if (!isempty(*descriptionM)) {
 | 
				
			||||||
     // These devices contain a session id bug:
 | 
					     // These devices contain a session id bug:
 | 
				
			||||||
     // Inverto Airscreen Server IDL 400 ?
 | 
					     // Inverto Airscreen Server IDL 400 ?
 | 
				
			||||||
     // Telestar Digibit R1 ?
 | 
					     // Telestar Digibit R1 ?
 | 
				
			||||||
     // Elgato EyeTV Netstream 4Sat ?
 | 
					     // Elgato EyeTV Netstream 4Sat ?
 | 
				
			||||||
  if (!isempty(*descriptionM) &&
 | 
					     if (strstr(*descriptionM, "GSSBOX") ||             // Grundig Sat Systems GSS.box DSI 400
 | 
				
			||||||
      (strstr(*descriptionM, "GSSBOX") ||             // Grundig Sat Systems GSS.box DSI 400
 | 
					 | 
				
			||||||
         strstr(*descriptionM, "Triax SatIP Converter") // Triax TSS 400
 | 
					         strstr(*descriptionM, "Triax SatIP Converter") // Triax TSS 400
 | 
				
			||||||
     ))
 | 
					        )
 | 
				
			||||||
        quirkM |= eSatipQuirkSessionId;
 | 
					        quirkM |= eSatipQuirkSessionId;
 | 
				
			||||||
 | 
					     // These devices contain a play (*pids) parameter bug:
 | 
				
			||||||
 | 
					     if (strstr(*descriptionM, "fritzdvbc"))            // Fritz!WLAN Repeater DVB-C
 | 
				
			||||||
 | 
					        quirkM |= eSatipQuirkPlayPids;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
  char *s, *p = strdup(*modelM);
 | 
					  char *s, *p = strdup(*modelM);
 | 
				
			||||||
  char *r = strtok_r(p, ",", &s);
 | 
					  char *r = strtok_r(p, ",", &s);
 | 
				
			||||||
  while (r) {
 | 
					  while (r) {
 | 
				
			||||||
@@ -73,6 +77,7 @@ cSatipServer::cSatipServer(const char *addressP, const char *descriptionP, const
 | 
				
			|||||||
              modelCountM[eSatipModuleDVBC] = atoi(++c);
 | 
					              modelCountM[eSatipModuleDVBC] = atoi(++c);
 | 
				
			||||||
           else
 | 
					           else
 | 
				
			||||||
              modelCountM[eSatipModuleDVBC] = 1;
 | 
					              modelCountM[eSatipModuleDVBC] = 1;
 | 
				
			||||||
 | 
					           // Add model quirks here
 | 
				
			||||||
           }
 | 
					           }
 | 
				
			||||||
        r = strtok_r(NULL, ",", &s);
 | 
					        r = strtok_r(NULL, ",", &s);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										1
									
								
								server.h
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								server.h
									
									
									
									
									
								
							@@ -33,6 +33,7 @@ public:
 | 
				
			|||||||
  enum eSatipQuirk {
 | 
					  enum eSatipQuirk {
 | 
				
			||||||
    eSatipQuirkNone      = 0x00,
 | 
					    eSatipQuirkNone      = 0x00,
 | 
				
			||||||
    eSatipQuirkSessionId = 0x01,
 | 
					    eSatipQuirkSessionId = 0x01,
 | 
				
			||||||
 | 
					    eSatipQuirkPlayPids  = 0x02,
 | 
				
			||||||
    eSatipQuirkMask      = 0x0F
 | 
					    eSatipQuirkMask      = 0x0F
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
  enum eSatipModelType {
 | 
					  enum eSatipModelType {
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										2
									
								
								tuner.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								tuner.c
									
									
									
									
									
								
							@@ -459,7 +459,7 @@ bool cSatipTuner::UpdatePids(bool forceP)
 | 
				
			|||||||
      tunedM && handleM && !isempty(*streamAddrM) && (streamIdM > 0)) {
 | 
					      tunedM && handleM && !isempty(*streamAddrM) && (streamIdM > 0)) {
 | 
				
			||||||
     CURLcode res = CURLE_OK;
 | 
					     CURLcode res = CURLE_OK;
 | 
				
			||||||
     cString uri = cString::sprintf("rtsp://%s/stream=%d", *streamAddrM, streamIdM);
 | 
					     cString uri = cString::sprintf("rtsp://%s/stream=%d", *streamAddrM, streamIdM);
 | 
				
			||||||
     if (forceP) {
 | 
					     if (forceP || (currentServerM && currentServerM->Quirk(cSatipServer::eSatipQuirkPlayPids))) {
 | 
				
			||||||
        if (pidsM.Size()) {
 | 
					        if (pidsM.Size()) {
 | 
				
			||||||
           uri = cString::sprintf("%s?pids=", *uri);
 | 
					           uri = cString::sprintf("%s?pids=", *uri);
 | 
				
			||||||
           for (int i = 0; i < pidsM.Size(); ++i)
 | 
					           for (int i = 0; i < pidsM.Size(); ++i)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user