[SCM] Mumudvb packaging branch, upstream, updated. 24c2efb080b56abb8e7be67bae30ba7fe457759e

Brice DUBOST braice at braice.net
Sat Nov 1 13:31:06 UTC 2008


The following commit has been merged in the upstream branch:
commit 4e399d71538812b5522e0a8208c34f6061528f2b
Author: Brice DUBOST <braice at braice.net>
Date:   Sun Oct 26 18:44:12 2008 +0100

    New option, autoconf_ip_header

diff --git a/Changelog b/Changelog
index 6688c01..59cd4da 100644
--- a/Changelog
+++ b/Changelog
@@ -2,6 +2,7 @@
 
 New features : 
  * Option multicast_ttl to override default ttl
+ * Option autoconf_ip_header, to change the first part of ip adresses used by autoconfiguration
 	
 Bugs corrected : 
  * Better conformances to RFC for sap announces (this correct issues with VLC < 0.8.6f)
diff --git a/doc/README_CONF b/doc/README_CONF
index e5f0941..2851aa0 100644
--- a/doc/README_CONF
+++ b/doc/README_CONF
@@ -27,6 +27,7 @@ All parameters are in the form : name=value
 ||cam_support                    ||specify if we wants the support for scrambled channels ||
 ||cam_number                     ||the number of the CAM we want to use (default 0) ||
 ||autoconfiguration              ||autoconfiguration 1: find audio and video, 2: full autoconfiguration, see README ||
+||autoconf_ip_header             ||For full autoconfiguration, the first part of the ip for streamed channel : ip = header.card.channel Default : 239.100 ||
 ||sap                            ||generation of sap announces : 0 no, 1 yes ||
 ||sap_organisation               ||Organisation sent in the sap announces (optionnal, default : mumudvb) ||
 ||sap_sending_ip                 ||The sender Ip adress (optionnal, default : 0.0.0.0) ||
diff --git a/doc/README_CONF-fr b/doc/README_CONF-fr
index d9385cb..16b2f3b 100644
--- a/doc/README_CONF-fr
+++ b/doc/README_CONF-fr
@@ -26,6 +26,7 @@ Tous les param
 ||cam_support                    ||Spécifie si l'on veut le support pour les chaines cryptées ||
 ||cam_number                     ||Le numéro du module cam (défaut : 0) ||
 ||autoconfiguration              ||autoconfiguration 1: trouve les pids audio et video, 2: autoconfiguration complete, voir README-fr ||
+||autoconf_ip_header             ||Pour l'autoconfiguration complete, deux premiers chiffres de l'ip utilisée pour envoyer les chaines : ip = header.card.channel, Default : 239.100 ||
 ||sap                            ||Génération des annonces sap : 0 non, 1 oui ||
 ||sap_organisation               ||Organisation précisée dans les annonces sap (optionel, défaut : mumudvb) ||
 ||sap_sending_ip                 ||Adresse ip de l'émetteur (optionel, défaut : 0.0.0.0) ||
diff --git a/src/autoconf.c b/src/autoconf.c
index 18900b9..8d6d343 100644
--- a/src/autoconf.c
+++ b/src/autoconf.c
@@ -54,6 +54,8 @@ mumudvb_service_t *autoconf_find_service_for_modify(mumudvb_service_t *services,
 int pmt_find_descriptor(uint8_t tag, unsigned char *buf, int descriptors_loop_len);
 void pmt_print_descriptor_tags(unsigned char *buf, int descriptors_loop_len);
 
+extern char *autoconf_ip_header;
+
 /****************************************************************************/
 //Code from libdvb, strongly modified, with commentaries added
 //read the pmt for autoconfiguration
@@ -483,7 +485,7 @@ int services_to_channels(mumudvb_service_t *services, mumudvb_channel_t *channel
 	      channels[channel_number].num_pids=1;
 	      channels[channel_number].portOut=port;
 	      strcpy(channels[channel_number].name,actual_service->name);
-	      sprintf(ip,"239.100.%d.%d", card, channel_number);
+	      sprintf(ip,"%s.%d.%d", autoconf_ip_header, card, channel_number);
 	      strcpy(channels[channel_number].ipOut,ip);
 	      log_message(MSG_DEBUG,"Ip : \"%s\" port : %d\n",channels[channel_number].ipOut,port);
 
diff --git a/src/mumudvb.c b/src/mumudvb.c
index 5953693..107b19d 100644
--- a/src/mumudvb.c
+++ b/src/mumudvb.c
@@ -97,6 +97,7 @@ int autoconfiguration = 0;           //Do we use autoconfiguration ?
 // 0 : none (or autoconf finished)
 // 1 : we have the PMT pids and the channels, we search the audio and video
 // 2 : we have only the tuning parameters, we search the channels and their pmt pids
+char autoconf_ip_header[10]="239.100";
 
 long time_start_autoconfiguration=0; //When did we started autoconfiguration ?
 
@@ -389,6 +390,17 @@ main (int argc, char **argv)
 	      sap=1;
 	    }
 	}
+      else if (!strcmp (substring, "autoconf_ip_header"))
+	{
+	  substring = strtok (NULL, delimiteurs);
+	  if(strlen(substring)>7)
+	    {
+	      log_message( MSG_ERROR,
+			   "The sap sending ip is too long\n");
+	      exit(ERROR_CONF);
+	    }
+	  sscanf (substring, "%s\n", autoconf_ip_header);
+	}
       else if (!strcmp (substring, "sap"))
 	{
 	  substring = strtok (NULL, delimiteurs);

-- 
Mumudvb packaging



More information about the pkg-vdr-dvb-changes mailing list