Lines Matching defs:pkt

92     int (*header_info) (AVFormatContext *s, AVPacket *pkt);
110 static int spdif_header_ac3(AVFormatContext *s, AVPacket *pkt)
113 int bitstream_mode = pkt->data[5] & 0x7;
120 static int spdif_header_eac3(AVFormatContext *s, AVPacket *pkt)
127 int bsid = pkt->data[5] >> 3;
128 if (bsid > 10 && (pkt->data[4] & 0xc0) != 0xc0) /* fscod */
129 repeat = eac3_repeat[(pkt->data[4] & 0x30) >> 4]; /* numblkscod */
131 tmp = av_fast_realloc(ctx->hd_buf[0], &ctx->hd_buf_size, ctx->hd_buf_filled + pkt->size);
136 memcpy(&ctx->hd_buf[0][ctx->hd_buf_filled], pkt->data, pkt->size);
138 ctx->hd_buf_filled += pkt->size;
174 static int spdif_header_dts4(AVFormatContext *s, AVPacket *pkt, int core_size,
179 int pkt_size = pkt->size;
246 memcpy(ctx->hd_buf[0] + sizeof(dtshd_start_code) + 2, pkt->data, pkt_size);
251 static int spdif_header_dts(AVFormatContext *s, AVPacket *pkt)
254 uint32_t syncword_dts = AV_RB32(pkt->data);
259 if (pkt->size < 9)
264 blocks = (AV_RB16(pkt->data + 4) >> 2) & 0x7f;
265 core_size = ((AV_RB24(pkt->data + 5) >> 4) & 0x3fff) + 1;
266 sample_rate = ff_dca_sample_rates[(pkt->data[8] >> 2) & 0x0f];
269 blocks = (AV_RL16(pkt->data + 4) >> 2) & 0x7f;
274 (((pkt->data[5] & 0x07) << 4) | ((pkt->data[6] & 0x3f) >> 2));
278 (((pkt->data[4] & 0x07) << 4) | ((pkt->data[7] & 0x3f) >> 2));
295 return spdif_header_dts4(s, pkt, core_size, sample_rate, blocks);
308 if (core_size && core_size < pkt->size) {
334 static int spdif_header_mpeg(AVFormatContext *s, AVPacket *pkt)
337 int version = (pkt->data[1] >> 3) & 3;
338 int layer = 3 - ((pkt->data[1] >> 1) & 3);
339 int extension = pkt->data[2] & 1;
357 static int spdif_header_aac(AVFormatContext *s, AVPacket *pkt)
364 ret = av_adts_header_parse(pkt->data, &samples, &frames);
421 static int spdif_header_truehd(AVFormatContext *s, AVPacket *pkt)
428 int total_frame_size = pkt->size;
429 const uint8_t *dataptr = pkt->data;
430 int data_remaining = pkt->size;
434 if (pkt->size < 10)
437 if (AV_RB24(pkt->data + 4) == 0xf8726f) {
439 if (pkt->data[7] == 0xba)
440 ratebits = pkt->data[8] >> 4;
441 else if (pkt->data[7] == 0xbb)
442 ratebits = pkt->data[9] >> 4;
454 input_timing = AV_RB16(pkt->data + 2);
624 static int spdif_write_packet(struct AVFormatContext *s, AVPacket *pkt)
629 ctx->out_buf = pkt->data;
630 ctx->out_bytes = pkt->size;
631 ctx->length_code = FFALIGN(pkt->size, 2) << 3;
635 ret = ctx->header_info(s, pkt);