[MPlayer-dev-eng] [PATCH] fix mencoder compilation with lavf X11 demuxer

Ivan Kalvachev ikalvachev at gmail.com
Fri Dec 15 00:14:53 CET 2006


2006/12/14, Rich Felker <dalias at aerifal.cx>:
> On Thu, Dec 14, 2006 at 10:29:36AM +0100, Michael Niedermayer wrote:
> > > > Can x11grab be easily disabled? More specifically, I'm trying to avoid
> > > > unnecessary dependencies in mencoder for binary packages. MEncoder doesn't
> > > > depend on any X11 libs currently and I intend to keep it that way.
> > >
> > > IMO this reveals a whole cascade of problems:
> > >
> > > - there should be a way to disable protocols if there's not already
> >
> > patch welcome ...
> >
> >
> > > - the protocols should ideally be a separate library/separate level of
> > >   abstraction from the muxers/demuxers
> >
> > should be easy, pretty much just a few svn mv + Makefile/configure changes
> > if iam not missing anything (and patch welcome ...)
>
> :)
>
> > > - wtf? grabbing belongs in a grabber app, not an a/v format library
> >
> > well grabbing always was part of libavformat, you complain a little late
>
> Yeah indeed. :)
> I still claim it's very poor factoring tho, and that the reason we hit
> this problem in the first place (and the reason we have the problem of
> having to make fake protocols to hook into the caller's streams) is
> that the code wasn't factored correctly to begin with.
>
> > > - libavformat looks more like libffmpegapp than libavformat
> > >
> > > Any ideas if there's a desire to fix any of them, and if so, how to go
> > > about doing it?
> >
> > what about changing the x11grab code to use dlopen() ?
>
> Not portable, XSI-dependent. Certainly doesn't work on Windows without
> a dlopen-emulation layer. This is a nice idea but it would need to be
> optional, so it's a way of improving the other choices, not a
> replacement for one of the other possible fixes.
>
> IMO the best short-term fix is not to remove x11grab entirely, but
> make it dependent on a disabled-by-default configure option. This will
> at least avoid pulling in X libs for MPlayer/MEncoder and other apps
> that use libavformat but have no need for X. Eventually there should
> be a clean unified way to disable/enable protocols, or better yet
> moving them to their own lib, but first let's fix the show-stopping
> bug. (It's still show-stopping even if Diego's build changes are
> reverted since it makes non-gui apps like mencoder depend on X, which
> is very bad for distro packagers.)

I must say that I am in favour of reverting or nullifying these build changes.
(if x11grab is disabled X libs won't be linked anyway).

I've been having problem with linking mencoder to fontconfig (freetype too),
because when configure test them the cc_check code have the X lib includes
that happen to be the same as fontconfig/type one (they were part of Xorg6.9-).
This prevents pgk-config from inserting the correct build and link
options (again).

I had discussed this in the dev irc channel. Reimar seems to favour
using same lib includes
for configure, mplayer and mencoder. He also dislikes pkg-config (just
like dalias).

Unfortunately Diego didn't fix the issue and went into vacation.
(on the other side if he had fixed it, this bug would have remain
masked/hidden).



More information about the MPlayer-dev-eng mailing list