Lines Matching refs:pcr
977 int64_t pcr = get_pcr(s->priv_data);
978 uint32_t tp_extra_header = pcr % 0x3fffffff;
1313 static void retransmit_si_info(AVFormatContext *s, int force_pat, int force_sdt, int force_nit, int64_t pcr)
1318 if ((pcr != AV_NOPTS_VALUE && ts->last_sdt_ts == AV_NOPTS_VALUE) ||
1319 (pcr != AV_NOPTS_VALUE && pcr - ts->last_sdt_ts >= ts->sdt_period) ||
1322 if (pcr != AV_NOPTS_VALUE)
1323 ts->last_sdt_ts = FFMAX(pcr, ts->last_sdt_ts);
1326 if ((pcr != AV_NOPTS_VALUE && ts->last_pat_ts == AV_NOPTS_VALUE) ||
1327 (pcr != AV_NOPTS_VALUE && pcr - ts->last_pat_ts >= ts->pat_period) ||
1329 if (pcr != AV_NOPTS_VALUE)
1330 ts->last_pat_ts = FFMAX(pcr, ts->last_pat_ts);
1335 if ((pcr != AV_NOPTS_VALUE && ts->last_nit_ts == AV_NOPTS_VALUE) ||
1336 (pcr != AV_NOPTS_VALUE && pcr - ts->last_nit_ts >= ts->nit_period) ||
1339 if (pcr != AV_NOPTS_VALUE)
1340 ts->last_nit_ts = FFMAX(pcr, ts->last_nit_ts);
1346 static int write_pcr_bits(uint8_t *buf, int64_t pcr)
1348 int64_t pcr_low = pcr % 300, pcr_high = pcr / 300;
1517 int64_t pcr = AV_NOPTS_VALUE;
1519 pcr = get_pcr(ts);
1521 pcr = (dts - delay) * 300;
1523 retransmit_si_info(s, force_pat, force_sdt, force_nit, pcr);
1531 pcr = get_pcr(ts);
1532 if (pcr >= ts->next_pcr) {
1536 * can insert the pcr into the payload later */
1541 if (pcr - ts_st2->last_pcr >= ts_st2->pcr_period) {
1542 ts_st2->last_pcr = FFMAX(pcr - ts_st2->pcr_period, ts_st2->last_pcr + ts_st2->pcr_period);
1545 pcr = get_pcr(ts);
1555 if (dts != AV_NOPTS_VALUE && (dts - pcr / 300) > delay) {
1556 /* pcr insert gets priority over null packet insert */
1564 } else if (ts_st->pcr_period && pcr != AV_NOPTS_VALUE) {
1565 if (pcr - ts_st->last_pcr >= ts_st->pcr_period && is_start) {
1566 ts_st->last_pcr = FFMAX(pcr - ts_st->pcr_period, ts_st->last_pcr + ts_st->pcr_period);
1599 // add 11, pcr references the last byte of program clock reference base
1600 if (dts != AV_NOPTS_VALUE && dts < pcr / 300)
1601 av_log(s, AV_LOG_WARNING, "dts < pcr, TS is invalid\n");
1602 extend_af(buf, write_pcr_bits(q, pcr));