开发者

Using FFmpeg's (libavformat) RTP data structures via dynamic linking

开发者 https://www.devze.com 2023-04-04 22:06 出处:网络
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:

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 s开发者_如何学Ctep that I've neglected?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号