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

Function opencl_frames_init_command_queue

libavutil/hwcontext_opencl.c:1706–1723  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1704}
1705
1706static int opencl_frames_init_command_queue(AVHWFramesContext *hwfc)
1707{
1708 OpenCLFramesContext *priv = hwfc->hwctx;
1709 AVOpenCLFramesContext *hwctx = &priv->p;
1710 OpenCLDeviceContext *devpriv = hwfc->device_ctx->hwctx;
1711 cl_int cle;
1712
1713 priv->command_queue = hwctx->command_queue ? hwctx->command_queue
1714 : devpriv->command_queue;
1715 cle = clRetainCommandQueue(priv->command_queue);
1716 if (cle != CL_SUCCESS) {
1717 av_log(hwfc, AV_LOG_ERROR, "Failed to retain frame "
1718 "command queue: %d.\n", cle);
1719 return AVERROR(EIO);
1720 }
1721
1722 return 0;
1723}
1724
1725static int opencl_frames_init(AVHWFramesContext *hwfc)
1726{

Callers 2

opencl_frames_initFunction · 0.85
opencl_frames_derive_toFunction · 0.85

Calls 1

av_logFunction · 0.85

Tested by

no test coverage detected