]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/nvenc: Remove special cases for cygwin
authorTimo Rothenpieler <timo@rothenpieler.org>
Thu, 25 Dec 2014 13:55:31 +0000 (14:55 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 25 Dec 2014 14:54:26 +0000 (15:54 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/nvenc.c

index dc1459428cec8b24614cf507f89aad3b88c6ed76..345fb7808701553ab26e46431f52043d2d93a7e2 100644 (file)
  * 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"
 #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