Lines Matching defs:packet
88 int last_cc; /* last cc code (-1 if first packet) */
111 /** raw packet size, including FEC if present */
123 /** compute exact PCR for each transport stream packet */
135 /** packet containing Audio/Video data */
157 { "compute_pcr", "Compute exact PCR for each transport stream packet.",
160 { "ts_packetsize", "Output option carrying the raw packet size.",
177 {"ts_packetsize", "Output option carrying the raw packet size.", offsetof(MpegTSContext, raw_packet_size), AV_OPT_TYPE_INT,
224 int64_t ts_packet_pos; /**< position of first TS packet of this PES packet */
337 * no way we have to discard this packet */
820 av_log(pes->stream, AV_LOG_WARNING, "PES packet size mismatch\n");
832 /* store position of first TS packet of this PES packet */
914 /* return non zero if a packet could be constructed */
1006 /* skip packet */
1060 /* Skip PES private data, program packet sequence counter and P-STD buffer */
1110 // and the pcr error to this packet should be no more than 100 ms.
1141 // pes packet size is < ts size packet and pes data is padded with 0xff
1147 /* emit complete packets with known packet size
2027 const uint8_t *packet);
2029 /* handle one TS packet */
2030 static int handle_packet(MpegTSContext *ts, const uint8_t *packet)
2038 pid = AV_RB16(packet + 1) & 0x1fff;
2041 is_start = packet[1] & 0x40;
2051 afc = (packet[3] >> 4) & 3;
2057 packet[4] != 0 && /* with length > 0 */
2058 (packet[5] & 0x80); /* and discontinuity indicated */
2061 cc = (packet[3] & 0xf);
2063 cc_ok = pid == 0x1FFF || // null packet PID
2081 p = packet + 4;
2086 /* if past the end of packet, ignore */
2087 p_end = packet + TS_PACKET_SIZE;
2143 if (parse_pcr(&pcr_h, &pcr_l, packet) == 0)
2145 // Note: The position here points actually behind the current packet.
2181 av_log(ts->stream, AV_LOG_WARNING, "changing packet size to %d\n", newsize);
2223 /* check packet sync byte */
2225 /* find a new packet start */
2251 uint8_t packet[TS_PACKET_SIZE + FF_INPUT_BUFFER_PADDING_SIZE];
2275 memset(packet + TS_PACKET_SIZE, 0, FF_INPUT_BUFFER_PADDING_SIZE);
2286 ret = read_packet(s, packet, ts->raw_packet_size, &data);
2334 static int parse_pcr(int64_t *ppcr_high, int *ppcr_low, const uint8_t *packet)
2340 afc = (packet[3] >> 4) & 3;
2343 p = packet + 4;
2379 /* read the first 8192 bytes to get packet size */
2384 av_log(s, AV_LOG_WARNING, "Could not detect TS packet size, defaulting to non-FEC/DVHS\n");
2413 uint8_t packet[TS_PACKET_SIZE];
2430 ret = read_packet(s, packet, ts->raw_packet_size, &data);
2487 /* compute exact PCR for each packet */
2647 /* return the consumed length if a packet was output, or -1 if no
2648 * packet is output */