mpegts elementary stream: remove pcr decoder - not used

This commit is contained in:
Jaroslav Kysela 2015-03-05 14:12:47 +01:00
parent 1ef7dae510
commit 2b6dd0f73d
3 changed files with 0 additions and 56 deletions

View file

@ -106,46 +106,6 @@ ts_recv_packet0
}
}
/**
* Recover PCR
*
* st->es_pcr_drift will increase if our (system clock) runs faster
* than the stream PCR
*/
static void
ts_process_pcr(mpegts_service_t *t, elementary_stream_t *st, int64_t pcr)
{
int64_t real, d;
if(st == NULL)
return;
real = getmonoclock();
if(st->es_pcr_real_last != PTS_UNSET) {
d = (real - st->es_pcr_real_last) - (pcr - st->es_pcr_last);
if(d < -90000LL || d > 90000LL) {
st->es_pcr_recovery_fails++;
if(st->es_pcr_recovery_fails > 10) {
st->es_pcr_recovery_fails = 0;
st->es_pcr_real_last = PTS_UNSET;
}
return;
}
st->es_pcr_recovery_fails = 0;
st->es_pcr_drift += d;
if(t->s_pcr_pid == st->es_pid) {
/* This is the registered PCR PID, adjust service PCR drift
via an IIR filter */
t->s_pcr_drift = (t->s_pcr_drift * 255 + st->es_pcr_drift) / 256;
}
}
st->es_pcr_last = pcr;
st->es_pcr_real_last = real;
}
/**
* Process service stream packets, extract PCR and optionally descramble
*/
@ -199,10 +159,6 @@ ts_recv_packet1
st = service_stream_find((service_t*)t, pid);
/* Extract PCR */
if (pcr != PTS_UNSET)
ts_process_pcr(t, st, pcr);
if((st == NULL) && (pid != t->s_pcr_pid) && !table) {
pthread_mutex_unlock(&t->s_stream_mutex);
return 0;

View file

@ -260,11 +260,6 @@ stream_init(elementary_stream_t *st)
st->es_curpts = PTS_UNSET;
st->es_prevdts = PTS_UNSET;
st->es_pcr_real_last = PTS_UNSET;
st->es_pcr_last = PTS_UNSET;
st->es_pcr_drift = 0;
st->es_pcr_recovery_fails = 0;
st->es_blank = 0;
}

View file

@ -64,13 +64,6 @@ typedef struct elementary_stream {
int es_peak_presentation_delay; /* Max seen diff. of DTS and PTS */
/* PCR recovery */
int es_pcr_recovery_fails;
int64_t es_pcr_real_last; /* realtime clock when we saw last PCR */
int64_t es_pcr_last; /* PCR clock when we saw last PCR */
int64_t es_pcr_drift;
/* For service stream packet reassembly */
sbuf_t es_buf;