Skip to content

Commit

Permalink
put dxva2 to windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mashingan committed Jan 6, 2020
1 parent 38b2a51 commit 9d6a783
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
10 changes: 3 additions & 7 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"`).
To able to compile and work with, make sure we installed shared lib to run it.
12 changes: 6 additions & 6 deletions src/ffmpeg.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand All @@ -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

Expand Down

0 comments on commit 9d6a783

Please sign in to comment.