【发布时间】:2014-04-24 05:55:36
【问题描述】:
目标
我正在尝试构建:
-
具有 swscale 支持的 x264 静态库 (.lib)。我想在 Visual Studio 项目中使用这个库,其中 24 位 RGB 位图图像是:
- 从 RGB 转换为 YUV2
- 转换后的图像被发送到 x264 编码器
- 编码器的输出通过 UDP 流式传输到远程 IP 端点。
具有 swscale 支持的 x264 可执行文件 (.exe)。我想将可执行文件用于与上述相同的目的。在另一个 Visual Studio 项目中,我将 x264.exe 作为单独的进程启动,并将位图数据通过其标准输入传送到 x264 进程,并从进程的标准输出中读出编码数据。
问题
我在弄清楚如何使用 swscale 支持进行编译时遇到了一些麻烦。我需要对可执行文件和库的 swscale 支持。
状态
到目前为止,我已经从 x264 网站下载了最新的 x264 源代码。
我已经在我的机器上安装了 MINGW,当我运行“配置”和“制作”时,我得到了 x264 静态库 - 但 没有 swscale 支持。
我无法找到有关如何在 x264 库中包含 swscale 的详细分步指南。我最接近描述的是这个讨论:
http://forum.doom9.org/showthread.php?t=165350
所以我从以下位置下载了 libpack:
http://komisar.gin.by/mingw/index.html
并将其提取到我的硬盘:
然后我在我的 x264 目录中执行了“make”和“configure”(再次):
./configure --extra-cflags="-I/m/somePath/libpack/libpack/libpack/include" --extra-ldflags="-L/m/somePath/libpack/libpack/libpack/lib"
我在 lib 和包含目录中有以下内容:
当我执行上面的“配置”时,我得到:
platform: X86
system: WINDOWS
cli: yes
libx264: internal
shared: no
static: no
asm: yes
interlaced: yes
avs: avisynth
lavf: no
ffms: no
mp4: lsmash
gpl: yes
thread: win32
opencl: yes
filters: crop select_every
debug: no
gprof: no
strip: no
PIC: no
bit depth: 8
chroma format: all
You can run 'make' or 'make fprofiled' now.
bash.exe"-3.1$
当我执行 'make' 时,我会遇到这个错误:
gcc.exe: error: unrecognized command line option '-fomit-frame-poin'
gcc.exe: fatal error: no input files
compilation terminated.
make: *** [.depend] Error 1
bash.exe"-3.1$
问题 我做错了什么??
【问题讨论】:
-
实际的标志是
-fomit-frame-pointer。尝试确定为什么将截断标志传递给编译器。
标签: c video-streaming h.264 x264