angepasst. Damit kann man beim Start vorgeben, welche Audio-Streams er aufnehmen soll.
Einfach die Datei sserver.h.diff im source verzeichnis erstellen, den Text einfügen und die originale sserver.h patchen:
51a52
> char * b_arg[50];
54a56,57
> char a_apid2[20];
> char a_apid3[20];
58c61
< int i,n;
---
> int i,n,plen;
61a65,69
> int lang_de;
> int lang_en;
> int lang_ac3;
> int lang_de_both;
>
63,70c71,80
< a_arg[1] = "-p";
< a_arg[2] = a_vpid;
< a_arg[3] = a_apid;
< a_arg[4] = "-o";
< a_arg[5] = a_filename;
< a_arg[6] = "-host";
< a_arg[7] = a_host;
< a_arg[8] = "-nos";
---
> a_arg[1] = "-o";
> a_arg[2] = a_filename;
> a_arg[3] = "-host";
> a_arg[4] = a_host;
> a_arg[5] = "-nos";
> a_arg[6] = "-p";
> a_arg[7] = a_vpid;
> a_arg[8] = a_apid;
> a_arg[9] = a_apid2;
> a_arg[10] = a_apid3;
78a89,92
> lang_de = 0;
> lang_en = 0;
> lang_ac3 = 0;
>
82c96
< n = 9;
---
> n = 11;
105a120,131
> else if (!strcmp("-lang_de",argv)) {
> i++; if (i >= argc) { fprintf(stderr, "need 1/0 for -lang_de\n"); return -1; }
> lang_de = atoi(argv);
> }
> else if (!strcmp("-lang_en",argv)) {
> i++; if (i >= argc) { fprintf(stderr, "need 1/0 for -lang_en\n"); return -1; }
> lang_en = atoi(argv);
> }
> else if (!strcmp("-lang_ac3",argv)) {
> i++; if (i >= argc) { fprintf(stderr, "need 1/0 for -lang_ac3\n"); return -1; }
> lang_ac3 = atoi(argv);
> }
110a137
> lang_de_both = lang_de && lang_ac3;
161a189,249
> if((recdata.onidsid >= 8716464 && recdata.onidsid <= 8716465) || (recdata.onidsid >= 8716468 && recdata.onidsid <= 8716471))
> {
> recdata.apid2 = 1+recdata.apid;
> recdata.apid3 = 3+recdata.apid;
> } // neutrino workaround!!!
>
> /*
> fprintf(stderr, "pid1 %x\n", recdata.apid);
> fprintf(stderr, "pid2 %x\n", recdata.apid2);
> fprintf(stderr, "pid3 %x\n", recdata.apid3);
> fprintf(stderr, "de %x\n", lang_de);
> fprintf(stderr, "en %x\n", lang_en);
> fprintf(stderr, "ac3 %x\n", lang_ac3);
> */
> plen=8;
> if (recdata.apid2 - recdata.apid == 3){
> recdata.apid3 = recdata.apid2;
> recdata.apid2 = 0;
> }
>
> if ((lang_de || lang_ac3) == 1 && lang_en != 1){
> fprintf(stderr, "option 1");
> if (lang_ac3 == 1 && recdata.apid3 != 0){
> if (lang_de_both != 1){
> recdata.apid = recdata.apid3;
> plen = 8;
> }
> else{
> recdata.apid2 = recdata.apid3;
> plen = 9;
> }
> }
> }
> if ((lang_de || lang_ac3) != 1 && lang_en == 1){
> fprintf(stderr, "option 2");
> if (recdata.apid2 != 0){
> recdata.apid = recdata.apid2;
> plen = 8;
> }
> }
> if ((lang_de || lang_ac3) == 1 && lang_en == 1){
> fprintf(stderr, "option 3");
> if (lang_ac3 == 1 && recdata.apid3 != 0){
> if (lang_de_both == 1){
> plen = 10;
> }
> else{
> recdata.apid = recdata.apid3;
> plen = 8;
> }
> }
> if (recdata.apid2){
> if (plen == 8 && recdata.apid2 != 0){
> plen = 9;
> }
> else if (plen == 10 && recdata.apid2 == 0){
> recdata.apid2 = recdata.apid3;
> plen = 9;
> }
> }
> }
164,165c252,256
< fprintf(stderr, "APID : %x\n", recdata.apid);
< fprintf(stderr, "VPID : %x\n", recdata.vpid);
---
> fprintf(stderr, "APIDS : ");
> fprintf(stderr, "%x", recdata.apid);
> if (plen >= 9){ fprintf(stderr, ", %x", recdata.apid2);}
> if (plen == 10){ fprintf(stderr, ", %x", recdata.apid3);}
> fprintf(stderr, "\nVPID : %x\n", recdata.vpid);
170a262,264
> if(plen >= 9){ sprintf(a_apid2,"0x%03x",recdata.apid2);}
> if(plen == 10){ sprintf(a_apid3,"0x%03x",recdata.apid3);}
>
182c276
< p_act += strcspn(p_act, "/ \"%&-\t`' e!,:;");
---
> p_act += strcspn(p_act, "/ \"%&-\t`'Ž!,:;");
196c290
< p_act += strcspn(p_act, "/ \"%&-\t`'~<>!,:;?^°$\\=*#@¤|µöäüÖÄÜß");
---
> p_act += strcspn(p_act, "/ \"%&-\t`'~<>!,:;?^°$\\=*#@€|µöäüÖÄÜß");
221a316,318
> for (i = 0; i <= plen; i++) {
> b_arg = a_arg;
> }
223c320
< execvp(a_arg[0], a_arg);
---
> execvp(b_arg[0], b_arg);
302a400,403
> char *p4=NULL;
> char *p5=NULL;
> char *p6=NULL;
> char *p7=NULL;
305a407,408
> char szapid2[264]="";
> char szapid3[264]="";
315a419,420
> rdata->apid2=0;
> rdata->apid3=0;
412,418c517,530
< p2=ParseForString(szXML,"<audiopids selected=", 1);
< if (p2!=NULL)
< {
< p3=ExtractQuotedString(p2, szapid, 1);
< if (p3!=NULL)
< p1=ParseForString(p3,">", 1);
< }
---
> p2=ParseForString(szXML,"<audio pid=", 1);
> if (p2!=NULL){
> p3=ExtractQuotedString(p2, szapid, 1);
> if (p3!=NULL)
> p4=ParseForString(p3,"<audio pid=", 1);
> if (p4!=NULL)
> p5=ExtractQuotedString(p4, szapid2, 1);
> if (p5!=NULL)
> p6=ParseForString(p5,"<audio pid=", 1);
> if (p6!=NULL)
> p7=ExtractQuotedString(p6, szapid3, 1);
> if (p7!=NULL)
> p1=ParseForString(p7,"</audiopids>", 1);
> }
430c543,559
< rdata->apid=atoi(szapid);
---
> {
> hv = atoi(szapid);
> rdata->apid=hv;
> }
> else rdata->apid=0;
> if (strlen(szapid2)>0)
> {
> hv = atoi(szapid2);
> rdata->apid2=hv;
> }
> else rdata->apid2=0;
> if (strlen(szapid3)>0)
> {
> hv = atoi(szapid3);
> rdata->apid3=hv;
> }
> else rdata->apid3=0;