diff options
author | Mark Thompson <sw@jkqxz.net> | 2017-11-18 17:16:14 +0000 |
---|---|---|
committer | Mark Thompson <sw@jkqxz.net> | 2017-11-20 15:47:05 +0000 |
commit | 1dc483a6f2d88e22f47da8584ca74de38262b742 (patch) | |
tree | de921bd90122df2cc1fd0496b28e4a81018f98ca /compat/cuda | |
parent | f7d77b4112f70a15552fbce2ce3d10a4186571b1 (diff) | |
download | ffmpeg-1dc483a6f2d88e22f47da8584ca74de38262b742.tar.gz |
compat/cuda: Pass a logging context to load functions
Reviewed-by: Timo Rothenpieler <timo@rothenpieler.org>
Diffstat (limited to 'compat/cuda')
-rw-r--r-- | compat/cuda/dynlink_loader.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/compat/cuda/dynlink_loader.h b/compat/cuda/dynlink_loader.h index 7d2c87449e..fa43782c9a 100644 --- a/compat/cuda/dynlink_loader.h +++ b/compat/cuda/dynlink_loader.h @@ -59,29 +59,29 @@ #define LOAD_LIBRARY(l, path) \ do { \ if (!((l) = dlopen(path, RTLD_LAZY))) { \ - av_log(NULL, AV_LOG_ERROR, "Cannot load %s\n", path); \ + av_log(logctx, AV_LOG_ERROR, "Cannot load %s\n", path); \ ret = AVERROR_UNKNOWN; \ goto error; \ } \ - av_log(NULL, AV_LOG_TRACE, "Loaded lib: %s\n", path); \ + av_log(logctx, AV_LOG_TRACE, "Loaded lib: %s\n", path); \ } while (0) #define LOAD_SYMBOL(fun, tp, symbol) \ do { \ if (!((f->fun) = (tp*)dlsym(f->lib, symbol))) { \ - av_log(NULL, AV_LOG_ERROR, "Cannot load %s\n", symbol); \ + av_log(logctx, AV_LOG_ERROR, "Cannot load %s\n", symbol); \ ret = AVERROR_UNKNOWN; \ goto error; \ } \ - av_log(NULL, AV_LOG_TRACE, "Loaded sym: %s\n", symbol); \ + av_log(logctx, AV_LOG_TRACE, "Loaded sym: %s\n", symbol); \ } while (0) #define LOAD_SYMBOL_OPT(fun, tp, symbol) \ do { \ if (!((f->fun) = (tp*)dlsym(f->lib, symbol))) { \ - av_log(NULL, AV_LOG_DEBUG, "Cannot load optional %s\n", symbol); \ + av_log(logctx, AV_LOG_DEBUG, "Cannot load optional %s\n", symbol); \ } else { \ - av_log(NULL, AV_LOG_TRACE, "Loaded sym: %s\n", symbol); \ + av_log(logctx, AV_LOG_TRACE, "Loaded sym: %s\n", symbol); \ } \ } while (0) @@ -187,7 +187,7 @@ static inline void nvenc_free_functions(NvencFunctions **functions) } #ifdef AV_COMPAT_DYNLINK_CUDA_H -static inline int cuda_load_functions(CudaFunctions **functions) +static inline int cuda_load_functions(CudaFunctions **functions, void *logctx) { GENERIC_LOAD_FUNC_PREAMBLE(CudaFunctions, cuda, CUDA_LIBNAME); @@ -210,7 +210,7 @@ static inline int cuda_load_functions(CudaFunctions **functions) } #endif -static inline int cuvid_load_functions(CuvidFunctions **functions) +static inline int cuvid_load_functions(CuvidFunctions **functions, void *logctx) { GENERIC_LOAD_FUNC_PREAMBLE(CuvidFunctions, cuvid, NVCUVID_LIBNAME); @@ -244,7 +244,7 @@ static inline int cuvid_load_functions(CuvidFunctions **functions) GENERIC_LOAD_FUNC_FINALE(cuvid); } -static inline int nvenc_load_functions(NvencFunctions **functions) +static inline int nvenc_load_functions(NvencFunctions **functions, void *logctx) { GENERIC_LOAD_FUNC_PREAMBLE(NvencFunctions, nvenc, NVENC_LIBNAME); |