From 9d6a783a28f8d3ce1dcce015bea6cb391abcc75e Mon Sep 17 00:00:00 2001 From: mashingan Date: Mon, 6 Jan 2020 19:06:18 +0700 Subject: [PATCH] put dxva2 to windows --- readme.md | 10 +++------- src/ffmpeg.nim | 12 ++++++------ 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/readme.md b/readme.md index c05bbcc..01c977b 100644 --- a/readme.md +++ b/readme.md @@ -40,12 +40,8 @@ for i in 0 .. pFormatCtx[].nb_streams: The index can be used later to know which stream index packet we'll process later. -Any others examples you found should be applicable with this binding too. +Any others examples you found should be applicable with this binding too. Several worked examples +also availables in `examples` folder. ## To use -To able to compile and work with, make sure we installed ffmpeg library dev and -shared lib to run it. - -If you installed the ffmpeg library dev in different path than usual (e.g. `/usr/include`), -make sure pass the include path in your code (with `passC` pragma, `{.passc: "-Iyour/include/path".}`) -or in option during compilation (`--passC:"-Iyour/include/path"`). \ No newline at end of file +To able to compile and work with, make sure we installed shared lib to run it. \ No newline at end of file diff --git a/src/ffmpeg.nim b/src/ffmpeg.nim index 9869d59..34cb6cc 100644 --- a/src/ffmpeg.nim +++ b/src/ffmpeg.nim @@ -7,11 +7,11 @@ const includepath = "-I" & (source / "../cinclude") import ffmpeg/utiltypes import ffmpeg/libavcodec/[avcodec, ac3_parser, adts_parser, avdct, - avfft, dirac, dv_profile, dxva2, - jni, mediacodec, vorbis_parser] + avfft, dirac, dv_profile, jni, + mediacodec, vorbis_parser] when defined(windows): - import ffmpeg/libavcodec/d3d11va + import ffmpeg/libavcodec/[d3d11va, dxva2] else: import ffmpeg/libavcodec/[vaapi, vdpau, xvmc] @@ -35,11 +35,11 @@ import ffmpeg/libswscale/swscale export utiltypes export avcodec, ac3_parser, adts_parser, avdct, - avfft, dirac, dv_profile, dxva2, - jni, mediacodec, vorbis_parser + avfft, dirac, dv_profile, jni, + mediacodec, vorbis_parser when defined(windows): - export d3d11va + export d3d11va, dxva2 else: export vaapi, vdpau, xvmc