Lines Matching defs:packet
142 int last_cc; /* last cc code (-1 if first packet) */
174 /** raw packet size, including FEC if present */
182 /** compute exact PCR for each transport stream packet */
194 /** packet containing Audio/Video data */
232 {"ts_packetsize", "output option carrying the raw packet size", offsetof(MpegTSContext, raw_packet_size), AV_OPT_TYPE_INT,
244 {"max_packet_size", "maximum size of emitted packet", offsetof(MpegTSContext, max_packet_size), AV_OPT_TYPE_INT,
258 { "compute_pcr", "compute exact PCR for each transport stream packet",
261 { "ts_packetsize", "output option carrying the raw packet size",
307 int64_t ts_packet_pos; /**< position of first TS packet of this PES packet */
491 av_log(NULL, AV_LOG_DEBUG, "cei found, packet start pos:%d\n", *cei_start_pos);
523 av_log(NULL, AV_LOG_DEBUG, "cei found, packet start pos:%d\n", *cei_start_pos);
556 av_log(NULL, AV_LOG_DEBUG, "cei found, packet start pos:%d\n", *cei_start_pos);
982 * no way we have to discard this packet */
1617 av_log(pes->stream, AV_LOG_WARNING, "PES packet size mismatch\n");
1629 /* store position of first TS packet of this PES packet */
1734 /* return non zero if a packet could be constructed */
1825 /* skip packet */
1879 /* Skip PES private data, program packet sequence counter and P-STD buffer */
1933 // and the pcr error to this packet should be no more than 100 ms.
1963 "non-trustworthy PES packet for PID %d as "
1987 // pes packet size is < ts size packet and pes data is padded with 0xff
2000 /* emit complete packets with known packet size
2368 * In case we receive an SCTE-35 packet before mpegts context is fully
3299 * In case we receive an EPG packet before mpegts context is fully
3397 const uint8_t *packet);
3399 /* handle one TS packet */
3400 static int handle_packet(MpegTSContext *ts, const uint8_t *packet, int64_t pos)
3407 pid = AV_RB16(packet + 1) & 0x1fff;
3408 is_start = packet[1] & 0x40;
3422 afc = (packet[3] >> 4) & 3;
3428 packet[4] != 0 && /* with length > 0 */
3429 (packet[5] & 0x80); /* and discontinuity indicated */
3432 cc = (packet[3] & 0xf);
3434 cc_ok = pid == 0x1FFF || // null packet PID
3450 if (packet[1] & 0x80) {
3458 p = packet + 4;
3462 if (parse_pcr(&pcr_h, &pcr_l, packet) == 0)
3467 /* if past the end of packet, ignore */
3468 p_end = packet + TS_PACKET_SIZE;
3519 // Note: The position here points actually behind the current packet.
3559 av_log(ts->stream, AV_LOG_WARNING, "changing packet size to %d\n", new_packet_size);
3583 /* check packet sync byte */
3585 /* find a new packet start */
3609 uint8_t packet[TS_PACKET_SIZE + AV_INPUT_BUFFER_PADDING_SIZE];
3636 memset(packet + TS_PACKET_SIZE, 0, AV_INPUT_BUFFER_PADDING_SIZE);
3647 ret = read_packet(s, packet, ts->raw_packet_size, &data);
3702 static int parse_pcr(int64_t *ppcr_high, int *ppcr_low, const uint8_t *packet)
3708 afc = (packet[3] >> 4) & 3;
3711 p = packet + 4;
3752 av_log(s, AV_LOG_WARNING, "Could not detect TS packet size, defaulting to non-FEC/DVHS\n");
3780 uint8_t packet[TS_PACKET_SIZE];
3797 ret = read_packet(s, packet, ts->raw_packet_size, &data);
3860 /* compute exact PCR for each packet */
4041 /* return the consumed length if a packet was output, or -1 if no
4042 * packet is output */