Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
1efdb0a4
Commit
1efdb0a4
authored
Dec 25, 2014
by
Timo Rothenpieler
Committed by
Michael Niedermayer
Dec 25, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/nvenc: Remove special cases for cygwin
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
7dce9136
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
23 deletions
+4
-23
nvenc.c
libavcodec/nvenc.c
+4
-23
No files found.
libavcodec/nvenc.c
View file @
1efdb0a4
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment