[MPlayer-dev-eng] [PATCH] Remove ugly #include from tvi_bsdbt848.c

Vladimir Voroshilov voroshil at gmail.com
Tue Mar 20 14:01:13 CET 2007


2007/3/20, Bernd Ernesti <mplayer-dev-eng at lists.veego.de>:
>
> On Mon, Mar 19, 2007 at 06:54:31PM +0100, Dominik 'Rathann' Mierzejewski
> wrote:
> > On Monday, 19 March 2007 at 18:33, Vladimir Voroshilov wrote:
> > > Hi, All
> > >
> > > This patch removes ugly #include from *BSD bt848 tv driver
> > > (proper header will be detected by configure).
>
> It does not really check the correct headers, i fou had looked at your
> patch
> then you would have noticed that you removed more then one header file.


Fixed. I've copy/pasted code from radio detection and forget that those part
doesn't use ioctl_meteor.h.
Now both ioctl_meteor.h and ioctl_bt*.h are checked separately.
I've also wrap audioio.h with USE_SUN_AUDIO (configure checks exact this
header)

> > Diego, what will you say?
> > >
> > > Unfortunately, i havn't BSD, so can not make fine test for this patch.
> > > But small synthetic test works.
>
> This will not work if you don't have the real header files which depends
> on other files or you need an extra header for another function in this
> file.

Of course.

> Looks good, but maybe add the found header name to output, something
> > like
> > checking for BSD bt848... yes (using header.blah)


Fixed.

What about updated version?

What will be better:

1.
#include MY_AHDR
#include MY_BHDR
where config.h contains:
#define MY_AHDR <ahdr>
#define MY_BHDR <bhdr>

2.
#if defined(HAVE_AHDR1) && defined(HAVE_BHDR1)
#include <ahdr1>
#include <bhdr1>
#if defined(HAVE_AHDR2) && defined(HAVE_BHDR2)
#include <ahdr2>
#include <ahdr2>
...
#endif

I prefer (1)

P.S. added header detected code can be safely used for radio interface too.

I want also to merge tv & radio detection code (bt848,v4l,v4l2)  in future,
because they are very similar

-- 
Regards,
Vladimir Voroshilov     mailto:voroshil at gmail.com
JID: voroshil at jabber.ru
ICQ: 95587719
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bsd_ugly_hdr.diff
Type: application/octet-stream
Size: 4105 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20070320/0f47a7cb/attachment.obj>


More information about the MPlayer-dev-eng mailing list