mirror of
				https://github.com/rofafor/vdr-plugin-satip.git
				synced 2023-10-10 11:37:42 +00:00 
			
		
		
		
	Fixed model detection and OctopusNet DVB-C model quirks.
Added a session id quirk for GSSBOX.
This commit is contained in:
		
							
								
								
									
										5
									
								
								HISTORY
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								HISTORY
									
									
									
									
									
								
							| @@ -54,3 +54,8 @@ VDR Plugin 'satip' Revision History | ||||
| 2014-04-27: Version 0.3.1 | ||||
|  | ||||
| - Fixed the device discovery. | ||||
|  | ||||
| 2014-05-10: Version 0.3.2 | ||||
|  | ||||
| - Fixed model detection and OctopusNet DVB-C model quirks. | ||||
| - Added a session id quirk for GSSBOX. | ||||
|   | ||||
| @@ -5,10 +5,10 @@ | ||||
| # | ||||
| msgid "" | ||||
| msgstr "" | ||||
| "Project-Id-Version: vdr-satip 0.3.1\n" | ||||
| "Project-Id-Version: vdr-satip 0.3.2\n" | ||||
| "Report-Msgid-Bugs-To: <see README>\n" | ||||
| "POT-Creation-Date: 2014-04-27 04:27+0200\n" | ||||
| "PO-Revision-Date: 2014-04-27 04:27+0200\n" | ||||
| "POT-Creation-Date: 2014-05-10 05:10+0200\n" | ||||
| "PO-Revision-Date: 2014-05-10 05:10+0200\n" | ||||
| "Last-Translator: Gabriel Bonich <gbonich@gmail.com>\n" | ||||
| "Language-Team: Catalan <vdr@linuxtv.org>\n" | ||||
| "Language: ca\n" | ||||
|   | ||||
| @@ -5,10 +5,10 @@ | ||||
| # | ||||
| msgid "" | ||||
| msgstr "" | ||||
| "Project-Id-Version: vdr-satip 0.3.1\n" | ||||
| "Project-Id-Version: vdr-satip 0.3.2\n" | ||||
| "Report-Msgid-Bugs-To: <see README>\n" | ||||
| "POT-Creation-Date: 2014-04-27 04:27+0200\n" | ||||
| "PO-Revision-Date: 2014-04-27 04:27+0200\n" | ||||
| "POT-Creation-Date: 2014-05-10 05:10+0200\n" | ||||
| "PO-Revision-Date: 2014-05-10 05:10+0200\n" | ||||
| "Last-Translator: Frank Neumann <fnu@yavdr.org>\n" | ||||
| "Language-Team: German <vdr@linuxtv.org>\n" | ||||
| "Language: de\n" | ||||
|   | ||||
| @@ -5,10 +5,10 @@ | ||||
| # | ||||
| msgid "" | ||||
| msgstr "" | ||||
| "Project-Id-Version: vdr-satip 0.3.1\n" | ||||
| "Project-Id-Version: vdr-satip 0.3.2\n" | ||||
| "Report-Msgid-Bugs-To: <see README>\n" | ||||
| "POT-Creation-Date: 2014-04-27 04:27+0200\n" | ||||
| "PO-Revision-Date: 2014-04-27 04:27+0200\n" | ||||
| "POT-Creation-Date: 2014-05-10 05:10+0200\n" | ||||
| "PO-Revision-Date: 2014-05-10 05:10+0200\n" | ||||
| "Last-Translator: Gabriel Bonich <gbonich@gmail.com>\n" | ||||
| "Language-Team: Spanish <vdr@linuxtv.org>\n" | ||||
| "Language: es\n" | ||||
|   | ||||
| @@ -5,10 +5,10 @@ | ||||
| # | ||||
| msgid "" | ||||
| msgstr "" | ||||
| "Project-Id-Version: vdr-satip 0.3.1\n" | ||||
| "Project-Id-Version: vdr-satip 0.3.2\n" | ||||
| "Report-Msgid-Bugs-To: <see README>\n" | ||||
| "POT-Creation-Date: 2014-04-27 04:27+0200\n" | ||||
| "PO-Revision-Date: 2014-04-27 04:27+0200\n" | ||||
| "POT-Creation-Date: 2014-05-10 05:10+0200\n" | ||||
| "PO-Revision-Date: 2014-05-10 05:10+0200\n" | ||||
| "Last-Translator: Rolf Ahrenberg\n" | ||||
| "Language-Team: Finnish <vdr@linuxtv.org>\n" | ||||
| "Language: fi\n" | ||||
|   | ||||
							
								
								
									
										2
									
								
								satip.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								satip.c
									
									
									
									
									
								
							| @@ -25,7 +25,7 @@ | ||||
| #define GITVERSION "" | ||||
| #endif | ||||
|  | ||||
|        const char VERSION[]     = "0.3.1" GITVERSION; | ||||
|        const char VERSION[]     = "0.3.2" GITVERSION; | ||||
| static const char DESCRIPTION[] = trNOOP("SAT>IP Devices"); | ||||
|  | ||||
| class cPluginSatip : public cPlugin { | ||||
|   | ||||
							
								
								
									
										10
									
								
								server.c
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								server.c
									
									
									
									
									
								
							| @@ -16,7 +16,8 @@ cSatipServer::cSatipServer(const char *addressP, const char *descriptionP, const | ||||
| : addressM(addressP), | ||||
|   descriptionM(descriptionP), | ||||
|   modelM(modelP), | ||||
|   modelTypeM(eSatipModelTypeMask), | ||||
|   modelTypeM(eSatipModelTypeNone), | ||||
|   quirkM(eSatipQuirkNone), | ||||
|   useCountM(0), | ||||
|   createdM(time(NULL)), | ||||
|   lastSeenM(0) | ||||
| @@ -24,6 +25,9 @@ cSatipServer::cSatipServer(const char *addressP, const char *descriptionP, const | ||||
|   memset(modelCountM, 0, sizeof(modelCountM)); | ||||
|   if (isempty(*modelM)) | ||||
|      modelM = "DVBS-1"; | ||||
|   // Grundig Sat Systems GSS.box DSI 400 has a session id bug | ||||
|   if (strstr(*descriptionM, "GSSBOX")) | ||||
|      quirkM |= eSatipQuirkSessionId; | ||||
|   char *s, *p = strdup(*modelM); | ||||
|   char *r = strtok_r(p, ",", &s); | ||||
|   while (r) { | ||||
| @@ -41,7 +45,7 @@ cSatipServer::cSatipServer(const char *addressP, const char *descriptionP, const | ||||
|            else | ||||
|               modelCountM[eSatipModuleDVBT2] = 1; | ||||
|            // Add model quirks here | ||||
|            if (strstr(*addressM, "OctopusNet")) | ||||
|            if (strstr(*descriptionM, "OctopusNet")) | ||||
|               modelTypeM |= cSatipServer::eSatipModelTypeDVBC; | ||||
|            } | ||||
|         if (strstr(r, "DVBT")) { | ||||
| @@ -51,7 +55,7 @@ cSatipServer::cSatipServer(const char *addressP, const char *descriptionP, const | ||||
|            else | ||||
|               modelCountM[eSatipModuleDVBT] = 1; | ||||
|            // Add model quirks here | ||||
|            if (strstr(*addressM, "OctopusNet")) | ||||
|            if (strstr(*descriptionM, "OctopusNet")) | ||||
|               modelTypeM |= cSatipServer::eSatipModelTypeDVBC; | ||||
|            } | ||||
|         r = strtok_r(NULL, ",", &s); | ||||
|   | ||||
							
								
								
									
										8
									
								
								server.h
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								server.h
									
									
									
									
									
								
							| @@ -23,12 +23,19 @@ private: | ||||
|   cString modelM; | ||||
|   int modelCountM[eSatipModuleCount]; | ||||
|   int modelTypeM; | ||||
|   int quirkM; | ||||
|   int useCountM; | ||||
|   time_t createdM; | ||||
|   cTimeMs lastSeenM; | ||||
|  | ||||
| public: | ||||
|   enum eSatipQuirk { | ||||
|     eSatipQuirkNone      = 0x00, | ||||
|     eSatipQuirkSessionId = 0x01, | ||||
|     eSatipQuirkMask      = 0x0F | ||||
|   }; | ||||
|   enum eSatipModelType { | ||||
|     eSatipModelTypeNone  = 0x00, | ||||
|     eSatipModelTypeDVBS2 = 0x01, | ||||
|     eSatipModelTypeDVBT  = 0x02, | ||||
|     eSatipModelTypeDVBT2 = 0x04, | ||||
| @@ -43,6 +50,7 @@ public: | ||||
|   const char *Description() { return *descriptionM; } | ||||
|   const char *Address()     { return *addressM; } | ||||
|   const char *Model(void)   { return modelM; } | ||||
|   bool Quirk(int quirkP)    { return ((quirkP & eSatipQuirkMask) & quirkM); } | ||||
|   int ModelType(void)       { return modelTypeM; } | ||||
|   bool Match(int modelP)    { return ((modelP & eSatipModelTypeMask) & modelTypeM); } | ||||
|   int Cable()               { return Match(eSatipModelTypeDVBC)  ? (Match(eSatipModelTypeDVBT2) ? modelCountM[eSatipModuleDVBT2] : modelCountM[eSatipModuleDVBT]) : 0; } // an ugly hack | ||||
|   | ||||
							
								
								
									
										5
									
								
								tuner.c
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								tuner.c
									
									
									
									
									
								
							| @@ -240,7 +240,10 @@ bool cSatipTuner::Connect(void) | ||||
|      // Session id is now known - disable header parsing | ||||
|      SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_HEADERFUNCTION, NULL); | ||||
|      SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_WRITEHEADER, NULL); | ||||
|      //SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_RTSP_SESSION_ID, *sessionM); | ||||
|      if (nextServerM && nextServerM->Quirk(cSatipServer::eSatipQuirkSessionId) && startswith(*sessionM, "0")) { | ||||
|         debug("cSatipTuner::%s(): session id quirk [device %d]", __FUNCTION__, deviceM->GetId()); | ||||
|         SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_RTSP_SESSION_ID, *sessionM + 1); | ||||
|         } | ||||
|      if (!ValidateLatestResponse()) | ||||
|         return false; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user