It can be useful to determine if the decoder context is the same as the display context.
It's used in some samples at https://github.com/NVIDIA/video-sdk-samples --- include/ffnvcodec/dynlink_cuda.h | 1 + include/ffnvcodec/dynlink_loader.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/include/ffnvcodec/dynlink_cuda.h b/include/ffnvcodec/dynlink_cuda.h index ad5da7c..cc1cc00 100644 --- a/include/ffnvcodec/dynlink_cuda.h +++ b/include/ffnvcodec/dynlink_cuda.h @@ -329,6 +329,7 @@ typedef CUresult CUDAAPI tcuMemcpy2D_v2(const CUDA_MEMCPY2D *pcopy); typedef CUresult CUDAAPI tcuMemcpy2DAsync_v2(const CUDA_MEMCPY2D *pcopy, CUstream hStream); typedef CUresult CUDAAPI tcuGetErrorName(CUresult error, const char** pstr); typedef CUresult CUDAAPI tcuGetErrorString(CUresult error, const char** pstr); +typedef CUresult CUDAAPI tcuCtxGetDevice(CUdevice *device); typedef CUresult CUDAAPI tcuStreamCreate(CUstream *phStream, unsigned int flags); typedef CUresult CUDAAPI tcuStreamQuery(CUstream hStream); diff --git a/include/ffnvcodec/dynlink_loader.h b/include/ffnvcodec/dynlink_loader.h index 358acd5..a1fa323 100644 --- a/include/ffnvcodec/dynlink_loader.h +++ b/include/ffnvcodec/dynlink_loader.h @@ -156,6 +156,7 @@ typedef struct CudaFunctions { tcuMemcpy2DAsync_v2 *cuMemcpy2DAsync; tcuGetErrorName *cuGetErrorName; tcuGetErrorString *cuGetErrorString; + tcuCtxGetDevice *cuCtxGetDevice; tcuStreamCreate *cuStreamCreate; tcuStreamQuery *cuStreamQuery; @@ -280,6 +281,7 @@ static inline int cuda_load_functions(CudaFunctions **functions, void *logctx) LOAD_SYMBOL(cuMemcpy2DAsync, tcuMemcpy2DAsync_v2, "cuMemcpy2DAsync_v2"); LOAD_SYMBOL(cuGetErrorName, tcuGetErrorName, "cuGetErrorName"); LOAD_SYMBOL(cuGetErrorString, tcuGetErrorString, "cuGetErrorString"); + LOAD_SYMBOL(cuCtxGetDevice, tcuCtxGetDevice, "cuCtxGetDevice"); LOAD_SYMBOL(cuStreamCreate, tcuStreamCreate, "cuStreamCreate"); LOAD_SYMBOL(cuStreamQuery, tcuStreamQuery, "cuStreamQuery"); -- 2.17.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".