Lines Matching defs:rdt
31 #include "rdt.h"
132 rdt_load_mdpr (PayloadContext *rdt, AVStream *st, int rule_nr)
152 if (!rdt->mlti_data)
154 ffio_init_context(&pb, rdt->mlti_data, rdt->mlti_data_size, 0,
176 size = rdt->mlti_data_size;
179 if (ff_rm_read_mdpr_codecdata(rdt->rmctx, &pb, st, rdt->rmst[st->index], size, NULL) < 0)
261 * [2] http://www.wireshark.org/docs/dfref/r/rdt.html and
262 * http://anonsvn.wireshark.org/viewvc/trunk/epan/dissectors/packet-rdt.c
294 rdt_parse_packet (AVFormatContext *ctx, PayloadContext *rdt, AVStream *st,
301 if (rdt->audio_pkt_cnt == 0) {
306 res = ff_rm_parse_packet (rdt->rmctx, &pb, st, rdt->rmst[st->index], len, pkt,
313 memcpy (rdt->buffer, buf + pos, len - pos);
314 rdt->rmctx->pb = avio_alloc_context (rdt->buffer, len - pos, 0,
321 rdt->audio_pkt_cnt =
322 ff_rm_retrieve_cache (rdt->rmctx, rdt->rmctx->pb,
323 st, rdt->rmst[st->index], pkt);
324 if (rdt->audio_pkt_cnt == 0 &&
326 av_freep(&rdt->rmctx->pb);
331 return rdt->audio_pkt_cnt > 0;
410 PayloadContext *rdt, const char *line)
416 rdt->mlti_data = rdt_parse_b64buf(&rdt->mlti_data_size, p);
426 if (rdt->nb_rmst < count) {
427 if ((err = av_reallocp(&rdt->rmst,
428 count * sizeof(*rdt->rmst))) < 0) {
429 rdt->nb_rmst = 0;
432 memset(rdt->rmst + rdt->nb_rmst, 0,
433 (count - rdt->nb_rmst) * sizeof(*rdt->rmst));
434 rdt->nb_rmst = count;
436 rdt->rmst[s->streams[n]->index] = ff_rm_alloc_rmstream();
437 rdt_load_mdpr(rdt, s->streams[n], (n - first) * 2);
525 PayloadContext *rdt = av_mallocz(sizeof(PayloadContext));
527 if (!rdt)
529 ret = avformat_open_input(&rdt->rmctx, "", &ff_rdt_demuxer, NULL);
531 av_free(rdt);
535 return rdt;
539 rdt_free_context (PayloadContext *rdt)
543 for (i = 0; i < rdt->nb_rmst; i++)
544 if (rdt->rmst[i]) {
545 ff_rm_free_rmstream(rdt->rmst[i]);
546 av_freep(&rdt->rmst[i]);
548 if (rdt->rmctx)
549 avformat_close_input(&rdt->rmctx);
550 av_freep(&rdt->mlti_data);
551 av_freep(&rdt->rmst);
552 av_free(rdt);