[FFmpeg-devel] [PATCH] Create a libavformat/version.h header
Stefano Sabatini
stefano.sabatini-lala
Sun Feb 22 22:50:49 CET 2009
On date Thursday 2009-02-19 13:30:42 +0000, M?ns Rullg?rd encoded:
> Diego Biurrun <diego at biurrun.de> writes:
>
> > On Thu, Feb 19, 2009 at 10:37:51AM +0000, M?ns Rullg?rd wrote:
> >> Stefano Sabatini <stefano.sabatini-lala at poste.it> writes:
> >>
> >> > On date Wednesday 2009-02-18 12:37:50 +0100, Benoit Fouet encoded:
> >> >>
> >> >> as LIBAVFORMAT_VERSION_MAJOR is used in avio.h, the latter needs to
> >> >> include avformat.h
> >> >> so far, so good...
> >> >> the "problem" is that avformat.h includes avio.h, so the only way to do
> >> >> it (simply) is to include avformat.h in avio.h *before* its multiple
> >> >> inclusion guards.
> >> >>
> >> >> Attached patch does that, and is waiting for your comments :)
> >> >
> >> > [...]
> >> >
> >> > I wonder if that would make sense to define version.h headers for each
> >> > lib, only containing the versioning stuff.
> >>
> >> That idea crossed my mind as well, and I think it is probably the
> >> cleanest solution (even though the hack was my idea).
> >
> > The idea had crossed my mind as well, but I wondered if it wasn't
> > overkill. Since clean alternatives do not really exist...
>
> Whoever decides to implement this, remember to update the version
> extraction towards the end of configure.
[resending since the first one went missed in action]
Hi all,
the patch creates a separate version.h file, which makes possible to
include in a project avio.h without to include before avformat.h.
Indeed avio.h uses the version number symbols defined in avformat.h,
creating a separate file for that fixes the issue.
I applied to the version.h header the same trick already applied to
pixfmt.h, that is the header is considered "internal but installed" as
claimed by the warning, so the user is not supposed to include
directly that file in her projects.
I think that's the way preferred by Michael, but I'll be happy to
change that (and bump minor) if we choose the other way.
If this is the way to go I'll post corresponding patches for the other
FFmpeg libs.
Regards.
--
FFmpeg = Fostering and Frenzy Most Powerful Elitist Gadget
-------------- next part --------------
A non-text attachment was scrubbed...
Name: create-lavf-version-h.patch
Type: text/x-diff
Size: 48044 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090222/74c83859/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-avio-inclusion.patch
Type: text/x-diff
Size: 292 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090222/74c83859/attachment-0001.patch>
More information about the ffmpeg-devel
mailing list