Lines Matching defs:pl_ctx

45 static void fill_parse_info_header(PayloadContext *pl_ctx, uint8_t *buf,
51 AV_WB32(&buf[9], pl_ctx->last_unit_size);
53 pl_ctx->last_unit_size = data_unit_size;
56 static int vc2hq_handle_sequence_header(PayloadContext *pl_ctx, AVStream *st, AVPacket *pkt,
65 fill_parse_info_header(pl_ctx, pkt->data, 0x00, size);
70 pl_ctx->seen_sequence_header = 1;
75 static int vc2hq_mark_end_of_sequence(PayloadContext *pl_ctx, AVStream *st, AVPacket *pkt)
84 fill_parse_info_header(pl_ctx, pkt->data, 0x10, size);
87 pl_ctx->seen_sequence_header = 0;
92 static int vc2hq_handle_frame_fragment(AVFormatContext *ctx, PayloadContext *pl_ctx, AVStream *st,
111 if (pl_ctx->buf && pl_ctx->frame_nr != pic_nr) {
113 ffio_free_dyn_buf(&pl_ctx->buf);
124 if (!pl_ctx->buf) {
126 res = avio_open_dyn_buf(&pl_ctx->buf);
131 res = avio_seek(pl_ctx->buf, DIRAC_DATA_UNIT_HEADER_SIZE + DIRAC_PIC_NR_SIZE, SEEK_SET);
135 pl_ctx->frame_nr = pic_nr;
136 pl_ctx->timestamp = *timestamp;
137 pl_ctx->frame_size = DIRAC_DATA_UNIT_HEADER_SIZE + DIRAC_PIC_NR_SIZE;
140 avio_write(pl_ctx->buf, buf + 16 /* skip pl header */, frag_len);
141 pl_ctx->frame_size += frag_len;
151 if (!pl_ctx->buf)
154 avio_write(pl_ctx->buf, buf + 20 /* skip pl header */, frag_len);
155 pl_ctx->frame_size += frag_len;
164 res = ff_rtp_finalize_packet(pkt, &pl_ctx->buf, st->index);
168 fill_parse_info_header(pl_ctx, pkt->data, DIRAC_PCODE_PICTURE_HQ, pl_ctx->frame_size);
169 AV_WB32(&pkt->data[13], pl_ctx->frame_nr);
171 pl_ctx->frame_size = 0;
176 static int vc2hq_handle_packet(AVFormatContext *ctx, PayloadContext *pl_ctx,
184 if (pl_ctx->buf && pl_ctx->timestamp != *timestamp) {
186 ffio_free_dyn_buf(&pl_ctx->buf);
187 pl_ctx->frame_size = 0;
199 if (pl_ctx->seen_sequence_header || parse_code == DIRAC_PCODE_SEQ_HEADER) {
203 res = vc2hq_handle_sequence_header(pl_ctx, st, pkt, buf + RTP_VC2HQ_PL_HEADER_SIZE, len - RTP_VC2HQ_PL_HEADER_SIZE);
207 res = vc2hq_mark_end_of_sequence(pl_ctx, st, pkt);
211 res = vc2hq_handle_frame_fragment(ctx, pl_ctx, st, pkt, timestamp, buf, len, flags);