diff options
author | Timo Rothenpieler <timo@rothenpieler.org> | 2014-12-25 14:55:31 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-12-25 15:54:26 +0100 |
commit | 1efdb0a43f153bfda13668c707778c24fa8d627d (patch) | |
tree | 0cf63438dc99e2b690dce2f2259a1c69812b7403 | |
parent | 7dce91368f85f6f415db4bdb4fb4701e45163dc0 (diff) | |
download | ffmpeg-1efdb0a43f153bfda13668c707778c24fa8d627d.tar.gz |
avcodec/nvenc: Remove special cases for cygwin
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/nvenc.c | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c index dc1459428c..345fb78087 100644 --- a/libavcodec/nvenc.c +++ b/libavcodec/nvenc.c @@ -19,25 +19,14 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#if defined(_WIN32) && !defined(__CYGWIN__) +#if defined(_WIN32) #include <windows.h> #else #include <dlfcn.h> #endif -/* NVENC API is stdcall in cygwin, as it's still Windows */ -#if defined(__CYGWIN__) && !defined(_WIN32) -#define _WIN32 -#define TEMP_WIN32 -#endif - #include <nvEncodeAPI.h> -#if defined(TEMP_WIN32) -#undef _WIN32 -#endif - - #include "libavutil/internal.h" #include "libavutil/imgutils.h" #include "libavutil/avassert.h" @@ -47,13 +36,13 @@ #include "internal.h" #include "thread.h" -#if defined(_WIN32) || defined(__CYGWIN__) +#if defined(_WIN32) #define CUDAAPI __stdcall #else #define CUDAAPI #endif -#if defined(_WIN32) && !defined(__CYGWIN__) +#if defined(_WIN32) #define LOAD_FUNC(l, s) GetProcAddress(l, s) #define DL_CLOSE_FUNC(l) FreeLibrary(l) #else @@ -133,7 +122,7 @@ typedef struct NvencDynLoadFunctions int nvenc_device_count; CUdevice nvenc_devices[16]; -#if defined(_WIN32) && !defined(__CYGWIN__) +#if defined(_WIN32) HMODULE cuda_lib; HMODULE nvenc_lib; #else @@ -290,8 +279,6 @@ static av_cold int nvenc_dyload_cuda(AVCodecContext *avctx) #if defined(_WIN32) dl_fn->cuda_lib = LoadLibrary(TEXT("nvcuda.dll")); -#elif defined(__CYGWIN__) - dl_fn->cuda_lib = dlopen("nvcuda.dll", RTLD_LAZY); #else dl_fn->cuda_lib = dlopen("libcuda.so", RTLD_LAZY); #endif @@ -409,12 +396,6 @@ static av_cold int nvenc_dyload_nvenc(AVCodecContext *avctx) } else { dl_fn->nvenc_lib = LoadLibrary(TEXT("nvEncodeAPI.dll")); } -#elif defined(__CYGWIN__) - if (sizeof(void*) == 8) { - dl_fn->nvenc_lib = dlopen("nvEncodeAPI64.dll", RTLD_LAZY); - } else { - dl_fn->nvenc_lib = dlopen("nvEncodeAPI.dll", RTLD_LAZY); - } #else dl_fn->nvenc_lib = dlopen("libnvidia-encode.so.1", RTLD_LAZY); #endif |