satip-axe/patches/minisatip8-axe.patch

110 lines
3.6 KiB
Diff
Raw Normal View History

diff --git a/src/adapter.c b/src/adapter.c
index 0baf965..86e6da5 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -881,7 +881,6 @@ int tune(int aid, int sid)
{
adapter *ad = get_adapter(aid);
int rv = 0, flush_data = 0;
- SPid *p;
if (!ad)
return -400;
@@ -913,7 +912,7 @@ int tune(int aid, int sid)
}
}
#ifndef DISABLE_PMT
- p = find_pid(aid, 0);
+ SPid p = find_pid(aid, 0);
SPid *p_all = find_pid(aid, 8192);
if ((!p || p->flags == 3) && (!p_all || p_all->flags == 3)) // add pid 0 if not explicitly added
{
diff --git a/src/minisatip.c b/src/minisatip.c
index 5f369ff..d1594cc 100644
--- a/src/minisatip.c
+++ b/src/minisatip.c
@@ -112,6 +112,7 @@ int rtsp, http, si, si1, ssdp1;
#define SIGNALMULTIPLIER_OPT 'M'
#define DEVICEID_OPT 'D'
#define DEMUXDEV_OPT '1'
+#define TCPMAXPACK_OPT '2'
static const struct option long_options[] =
{
@@ -156,6 +157,7 @@ static const struct option long_options[] =
{"dmx-source", required_argument, NULL, '9'},
{"lnb", required_argument, NULL, 'L'},
{"xml", required_argument, NULL, 'X'},
+ {"tcp-max-pack", required_argument, NULL, '2'},
{"help", no_argument, NULL, 'h'},
{"version", no_argument, NULL, 'V'},
#ifdef AXE
@@ -276,6 +278,8 @@ Help\n\
* -B X : set the app socket write buffer to X KB. \n\
* eg: -B 10000 - to set the socket buffer to 10MB\n\
\n\
+* -2 --tcp-max-pack X : set the TCP data chunk size in MPEG-TS packets (188 bytes), default value is 42\n\
+\n\
* -d --diseqc ADAPTER1:COMMITTED1-UNCOMMITTED1[,ADAPTER2:COMMITTED2-UNCOMMITTED2[,...]\n\
\t* The first argument is the adapter number, second is the number of committed packets to send to a Diseqc 1.0 switch, third the number of uncommitted commands to sent to a Diseqc 1.1 switch\n\
\tThe higher number between the committed and uncommitted will be sent first.\n\
@@ -547,14 +551,14 @@ void set_options(int argc, char *argv[])
#endif
#ifdef AXE
opts.no_threads = 1;
- opts.document_root = "/usr/share/minisatip/html";
+ opts.document_root = "/usr/share/minisatip8/html";
#define AXE_OPTS "7:QW:8:A:"
#else
#define AXE_OPTS ""
#endif
- while ((opt = getopt_long(argc, argv, "fl:v:r:a:td:w:p:s:n:hB:b:H:m:p:e:x:u:j:o:gy:i:q:D:NVR:S:TX:Y:OL:EP:Z:0:F:M:1:" AXE_OPTS, long_options, NULL)) != -1)
+ while ((opt = getopt_long(argc, argv, "fl:v:r:a:td:w:p:s:n:hB:b:H:m:p:e:x:u:j:o:gy:i:q:D:NVR:S:TX:Y:OL:EP:Z:0:F:M:1:2:" AXE_OPTS, long_options, NULL)) != -1)
{
// printf("options %d %c %s\n",opt,opt,optarg);
switch (opt)
@@ -700,6 +704,15 @@ void set_options(int argc, char *argv[])
break;
}
+ case TCPMAXPACK_OPT:
+ {
+ opts.tcp_max_pack = atoi(optarg);
+ if (opts.tcp_max_pack < 7)
+ opts.tcp_max_pack = 7;
+ else if (opts.tcp_max_pack > 697)
+ opts.tcp_max_pack = 697;
+ }
+
case DVBS2_ADAPTERS_OPT:
{
sscanf(optarg, "%d:%d:%d", &opts.force_sadapter,
diff --git a/src/minisatip.h b/src/minisatip.h
index 3797f5a..3def916 100644
--- a/src/minisatip.h
+++ b/src/minisatip.h
@@ -9,7 +9,7 @@
#define VERSION_BUILD "15"
#define CC(a, b, c) #a b #c
-#define VERSION CC(0.7., VERSION_BUILD, )
+#define VERSION CC(0.7., VERSION_BUILD, -axe206)
void set_options(int argc, char *argv[]);
diff --git a/src/stream.c b/src/stream.c
index 879a788..f82a5e3 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -973,7 +973,7 @@ int process_dmx(sockets *s)
#endif
rlen = ad->rlen;
- int packet_no_sid = check_cc(ad);
+ const int packet_no_sid = 0 /* check_cc(ad) */;
if (ad->sid_cnt == 1 && ad->master_sid >= 0 && !packet_no_sid) // we have just 1 stream, do not check the pids, send everything to the destination
{