Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Aug 2005 14:01:18 +0300
From:      Ion-Mihai Tetcu <itetcu@people.tecnik93.com>
To:        Sir Pingus <pingus_77@yahoo.fr>
Cc:        freebsd-multimedia@freebsd.org, Sir Pingus <pingus_77@yahoo.fr>, rofug@rofug.ro
Subject:   Re: WIP: multimedia/XdTV port
Message-ID:  <20050809140118.75be9071@it.buh.tecnik93.com>
In-Reply-To: <20050809090824.88622.qmail@web25406.mail.ukl.yahoo.com>
References:  <20050806185659.025b5238@it.buh.tecnik93.com> <20050809090824.88622.qmail@web25406.mail.ukl.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 9 Aug 2005 11:08:24 +0200 (CEST)
Sir Pingus <pingus_77@yahoo.fr> wrote:

> Hi,
>=20
>=20
>=20
> > Known "running" problems:
> > - no sound source selection support (general problem, no support for
> > it at all) - for me this equals no sound. [1]
>=20
> Ho.... so a patch seems to be needed

Yeh :) Will do it, I hope, when I return from holidays.
=20
> > - no channel scanning (it's based on v4l and I'm not aware of any
> > working software that does this for FreeBSD - xawtv doesn't find any
> > channels for me - it scans for them but doesn't lock on) - copy your
> > channels from ~/.xawtv
>=20
> Yes we know that. xdtv_scan which is based on the scan software from
> XawTV doesn't work on *BSD system. I don't know if there is something
> like such software that works on *BSD.

Me neither.
=20
> > - trying to use Xosd or Mozaic Channels makes it stopping to accept
> > input and you'll have to Ctrl+C it which will generate a core
> > (either threading problem or something masked by libpthread - I
> > haven't have time to debug) [2]
>=20
> Could be interessting to know why..

I didn't manage to crash it with xosd this time.

This is what gdb show for mozaic windows:

 > gdb xdtv xdtv.core
GNU gdb 6.1.1 [FreeBSD]
 ...
Core was generated by `xdtv'.
Program terminated with signal 11, Segmentation fault.
 ....
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x283230cb in pthread_testcancel () from /usr/lib/libpthread.so.1
(gdb) bt
#0  0x283230cb in pthread_testcancel () from /usr/lib/libpthread.so.1
#1  0x28310e7a in sigaction () from /usr/lib/libpthread.so.1
#2  0x2831b530 in pthread_mutexattr_init () from /usr/lib/libpthread.so.1
#3  0x00000000 in ?? ()
(gdb) info threads
* 6 LWP 100264  0x283230cb in pthread_testcancel () from /usr/lib/libpthrea=
d.so.1
  5 Thread 5 (runnable)  0x0808c781 in mmx2_memcpy_64K (dst=3D0x0, src=3D0x=
0, n=3D0) at memcpy.c:503
  4 Thread 4 (LWP 100244)  0x283230eb in pthread_testcancel () from /usr/li=
b/libpthread.so.1
  3 Thread 3 (runnable)  0x2832316b in pthread_testcancel () from /usr/lib/=
libpthread.so.1
  2 Thread 2 (runnable)  0x2874b2cf in select () from /lib/libc.so.5
  1 Thread 1 (runnable)  0x2831b5b5 in pthread_mutexattr_init () from /usr/=
lib/libpthread.so.1
(gdb) thread 5
[Switching to thread 5 (Thread 5 (runnable))]#0  0x0808c781 in mmx2_memcpy_=
64K (dst=3D0x0, src=3D0x0, n=3D0)
    at memcpy.c:503
503             __asm__ __volatile__(   "movl %1, %%esi\n"                 =
                             // esi =3D src

Is this asm really needed ?


Running from valgrind doesn't get there:
 > valgrind --leak-resolution=3Dhigh --leak-check=3Dyes --tool=3Dmemcheck -=
-show-reachable=3Dyes --error-limit=3Dno --show-below-main=3Dyes xdtv
=3D=3D74233=3D=3D Memcheck, a memory error detector for x86-linux.
=3D=3D74233=3D=3D Copyright (C) 2002-2004, and GNU GPL'd, by Julian Seward.
=3D=3D74233=3D=3D Using valgrind-2.1.0, a program supervision framework for=
 x86-linux.
=3D=3D74233=3D=3D Copyright (C) 2000-2004, and GNU GPL'd, by Julian Seward.
=3D=3D74233=3D=3D Estimated CPU clock rate is 1672 MHz
=3D=3D74233=3D=3D For more details, rerun with: -v
=3D=3D74233=3D=3D

This is xdtv 2.2.0 running on FreeBSD/i386 (5.4-STABLE).
=3D=3D74233=3D=3D Conditional jump or move depends on uninitialised value(s)
=3D=3D74233=3D=3D    at 0x3C182658: store_to_database (in /usr/X11R6/lib/li=
bX11.so.6)
=3D=3D74233=3D=3D    by 0x3C182853: f_newline (in /usr/X11R6/lib/libX11.so.=
6)
=3D=3D74233=3D=3D    by 0x3C18356C: _XlcCreateLocaleDataBase (in /usr/X11R6=
/lib/libX11.so.6)
=3D=3D74233=3D=3D    by 0x3C18876B: initialize (in /usr/X11R6/lib/libX11.so=
.6)
=3D=3D74233=3D=3D
=3D=3D74233=3D=3D Conditional jump or move depends on uninitialised value(s)
=3D=3D74233=3D=3D    at 0x3C18265E: store_to_database (in /usr/X11R6/lib/li=
bX11.so.6)
=3D=3D74233=3D=3D    by 0x3C182853: f_newline (in /usr/X11R6/lib/libX11.so.=
6)
=3D=3D74233=3D=3D    by 0x3C18356C: _XlcCreateLocaleDataBase (in /usr/X11R6=
/lib/libX11.so.6)
=3D=3D74233=3D=3D    by 0x3C18876B: initialize (in /usr/X11R6/lib/libX11.so=
.6)
=3D=3D74233=3D=3D
=3D=3D74233=3D=3D Conditional jump or move depends on uninitialised value(s)
=3D=3D74233=3D=3D    at 0x3C1826A2: store_to_database (in /usr/X11R6/lib/li=
bX11.so.6)
=3D=3D74233=3D=3D    by 0x3C182853: f_newline (in /usr/X11R6/lib/libX11.so.=
6)
=3D=3D74233=3D=3D    by 0x3C18356C: _XlcCreateLocaleDataBase (in /usr/X11R6=
/lib/libX11.so.6)
=3D=3D74233=3D=3D    by 0x3C18876B: initialize (in /usr/X11R6/lib/libX11.so=
.6)
=3D=3D74233=3D=3D
=3D=3D74233=3D=3D Conditional jump or move depends on uninitialised value(s)
=3D=3D74233=3D=3D    at 0x3C1826A8: store_to_database (in /usr/X11R6/lib/li=
bX11.so.6)
=3D=3D74233=3D=3D    by 0x3C182853: f_newline (in /usr/X11R6/lib/libX11.so.=
6)
=3D=3D74233=3D=3D    by 0x3C18356C: _XlcCreateLocaleDataBase (in /usr/X11R6=
/lib/libX11.so.6)
=3D=3D74233=3D=3D    by 0x3C18876B: initialize (in /usr/X11R6/lib/libX11.so=
.6)
filename =3D /home/itetcu/.xdtv/xdtvrc
xdtv_v4l-conf: not found
xdtv_v4l-conf had some trouble, trying to continue anyway
=3D=3D74233=3D=3D
=3D=3D74233=3D=3D Source and destination overlap in memcpy(0x3CB3DC4C, 0x3C=
B3DC4C, 4)
=3D=3D74233=3D=3D    at 0x3C03EEB7: memcpy (in /usr/local/lib/valgrind/vgpr=
eload_memcheck.so)
=3D=3D74233=3D=3D    by 0x3C0C5569: GetResources (in /usr/X11R6/lib/libXt.s=
o.6)
=3D=3D74233=3D=3D    by 0x3C0C5D93: _XtGetResources (in /usr/X11R6/lib/libX=
t.so.6)
=3D=3D74233=3D=3D    by 0x3C0AEC3E: xtCreate (in /usr/X11R6/lib/libXt.so.6)
=3D=3D74233=3D=3D
=3D=3D74233=3D=3D Source and destination overlap in memcpy(0x3CB489AC, 0x3C=
B489AC, 5)
=3D=3D74233=3D=3D    at 0x3C03EEB7: memcpy (in /usr/local/lib/valgrind/vgpr=
eload_memcheck.so)
=3D=3D74233=3D=3D    by 0x3C71536E: __sfvwrite (in /lib/libc.so.5)
=3D=3D74233=3D=3D    by 0x3C70A10C: (within /lib/libc.so.5)
=3D=3D74233=3D=3D    by 0x3C70CD14: __vfprintf (in /lib/libc.so.5)
=3D=3D74233=3D=3D
=3D=3D74233=3D=3D Conditional jump or move depends on uninitialised value(s)
=3D=3D74233=3D=3D    at 0x3C1E70A2: XmuReadBitmapData (in /usr/X11R6/lib/li=
bXmu.so.6)
=3D=3D74233=3D=3D    by 0x3C1E7574: XmuReadBitmapDataFromFile (in /usr/X11R=
6/lib/libXmu.so.6)
=3D=3D74233=3D=3D    by 0x3C1E5A6C: XmuLocatePixmapFile (in /usr/X11R6/lib/=
libXmu.so.6)
=3D=3D74233=3D=3D    by 0x3C1E5E95: XmuLocateBitmapFile (in /usr/X11R6/lib/=
libXmu.so.6)
=3D=3D74233=3D=3D
=3D=3D74233=3D=3D Conditional jump or move depends on uninitialised value(s)
=3D=3D74233=3D=3D    at 0x3C1E70A8: XmuReadBitmapData (in /usr/X11R6/lib/li=
bXmu.so.6)
=3D=3D74233=3D=3D    by 0x3C1E7574: XmuReadBitmapDataFromFile (in /usr/X11R=
6/lib/libXmu.so.6)
=3D=3D74233=3D=3D    by 0x3C1E5A6C: XmuLocatePixmapFile (in /usr/X11R6/lib/=
libXmu.so.6)
=3D=3D74233=3D=3D    by 0x3C1E5E95: XmuLocateBitmapFile (in /usr/X11R6/lib/=
libXmu.so.6)
=3D=3D74233=3D=3D
=3D=3D74233=3D=3D Conditional jump or move depends on uninitialised value(s)
=3D=3D74233=3D=3D    at 0x3C238CA1: xpmParseColors (in /usr/X11R6/lib/libXp=
m.so.4)
=3D=3D74233=3D=3D    by 0x3C23579A: xpmParseDataAndCreate (in /usr/X11R6/li=
b/libXpm.so.4)
=3D=3D74233=3D=3D    by 0x3C23CF88: XpmCreateImageFromData (in /usr/X11R6/l=
ib/libXpm.so.4)
=3D=3D74233=3D=3D    by 0x3C23C146: XpmCreatePixmapFromData (in /usr/X11R6/=
lib/libXpm.so.4)
=3D=3D74233=3D=3D
=3D=3D74233=3D=3D Conditional jump or move depends on uninitialised value(s)
=3D=3D74233=3D=3D    at 0x3C238CA7: xpmParseColors (in /usr/X11R6/lib/libXp=
m.so.4)
=3D=3D74233=3D=3D    by 0x3C23579A: xpmParseDataAndCreate (in /usr/X11R6/li=
b/libXpm.so.4)
=3D=3D74233=3D=3D    by 0x3C23CF88: XpmCreateImageFromData (in /usr/X11R6/l=
ib/libXpm.so.4)
=3D=3D74233=3D=3D    by 0x3C23C146: XpmCreatePixmapFromData (in /usr/X11R6/=
lib/libXpm.so.4)
wmhooks: netwm detected
wmhooks: netwm state above supported
wmhooks: netwm fullscreen supported
wmhooks: nothing found...
DGA: server=3D2.0, include=3D2.0
VidMode: server=3D2.2, include=3D2.2
  available video mode(s): 1024x768 800x600 640x480 1024x768 1024x768 1024x=
768 1024x768 832x624 800x600 800x600 800x600 800x600 640x480 640x480 640x48=
0 720x400 640x400 640x350 512x384 416x312 400x300 400x300 400x300 400x300
Selected XvImage adaptor with yuyv support: ATI Radeon Video Overlay on por=
t 61 (grabdisplay)
No XvVideo port available.
true
*** AUDIO DEVICE TYPE =3D oss
supported formats
(0,type=3D0,bpp=3D2,masks=3D0x7c00/0x3e0/0x1f,sb=3D0,ss=3D0)
(1,type=3D0,bpp=3D2,masks=3D0x7c00/0x3e0/0x1f,sb=3D1,ss=3D0)
(2,type=3D0,bpp=3D2,masks=3D0xf800/0x7e0/0x1f,sb=3D0,ss=3D0)
(3,type=3D0,bpp=3D2,masks=3D0xf800/0x7e0/0x1f,sb=3D1,ss=3D0)
(4,type=3D0,bpp=3D3,masks=3D0xff0000/0xff00/0xff,sb=3D1,ss=3D0)
(5,type=3D0,bpp=3D4,masks=3D0xff0000/0xff00/0xff,sb=3D0,ss=3D0)
(6,type=3D0,bpp=3D4,masks=3D0xff0000/0xff00/0xff,sb=3D0,ss=3D1)
(7,type=3D0,bpp=3D4,masks=3D0xff0000/0xff00/0xff,sb=3D1,ss=3D0)
(8,type=3D0,bpp=3D4,masks=3D0xff0000/0xff00/0xff,sb=3D1,ss=3D1)
(9,type=3D1,bpp=3D2,masks=3D0xff0000/0xff00/0xff,sb=3D1,ss=3D1)
(10,type=3D2,bpp=3D2,masks=3D0xff0000/0xff00/0xff,sb=3D0,ss=3D1)
(11,type=3D3,bpp=3D2,masks=3D0xff0000/0xff00/0xff,sb=3D1,ss=3D1)
@@@@@@@@@@ f=3D5 i=3D8
*** GRABBER DEVICE TYPE =3D bktr
@@@@@@@@@@ f=3D2 i=3D1
@@@@@@@@@@ f=3D3 i=3D3
@@@@@@@@@@ f=3D4 i=3D4
@@@@@@@@@@ f=3D5 i=3D8
@@@@@@@@@@ f=3D10 i=3D10
@@@@@@@@@@ f=3D13 i=3D11
@@@@@@@@@@ f=3D20 i=3D0
@@@@@@@@@@ f=3D21 i=3D2
@@@@@@@@@@ f=3D23 i=3D5
*** MIXER DEVICE TYPE =3D oss
=3D=3D74233=3D=3D
=3D=3D74233=3D=3D Conditional jump or move depends on uninitialised value(s)
=3D=3D74233=3D=3D    at 0x8061C6C: lookup_channel (channel.c:237)
Warning: Cannot convert string "-*-ledfixed-medium-r-*--39-*-*-*-c-*-*-*" t=
o type FontStruct
MMX, SSE, AMD MMX extensions, have been detected.
Method mmxext_64K
v=3D19000 arg=3D148 min=3D0 max=3D511
v=3D34000 arg=3D4 min=3D-128 max=3D127
v=3D32768 arg=3D-1 min=3D-128 max=3D127
v=3D28000 arg=3D218 min=3D0 max=3D511
@@@@@ 2 512 256
init grab_scr 128 96
@@@@@@@@@@ f=3D5 i=3D8
BEGIN CAPTURE
--74233-- sigprocmask: unknown `how' field 0
=3D=3D74233=3D=3D
=3D=3D74233=3D=3D Syscall param sigsuspend(mask) contains uninitialised or =
unaddressable byte(s)
=3D=3D74233=3D=3D    at 0x3C6A132F: (within /lib/libc.so.5)
=3D=3D74233=3D=3D    by 0x5F747360: ???
=3D=3D74233=3D=3D  Address 0x4FFFE0B0 is on thread 1's stack

=20
> > - scheduling recording doesn't work (not everybody run linux - some
> > of the *.sh files installed need to be modified from bash to sh) [3]
>=20
> ok
>=20
> > - NLS support doesn't work because of a problem ./configure has with
> > testing for gettext so no internationalization for now.
>=20
> you meen that the "gettext" test don't work on *BSD?

No, ./configure fails to detect gettext.

configure:26585: checking for gettext
configure:26642: cc -o conftest -O2 -pipe -march=3Dathlon-xp -DMMX=3D1 -g -=
DDEBUG -I/usr/local/include  -L/usr/loc
al/lib conftest.c  >&5
conftest.c:84: warning: conflicting types for built-in function 'gettext'
/var/tmp//ccG0IuvS.o(.text+0x14): In function `main':
/usr/ports/multimedia/xdtv/work/xdtv-2.2.0/conftest.c:100: undefined refere=
nce to `gettext'
/var/tmp//ccG0IuvS.o(.data+0x0):/usr/ports/multimedia/xdtv/work/xdtv-2.2.0/=
conftest.c:99: undefined reference
to `gettext'
configure:26648: $? =3D 1
configure: failed program was:
| /* confdefs.h.  */
..........

> > - you actually need misc/alevt for teletext support (xdtv contains
> > alevt source code but it doesn't actually build alevt binary, only
> > xdtv_alevt-cap - and the port won't pull it for you right now, so you
> > have to install it manually. [4]
>=20
> Why? AleVT is inside the XdTV software now (version 1.6.1). I just
> restore for you the possibility to use png format to export as a
> picture and AleVT teletext capture. I also restore the "smallfont"
> possibility. Third, I apply the patch about html export you suggest
> me.

Hmm, I think you're right here. I'll have to retrace my steps to see
what did make me say this. I first worked on the port on a machine
without a tv card so I think that's why I didn't got the alevt screen
and forgot all about it when doing the actual testing.

 [ ... ]
=20
> > When writing patches please consider that we have very good chances to
> > propagate them upstream, thanks to the support of one of the
> > developers, Pingus, so please try not to break non-FreeBSD cases.
>=20
>=20
> Yes please. If we commit any patch from *BSD user these patch must
> also work for *Linux too.
>=20
> About the modification to test BT8xx presence, do you think your
> patch will work on all *BSD system?=20

No. I'm not convinced they work on FreeBSD 4.x either, but I have no
machine to test on and I don't care much, anyone running FreeBSD as a
desktop should be running 5.x or the upcoming 6.

> -#include <machine/ioctl_meteor.h> <=3D=3D=3D=3D this doesn't works??
>=20
> -#include <machine/ioctl_bt848.h> <=3D=3D=3D=3D this doesn't works??
>=20
> +#include <dev/bktr/ioctl_meteor.h>
>=20
> +#include <dev/bktr/ioctl_bt848.h>

They work, but then I get a warning saying to include those from dev;

> - AC_CHECK_HEADERS(dev/ic/bt8xx.h) <=3D=3D=3D=3D this doesn't works??
>=20
> + AC_CHECK_HEADERS(dev/bktr/ioctl_bt848.h)

No, that's for OpenBSD, which imported both our meteor and bt484
headers mixed in one file.

> and you don't modify that:
>=20
>  #if HAVE_DEV_IC_BT8XX_H
>=20
>  #include <dev/ic/bt8xx.h> <=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D so why /=
dev/ic and
> sometimes /dev/bktr. What is the best to test the drivers?

=46rom what I see in dev/ic/ we have headers for some controllers/serial
cards. Bktr is in dev/bktr

> 2) about font/Makefile.in:
>=20
> -prefix=3D/usr/X11R6
>=20
> +prefix=3D%%X11BASE%%
>=20
> I'm  not sure we use this line actually. perhaps we have to remove it.

I don't think so; I'm replacing it and then, in post-patch target, I'm
writing the "right" value (which defaults to /usr/X11R6) from the
port's Makefile. One can have X11 installed in an other location.

>=20
> 3) about xdtv_wizard: I don't understand what you do on it. we
> suggest to copy the conf file in /etc/xdtv. for the
> internationalization we propose the same. Why changing the path?

Because on *BSDs /etc is for system configuration files, while third
party software config files goes to PREFIX/etc (PREFIX defaulting
o /usr/local on FreeBSD). See hier(7)
http://www.freebsd.org/cgi/man.cgi?query=3Dhier&apropos=3D0&sektion=3D7&man=
path=3DFreeBSD+5.4-RELEASE+and+Ports&format=3Dhtml

Your ./configure should respect --sysconfigdir, which it ignores.

> 4) divx4linux OFF : yes of course it work only for linux.=20

There is probably a way to make it work, since we have it=20

> ALSA: there is no alsa on BSD?


=20
> 5) explain me why you need a complete path for JPEG header:
>=20
> -# include <jpeglib.h>
>=20
> +# include </usr/local/include/jpeglib.h>

This is not the right way, I know; without it ./configure will work but
compile will fail finding the file; I don't understand why; quick and
dirty work as I've said. :(


--=20
IOnut
Unregistered ;) FreeBSD "user"
  "Intellectual Property" is   nowhere near as valuable   as "Intellect"





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050809140118.75be9071>