Path: blob/master/dep/ffmpeg/include/libavutil/hwcontext_cuda.h
4216 views
/*1* This file is part of FFmpeg.2*3* FFmpeg is free software; you can redistribute it and/or4* modify it under the terms of the GNU Lesser General Public5* License as published by the Free Software Foundation; either6* version 2.1 of the License, or (at your option) any later version.7*8* FFmpeg is distributed in the hope that it will be useful,9* but WITHOUT ANY WARRANTY; without even the implied warranty of10* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU11* Lesser General Public License for more details.12*13* You should have received a copy of the GNU Lesser General Public14* License along with FFmpeg; if not, write to the Free Software15* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA16*/171819#ifndef AVUTIL_HWCONTEXT_CUDA_H20#define AVUTIL_HWCONTEXT_CUDA_H2122#ifndef CUDA_VERSION23#include <cuda.h>24#endif2526#include "pixfmt.h"2728/**29* @file30* An API-specific header for AV_HWDEVICE_TYPE_CUDA.31*32* This API supports dynamic frame pools. AVHWFramesContext.pool must return33* AVBufferRefs whose data pointer is a CUdeviceptr.34*/3536typedef struct AVCUDADeviceContextInternal AVCUDADeviceContextInternal;3738/**39* This struct is allocated as AVHWDeviceContext.hwctx40*/41typedef struct AVCUDADeviceContext {42CUcontext cuda_ctx;43CUstream stream;44AVCUDADeviceContextInternal *internal;45} AVCUDADeviceContext;4647/**48* AVHWFramesContext.hwctx is currently not used49*/5051/**52* @defgroup hwcontext_cuda Device context creation flags53*54* Flags for av_hwdevice_ctx_create.55*56* @{57*/5859/**60* Use primary device context instead of creating a new one.61*/62#define AV_CUDA_USE_PRIMARY_CONTEXT (1 << 0)6364/**65* Use current device context instead of creating a new one.66*/67#define AV_CUDA_USE_CURRENT_CONTEXT (1 << 1)6869/**70* @}71*/7273#endif /* AVUTIL_HWCONTEXT_CUDA_H */747576