调试 FFMPEG 代码(libavformat 文件断点)

问题描述 投票:0回答:1

我尝试设置 ffmpeg 进行调试,部分成功。能够在顶级代码中设置调试点,但不能在 libavformat 代码文件中设置调试点。知道如何编译才能做到这一点。

设置:

./configure --enable-debug=3 --disable-optimizations --disable-decoder=vp9 --disable-decoder=hevc --enable-nvenc --enable-nvdec --enable-cuda --enable-cuvid --enable-nonfree --enable-gpl --extra-cflags="-I/usr/local/cuda/include" --extra-ldflags="-L/usr/local/cuda/lib64" --enable-shared --enable-libx264 --enable-gpl --disable-stripping

make clean

make -j8

VS 代码设置

 {
            "name": "(gdb) Launch",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/ffmpeg_master/FFmpeg/ffmpeg_g",
            "args": ["-loglevel","trace","-i", "/home/ubuntu/ffmpeg_test/testfiles/LiveOff.HEIC" ,"-map", "0","out%d.png"],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}/ffmpeg_master/FFmpeg",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                },
                {
                    "description": "Set Disassembly Flavor to Intel",
                    "text": "-gdb-set disassembly-flavor intel",
                    "ignoreFailures": true
                }
            ]
        } {
            "name": "(gdb) Launch",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/ffmpeg_master/FFmpeg/ffmpeg_g",
            "args": ["-loglevel","trace","-i", "/home/ubuntu/ffmpeg_test/testfiles/LiveOff.HEIC" ,"-map", "0","out%d.png"],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}/ffmpeg_master/FFmpeg",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                },
                {
                    "description": "Set Disassembly Flavor to Intel",
                    "text": "-gdb-set disassembly-flavor intel",
                    "ignoreFailures": true
                }
            ]
        }
c++ debugging ffmpeg makefile gdb
1个回答
0
投票
./configure --enable-debug=3 --disable-optimizations --disable-decoder=vp9 --disable-decoder=hevc  --enable-nvenc --enable-nvdec --enable-cuda --enable-cuvid --enable-nonfree --enable-gpl --extra-cflags="-I/usr/local/cuda/include" --extra-ldflags="-L/usr/local/cuda/lib64"  --enable-static --disable-shared  --enable-libx264 --enable-gpl --disable-stripping --pkg-config-flags="--static"   --extra-cflags="-I$HOME/ffmpeg_build/include"   --extra-ldflags="-L$HOME/ffmpeg_build/lib" 

禁用共享库使其工作

© www.soinside.com 2019 - 2024. All rights reserved.