MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / request_frame

Function request_frame

libavfilter/qrencode.c:663–681  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

661}
662
663static int request_frame(AVFilterLink *outlink)
664{
665 AVFilterContext *ctx = (AVFilterContext *)outlink->src;
666 QREncodeContext *qr = ctx->priv;
667 AVFrame *frame =
668 ff_get_video_buffer(outlink, qr->rendered_padded_qrcode_width, qr->rendered_padded_qrcode_width);
669 int ret;
670
671 if (!frame)
672 return AVERROR(ENOMEM);
673 frame->sample_aspect_ratio = (AVRational) {1, 1};
674 V(n) = frame->pts = qr->pts++;
675 V(t) = qr->pts * av_q2d(outlink->time_base);
676
677 if ((ret = draw_qrcode(ctx, frame)) < 0)
678 return ret;
679
680 return ff_filter_frame(outlink, frame);
681}
682
683static int qrencodesrc_query_formats(const AVFilterContext *ctx,
684 AVFilterFormatsConfig **cfg_in,

Callers

nothing calls this directly

Calls 4

ff_get_video_bufferFunction · 0.85
av_q2dFunction · 0.85
draw_qrcodeFunction · 0.85
ff_filter_frameFunction · 0.85

Tested by

no test coverage detected