[Ffmpeg-devel] [PATCH] GUID is defined in the Windows API (DirectShow)

Ivan Kalvachev ikalvachev
Wed Mar 1 22:05:10 CET 2006


2006/3/1, Brian Brice <bbrice at newtek.com>:
> Rich Felker wrote:
> > On Wed, Mar 01, 2006 at 08:24:07AM +0000, M?ns Rullg?rd wrote:
> >> Steve Lhomme <slhomme at divxcorp.com> writes:
> >>
> >>> Michael Niedermayer wrote:
> >>>> Hi
> >>>> On Tue, Feb 28, 2006 at 03:33:07PM -1000, Steve Lhomme wrote:
> >>>>> ...so this patch renames libavformat's GUID to wGUID. Feel free to
> >>>>> rename it to something better if you need.
> >>>> put
> >>>> #define GUID microsuck_GUID
> >>>> around the #inlcude
> >>>> #undef
> >>>> or something similar
> >>> Impossible, I use the "real" GUID definition in my code too.
> >> So replace all your GUID uses with microsuck_GUID too.
> >
> > Exactly. Or better yet... LEARN HOW TO FUCKING WRITE MODULAR CODE.
> > There is no reason that your code using windows GUIDs should be in the
> > same file as code using lavc. If it is you need to go back to school
> > and learn a bit about software engineering rather than studying the MS
> > propaganda.
> >
> > Rich
>
> Wowsa.. I also found that the use of namespaces is good.  Since Steve is
> using C++, you can wrap the ffmpeg headers in their own namespace or
> anything else you want.  I had some name comflicts with my project and
> some identifiers coming in from avformat.h, and this easily fixed it.

I'm sorry that I play fool, but I don't understand what's going on here.
GUID is defined in asf.h that is used only internally, it is structure
so it is not exportable or linkable... AND it must be the same
structure as the one defined in directx.h as it comes
from the (asf) standard.
Oh, i nearly forgot, C++ allows type-re-def-inition

So I would really like to see what the problem is. The only thing that
comes into my mind is hacking the libavformat itself, and if you don't
have sources available on your website then it probably makes case of
LGPL violation. (when/if you distribute it)

P.S.
shouldn't ffmpeg's asf.h be in some __packed__ __nonaligned__ etc... attributes?





More information about the ffmpeg-devel mailing list