0

我想使用 FFmpeg 的 libavformat 提供的 RTP 数据结构(例如 libavformat/rtpenc.h 中的 RTPMuxContext),但是它们似乎不适用于以下安装:

ffmpeg version 0.8.2.git, Copyright (c) 2000-2011 the FFmpeg developers
  built on Sep 14 2011 16:04:33 with gcc 4.2.1 (Apple Inc. build 5666) (dot 3)
  configuration: --enable-shared --disable-mmx --arch=x86_64
  libavutil    51. 16. 0 / 51. 16. 0
  libavcodec   53. 14. 0 / 53. 14. 0
  libavformat  53. 12. 0 / 53. 12. 0
  libavdevice  53.  3. 0 / 53.  3. 0
  libavfilter   2. 40. 0 /  2. 40. 0
  libswscale    2.  1. 0 /  2.  1. 0

当我查看 /usr/local/include 时,我看到了 libavformat 目录,但是那里只有几个文件:avformat.h、avio.h 和 version.h。当然,当我尝试包含 libavformat/rtpenc.h 时,我得到“错误:libavformat/rtpenc.h:没有这样的文件或目录”

我想通过动态链接到 FFmpeg 库来实现这一点(出于 LGPL 合规性等原因),但这似乎是不可能的。

是否有我缺少的配置脚本参数,或者我忽略的安装后步骤?

4

1 回答 1

1

You can just include the rtpenc.h header from its existing location in the ffmpeg source directory. Since that header doesn't produce any object code your resulting binary won't be a derivative work of the ffmpeg library, but if you want you could just write a compatible structure definition in your own code and access the ffmpeg structure with a pointer/variable defined using your own definition.

Be careful because that structure is not a publicly-facing component of ffmpeg and is likely to change without warning in different versions.

于 2011-09-15T17:31:50.350 回答