通过动态链接使用 FFmpeg(libavformat)RTP 数据结构
我想使用 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 合规性,其中其他原因),但似乎不可能。
是否有我缺少的配置脚本参数,或者我忽略了安装后步骤?
I want to use the RTP data structures (e.g. RTPMuxContext in libavformat/rtpenc.h) provided by FFmpeg's libavformat however they don't seem to be available with the following install:
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
When I look in /usr/local/include, I see the libavformat directory however only a few files are there: avformat.h, avio.h, and version.h. Of course, when I try to include libavformat/rtpenc.h I get "error: libavformat/rtpenc.h: No such file or directory"
I'd like to achieve this by dynamic linking to the FFmpeg libraries (for LGPL compliance, among other reasons), but it doesn't seem to be possible.
Is there a parameter for the configure script that I'm missing, or a post-installation step that I've neglected?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您只需包含 ffmpeg 源目录中现有位置的 rtpenc.h 标头即可。由于该标头不会生成任何目标代码,因此生成的二进制文件不会是 ffmpeg 库的衍生作品,但如果您愿意,可以在自己的代码中编写兼容的结构定义,并使用指针/访问 ffmpeg 结构使用您自己的定义定义的变量。
请小心,因为该结构不是 ffmpeg 面向公众的组件,并且可能会在不同版本中毫无警告地发生更改。
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.