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

Function amf_frames_init

libavutil/hwcontext_amf.c:223–242  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

221}
222
223static int amf_frames_init(AVHWFramesContext *ctx)
224{
225 int i;
226
227 for (i = 0; i < FF_ARRAY_ELEMS(supported_formats); i++) {
228 if (ctx->sw_format == supported_formats[i])
229 break;
230 }
231 if (i == FF_ARRAY_ELEMS(supported_formats)) {
232 av_log(ctx, AV_LOG_ERROR, "Pixel format '%s' is not supported\n",
233 av_get_pix_fmt_name(ctx->sw_format));
234 return AVERROR(ENOSYS);
235 }
236
237 ffhwframesctx(ctx)->pool_internal =
238 av_buffer_pool_init2(sizeof(AMFSurface), ctx,
239 &amf_pool_alloc, NULL);
240
241 return 0;
242}
243
244
245static int amf_get_buffer(AVHWFramesContext *ctx, AVFrame *frame)

Callers

nothing calls this directly

Calls 4

av_logFunction · 0.85
av_get_pix_fmt_nameFunction · 0.85
ffhwframesctxFunction · 0.85
av_buffer_pool_init2Function · 0.85

Tested by

no test coverage detected