[SCM] Mumudvb packaging branch, upstream, updated. 24c2efb080b56abb8e7be67bae30ba7fe457759e
Brice DUBOST
braice at braice.net
Sat Nov 1 13:31:07 UTC 2008
The following commit has been merged in the upstream branch:
commit 22bdc95be0bd6e7b0fb303cb4c85fb138d8f515f
Author: Brice DUBOST <braice at braice.net>
Date: Sun Oct 26 20:55:06 2008 +0100
New option : sap_default_group
diff --git a/Changelog b/Changelog
index 59cd4da..038129d 100644
--- a/Changelog
+++ b/Changelog
@@ -3,6 +3,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
+ * Option sap_default_group
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 2851aa0..f209142 100644
--- a/doc/README_CONF
+++ b/doc/README_CONF
@@ -32,6 +32,7 @@ All parameters are in the form : name=value
||sap_organisation ||Organisation sent in the sap announces (optionnal, default : mumudvb) ||
||sap_sending_ip ||The sender Ip adress (optionnal, default : 0.0.0.0) ||
||sap_interval ||Interval in seconds between sap announces (optionnal, default : 5) ||
+||sap_default_group ||The default playlist group for sap announces (optionnal) ||
|| For DVB-T ||
||qam ||quadrature amplitude modulation, possible values : qpsk,16,32,64,128,256,auto ||
||trans_mode ||transmission mode, possible values : 2k,8k,auto ||
@@ -41,7 +42,7 @@ All parameters are in the form : name=value
||'''For each channel (this order is recommended : ip, port, ..., pids)'''||
||ip ||multicast (can also be unicast) ip where the chanel will be streamed ||
||port ||port (optionnal if common_port is used)||
-||sap_group ||The playlist group for sap announces (optionnal, only supported by VLC, as far as I know) ||
+||sap_group ||The playlist group for sap announces (optionnal) ||
||cam_pmt_pid ||(only for scrambled channels) the PMT PID for CAM support ||
||name ||the name given to the chanel in /var/run/mumudvb/chaines_diffusees%d (used to generate SAP announces) ||
||pids ||a pid list space separeted (any number, some pids are always sent (PAD EIT SDT TDT NIT) see README for more details) ||
diff --git a/doc/README_CONF-fr b/doc/README_CONF-fr
index 16b2f3b..8423cc9 100644
--- a/doc/README_CONF-fr
+++ b/doc/README_CONF-fr
@@ -31,6 +31,7 @@ Tous les param
||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) ||
||sap_interval ||Intervale en secondes entre les annonces sap (optionel, defaut : 5) ||
+||sap_group ||Le groupe sap par défaut pour la liste de lecture (optionnel) ||
||'''Pour la TNT''' ||
||qam ||la modulation en quadrature, valeurs possibles : qpsk,16,32,64,128,256,auto ||
||trans_mode ||le mode de transmission, valeurs possibles : 2k,8k,auto ||
@@ -41,7 +42,7 @@ Tous les param
||ip ||l'ip de multicast sur laquelle cette chaise sera diffusée ||
||port ||le port ||
||cam_pmt_pid ||(uniquement pour les chaines crypées) numéro du PID PMT ||
-||sap_group ||Le groupe sap pour la liste de lecture (optionnel, supporté seulement par VLC dans l'état actuel de mes connaissances) ||
+||sap_group ||Le groupe sap pour la liste de lecture (optionnel) ||
||name ||le nom donné à la chaîne dans les fichiers qui indique les chaînes diffusées actuellement (utilisé par les scripts en exemple pour générer les annonces SAP) ||
||pids ||une liste de pids séparés par des espaces (en nombre quelconque, certains pids sont toujours diffusés (PAT EIT SDT TDT NIT)) ||
diff --git a/doc/conf.example.autoconf1_test.conf b/doc/conf.example.autoconf1_test.conf
index 379ebbd..f1a883f 100644
--- a/doc/conf.example.autoconf1_test.conf
+++ b/doc/conf.example.autoconf1_test.conf
@@ -3,8 +3,6 @@ pol=v
srate=27500
card=0
autoconfiguration=1
-timeout_accord=20
-timeout_no_diff=60
ip=239.210.203.200
port=1234
name=rus sport planeta
diff --git a/doc/conf.example.autoconf2_test.conf b/doc/conf.example.autoconf2_test.conf
index 39ef977..9455b2c 100644
--- a/doc/conf.example.autoconf2_test.conf
+++ b/doc/conf.example.autoconf2_test.conf
@@ -2,3 +2,4 @@ freq=11137
pol=h
srate=27500
autoconfiguration=2
+sap_default_group=My channels
\ No newline at end of file
diff --git a/src/mumudvb.c b/src/mumudvb.c
index 107b19d..fee3d21 100644
--- a/src/mumudvb.c
+++ b/src/mumudvb.c
@@ -90,6 +90,7 @@ mumudvb_sap_message_t sap_messages[MAX_CHANNELS]; //the sap message... //TODO :
int sap=0; //do we send sap announces ?
int sap_interval=SAP_DEFAULT_INTERVAL;
char sap_sending_ip[20]="0.0.0.0";
+char sap_default_group[20]="";
//autoconfiguration
int autoconfiguration = 0; //Do we use autoconfiguration ?
@@ -508,6 +509,23 @@ main (int argc, char **argv)
}
sscanf (substring, "%s\n", channels[curr_channel].sap_group);
}
+ else if (!strcmp (substring, "sap_default_group"))
+ {
+ if (sap==0)
+ {
+ log_message( MSG_WARN,
+ "Warning : you have not activated sap, the sap group will not be taken in account\n");
+
+ }
+ substring = strtok (NULL, "=");
+ if(strlen(substring)>19)
+ {
+ log_message( MSG_ERROR,
+ "The sap default group is too long\n");
+ exit(ERROR_CONF);
+ }
+ sscanf (substring, "%s\n", sap_default_group);
+ }
else if (!strcmp (substring, "common_port"))
{
substring = strtok (NULL, delimiteurs);
diff --git a/src/sap.c b/src/sap.c
index 93be8a4..da53872 100644
--- a/src/sap.c
+++ b/src/sap.c
@@ -28,6 +28,7 @@
#include <string.h>
extern char sap_sending_ip[20];
+extern char sap_default_group[20];
extern int multicast_ttl;
@@ -174,9 +175,12 @@ int sap_add_program(mumudvb_channel_t channel, mumudvb_sap_message_t *sap_messag
memcpy(sap_message->buf + sap_message->len + payload_len, temp_string, strlen(temp_string));
payload_len+=strlen(temp_string);
- if(strlen(channel.sap_group))
+ if(strlen(channel.sap_group)||strlen(sap_default_group))
{
- sprintf(temp_string,"a=x-plgroup:%s\r\n", channel.sap_group);
+ if(strlen(channel.sap_group))
+ sprintf(temp_string,"a=x-plgroup:%s\r\n", channel.sap_group);
+ else
+ sprintf(temp_string,"a=x-plgroup:%s\r\n", sap_default_group);
if( (sap_message->len+payload_len+strlen(temp_string))>1024)
{
log_message(MSG_WARN,"Warning : SAP message too long for channel %s\n",channel.name);
--
Mumudvb packaging
More information about the pkg-vdr-dvb-changes
mailing list