Commit 2090b11411959e38c5df0b9b50dacab6224a3d44
1 parent
f49bbf3d
readme完善
Showing
3 changed files
with
7 additions
and
12 deletions
README.md
1 | #### ffmpeg编译配置 | 1 | #### ffmpeg编译配置 |
2 | +1. 安装cuda | ||
3 | +2. 安装 nv-codec-headers | ||
4 | + 支持 cuvid 需要安装 nv-codec-headers, 进入 nv-codec-headers 文件夹后以sudo权限make && make install即可 | ||
5 | +3. 编译ffmpeg | ||
2 | ~~~ | 6 | ~~~ |
3 | ./configure --enable-debug --extra-cflags=-g --extra-ldflags=-g --disable-optimizations --disable-stripping --enable-cuda --enable-cuvid --enable-nvenc --disable-x86asm --enable-nonfree --enable-libnpp --extra-cflags=-I/usr/local/cuda-11.7/targets/x86_64-linux/include --extra-cflags=-fPIC --extra-ldflags=-L/usr/local/cuda-11.7/targets/x86_64-linux/lib --enable-shared --enable-pic --enable-ffplay --prefix=../bin | 7 | ./configure --enable-debug --extra-cflags=-g --extra-ldflags=-g --disable-optimizations --disable-stripping --enable-cuda --enable-cuvid --enable-nvenc --disable-x86asm --enable-nonfree --enable-libnpp --extra-cflags=-I/usr/local/cuda-11.7/targets/x86_64-linux/include --extra-cflags=-fPIC --extra-ldflags=-L/usr/local/cuda-11.7/targets/x86_64-linux/lib --enable-shared --enable-pic --enable-ffplay --prefix=../bin |
4 | ~~~ | 8 | ~~~ |
@@ -7,4 +11,5 @@ | @@ -7,4 +11,5 @@ | ||
7 | --enable-debug --extra-cflags=-g --extra-ldflags=-g --disable-optimizations --disable-stripping | 11 | --enable-debug --extra-cflags=-g --extra-ldflags=-g --disable-optimizations --disable-stripping |
8 | ~~~ | 12 | ~~~ |
9 | 13 | ||
10 | -#### | ||
11 | \ No newline at end of file | 14 | \ No newline at end of file |
15 | +#### SDK说明 | ||
16 | +1. 对外接口主要是 FFNvDecoderManager 类,可支持多个解码器;也可直接使用 FFNvDecoder ,但是不建议,FFNvDecoderManager已经封装了 FFNvDecoder 的接口 | ||
12 | \ No newline at end of file | 17 | \ No newline at end of file |
nv-codec-headers @ 3ed7c9a0a2c
1 | +Subproject commit 3ed7c9a0a2c0b698b83088e13008f3ec983219b2 |
src/FFNvDecoder.cpp
@@ -221,17 +221,6 @@ void FFNvDecoder::decode_thread() | @@ -221,17 +221,6 @@ void FFNvDecoder::decode_thread() | ||
221 | } | 221 | } |
222 | 222 | ||
223 | mFrameQueue.addTail(); | 223 | mFrameQueue.addTail(); |
224 | - | ||
225 | - // if (gpuFrame->format == hw_pix_fmt) | ||
226 | - // { | ||
227 | - // /* retrieve data from GPU to CPU */ | ||
228 | - // if (av_hwframe_transfer_data(pong_frame, gpuFrame, 0) < 0) | ||
229 | - // { | ||
230 | - // cout << "Failed to transfer the data to system memory"; | ||
231 | - // return; | ||
232 | - // } | ||
233 | - // } | ||
234 | - | ||
235 | } | 224 | } |
236 | av_packet_unref(pkt); | 225 | av_packet_unref(pkt); |
237 | } | 226 | } |