version 1.1, 2001/03/19 20:52:34
|
version 1.2, 2001/03/29 13:27:43
|
Line 99 static int findapid (stream_descr *s)
|
Line 99 static int findapid (stream_descr *s)
|
{ |
{ |
boolean ok = TRUE; |
boolean ok = TRUE; |
do { |
do { |
if ((nextpid < TS_PID_LOWEST) || (nextpid >= TS_PID_HIGHEST)) { |
if ((nextpid < TS_PID_SPLICELO) || (nextpid >= TS_PID_SPLICEHI)) { |
if (!ok) { |
if (!ok) { |
warn (LERR,"No PID found",ETSC,2,1,0); |
warn (LERR,"No PID found",ETSC,2,1,0); |
return (0); |
return (0); |
} |
} |
ok = FALSE; |
ok = FALSE; |
nextpid = TS_PID_LOWEST; |
nextpid = TS_PID_SPLICELO; |
} else { |
} else { |
nextpid += 1; |
nextpid += 1; |
} |
} |
Line 128 prog_descr *splice_openprog (int program
|
Line 128 prog_descr *splice_openprog (int program
|
p->program_number = programnb; |
p->program_number = programnb; |
p->pcr_pid = -1; |
p->pcr_pid = -1; |
p->pmt_pid = pid; |
p->pmt_pid = pid; |
p->map_sequence = -1; |
|
p->pmt_conticnt = 0; |
p->pmt_conticnt = 0; |
p->pmt_version = 0; |
p->pmt_version = 0; |
p->changed = TRUE; |
p->changed = TRUE; |
Line 435 stream_descr *process_something (stream_
|
Line 434 stream_descr *process_something (stream_
|
k = c->length; |
k = c->length; |
} |
} |
} |
} |
d = output_pushdata (TS_PACKET_SIZE,c->time.push + s->u.d.delta); |
d = output_pushdata (TS_PACKET_SIZE,c->msecpush + s->u.d.delta); |
if (d == NULL) { |
if (d == NULL) { |
return (s); |
return (s); |
} |
} |
Line 457 stream_descr *process_something (stream_
|
Line 456 stream_descr *process_something (stream_
|
if ((psi_size <= 0) |
if ((psi_size <= 0) |
&& (s->u.d.has_clockref) |
&& (s->u.d.has_clockref) |
&& ((c->pcr.valid) |
&& ((c->pcr.valid) |
|| (s->u.d.next_clockref - (c->time.push + s->u.d.delta) <= 0))) { |
|| (s->u.d.next_clockref - (c->msecpush + s->u.d.delta) <= 0))) { |
/* |
|
fprintf (stderr,"n=%10d, p=%10d, (now %10d)\n", |
|
s->u.d.next_clockref, |
|
c->time.push + s->delta, |
|
msec_now ()); |
|
*/ |
|
adapt_flags1 |= TS_ADAPT_PCRFLAG; |
adapt_flags1 |= TS_ADAPT_PCRFLAG; |
f -= 6; |
f -= 6; |
} |
} |
Line 539 msec_now ());
|
Line 532 msec_now ());
|
*d++ = adapt_flags1; |
*d++ = adapt_flags1; |
if (adapt_flags1 & TS_ADAPT_PCRFLAG) { |
if (adapt_flags1 & TS_ADAPT_PCRFLAG) { |
clockref pcr; |
clockref pcr; |
msec2clockref (c->time.push + s->u.d.delta,pcr); |
/* |
|
msec2clockref (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 547 msec_now ());
|
Line 543 msec_now ());
|
*d++ = (pcr.base << 7) | (pcr.ext >> 8) | 0x7E; |
*d++ = (pcr.base << 7) | (pcr.ext >> 8) | 0x7E; |
*d++ = pcr.ext; |
*d++ = pcr.ext; |
s->u.d.next_clockref = |
s->u.d.next_clockref = |
(c->time.push + s->u.d.delta) + MAX_MSEC_PCRDIST * 8/10; |
(c->msecpush + s->u.d.delta) + MAX_MSEC_PCRDIST; |
c->pcr.valid = FALSE; |
c->pcr.valid = FALSE; |
} |
} |
if (adapt_flags1 & TS_ADAPT_OPCRFLAG) { |
if (adapt_flags1 & TS_ADAPT_OPCRFLAG) { |