Diff for /multiplexer/splicets.c between versions 1.16 and 1.17

version 1.16, 2001/08/08 09:59:58 version 1.17, 2001/08/08 16:52:15
Line 430  static int make_patsection (int section, Line 430  static int make_patsection (int section,
 {  {
   int i;    int i;
   byte *d;    byte *d;
     prog_descr *p;
   d = dest;    d = dest;
   *d++ = TS_TABLEID_PAT;    *d++ = TS_TABLEID_PAT;
   d += 2;    d += 2;
Line 440  static int make_patsection (int section, Line 441  static int make_patsection (int section,
   *d++ = last_patsection;    *d++ = last_patsection;
   i = progs;    i = progs;
   while (--i >= 0) {    while (--i >= 0) {
     if (prog[i]->pat_section == section) {      p = prog[i];
       if (p->pat_section == section) {
       int x;        int x;
       x = prog[i]->program_number;        x = p->program_number;
       *d++ = (x >> 8);        *d++ = (x >> 8);
       *d++ = x;        *d++ = x;
       x = prog[i]->pmt_pid;        x = p->pmt_pid;
       *d++ = 0xE0 | (x >> 8);        *d++ = 0xE0 | (x >> 8);
       *d++ = x;        *d++ = x;
     }      }
Line 464  static int make_pmtsection (stream_descr Line 466  static int make_pmtsection (stream_descr
   int i;    int i;
   byte *d;    byte *d;
   stump_descr *st;    stump_descr *st;
     stream_descr *t;
   d = dest;    d = dest;
   *d++ = TS_TABLEID_PMT;    *d++ = TS_TABLEID_PMT;
   d += 2;    d += 2;
Line 489  static int make_pmtsection (stream_descr Line 492  static int make_pmtsection (stream_descr
   *d++ = i;    *d++ = i;
   d += 2;    d += 2;
   i = NUMBER_DESCR;    i = NUMBER_DESCR;
   while (--i > 0) {    while (--i >= 0) {
     byte *y;      byte *y;
     y = p->manudescr.refx[i];      y = p->manudescr.refx[i];
     if ((y == NULL)      if ((y == NULL)
Line 510  static int make_pmtsection (stream_descr Line 513  static int make_pmtsection (stream_descr
   dest[TS_PMT_PILEN+1] = i;    dest[TS_PMT_PILEN+1] = i;
   i = p->streams;    i = p->streams;
   while (--i >= 0) {    while (--i >= 0) {
     if (p->stream[i]->u.d.mention) {      t = p->stream[i];
       if (t->u.d.mention) {
       int x;        int x;
       byte *e;        byte *e;
       *d++ = p->stream[i]->stream_type;        *d++ = t->stream_type;
       x = p->stream[i]->u.d.pid;        x = t->u.d.pid;
       *d++ = 0xE0 | (x >> 8);        *d++ = 0xE0 | (x >> 8);
       *d++ = x;        *d++ = x;
       d += 2;        d += 2;
       e = d;        e = d;
       x = NUMBER_DESCR;        x = NUMBER_DESCR;
       while (--x > 0) {        while (--x >= 0) {
         byte *y;          byte *y;
         y = p->stream[i]->manudescr->refx[x];          y = t->manudescr->refx[x];
         if (y == NULL) {          if (y == NULL) {
           y = p->stream[i]->autodescr->refx[x];            y = t->autodescr->refx[x];
         }          }
         if (y != NULL) {          if (y != NULL) {
           int yl = y[1];            int yl = y[1];
Line 551  static int make_pmtsection (stream_descr Line 555  static int make_pmtsection (stream_descr
     d += 2;      d += 2;
     e = d;      e = d;
     x = NUMBER_DESCR;      x = NUMBER_DESCR;
     while (--x > 0) {      while (--x >= 0) {
       byte *y;        byte *y;
       y = st->manudescr.refx[x];        y = st->manudescr.refx[x];
       if (y != NULL) {        if (y != NULL) {
Line 835  static byte *procdata_syn_adaptfield (st Line 839  static byte *procdata_syn_adaptfield (st
       *d++ = adapt_flags1;        *d++ = adapt_flags1;
       if (adapt_flags1 & TS_ADAPT_PCRFLAG) {        if (adapt_flags1 & TS_ADAPT_PCRFLAG) {
         clockref pcr;          clockref pcr;
         msec2cref (&s->u.d.conv,c->msecpush + s->u.d.delta,&pcr);          msec2cref (&s->u.d.conv, c->msecpush + s->u.d.delta, &pcr);
         *d++ = (pcr.base >> 25) | (pcr.ba33 << 7);          *d++ = (pcr.base >> 25) | (pcr.ba33 << 7);
         *d++ = pcr.base >> 17;          *d++ = pcr.base >> 17;
         *d++ = pcr.base >> 9;          *d++ = pcr.base >> 9;
Line 943  static stream_descr *procdata_syn_payloa Line 947  static stream_descr *procdata_syn_payloa
 static void proc_unparsedsi (stream_descr *s,  static void proc_unparsedsi (stream_descr *s,
     byte *d)      byte *d)
 {  {
   warn (LINF,"Splice Unparsed SI",ETSC,10,s->streamdata,s->u.usi.delta);    warn (LINF,"Splice Unparsed SI",ETSC,10,s->sourceid,s->streamdata);
   warn (LDEB,"Splice Unparsed SI",ETSC,10,s->stream_id,s->sourceid);  
   memcpy (d,&s->data.ptr[s->ctrl.ptr[s->ctrl.out].index],TS_PACKET_SIZE);    memcpy (d,&s->data.ptr[s->ctrl.ptr[s->ctrl.out].index],TS_PACKET_SIZE);
                 /* check if ==  s->ctrl.ptr[s->ctrl.out].length); ? */                  /* check if ==  s->ctrl.ptr[s->ctrl.out].length); ? */
   list_incr (s->ctrl.out,s->ctrl,1);    list_incr (s->ctrl.out,s->ctrl,1);
Line 973  stream_descr *process_something (stream_ Line 976  stream_descr *process_something (stream_
     case sd_data:      case sd_data:
       c = &s->ctrl.ptr[s->ctrl.out];        c = &s->ctrl.ptr[s->ctrl.out];
       procdata_check_psi (&pid, &scramble, &size, s, c);        procdata_check_psi (&pid, &scramble, &size, s, c);
       d = output_pushdata (TS_PACKET_SIZE,c->msecpush + s->u.d.delta);        d = output_pushdata (TS_PACKET_SIZE, TRUE, c->msecpush + s->u.d.delta);
       if (d == NULL) {        if (d == NULL) {
         return (s);          return (s);
       }        }
Line 992  stream_descr *process_something (stream_ Line 995  stream_descr *process_something (stream_
       break;        break;
     case sd_unparsedsi:      case sd_unparsedsi:
       c = &s->ctrl.ptr[s->ctrl.out];        c = &s->ctrl.ptr[s->ctrl.out];
       d = output_pushdata (TS_PACKET_SIZE,c->msecpush + s->u.usi.delta);        d = output_pushdata (TS_PACKET_SIZE, FALSE, 0);
       if (d == NULL) {        if (d == NULL) {
         return (s);          return (s);
       }        }

Removed from v.1.16  
changed lines
  Added in v.1.17


LinuxTV legacy CVS <linuxtv.org/cvs>