[vlc-devel] Re: NetBSD vcd.c patch for 0.4.6

Rhialto rhialto at azenomei.knuffel.net
Mon Dec 2 21:20:53 CET 2002


On Mon 02 Dec 2002 at 19:30:00 +0100, Sam Hocevar wrote:
> There are still two points that worry me though.
> 
> > +#if __NetBSD__
> > +        p_sectors[ i ] = toc_entries.data[i].addr.lba;
> > +#else
> >          p_sectors[ i ] = ntohl( toc_entries.data[i].addr.lba );
> > +#endif
> 
>    Why is this? I can't figure out why this code should be different
> under NetBSD.

It's just trial and error - when I printed the values they looked
nonsensical, but without byteswapping they looked presentable (and
seemed to work). If any byteswapping is necessary, it should not be done
with ntohl in any case, since this is no networking code. And it seems
rather silly that an ioctl() would return values in a potentially wrong
byte-order, so that's why I suppose that NetBSD does any necessary
byteswapping in the kernel. 

> > +    sc.databuf = (caddr_t) p_block;
> > +    sc.datalen = VCD_SECTOR_SIZE; 	// was 2328 == VCD_DATA_SIZE + 4;
> 
>   [...]
> 
> > +#ifdef __NetBSD__
> > +    FAST_MEMCPY( p_buffer, p_block, VCD_DATA_SIZE );
> > +#else
> 
>    I may have missed something here, but it seems we don't skip the
> VCD_DATA_START first bytes.

Exactly. When skipping them, vlc could not recognise any mpeg data, it
just kept skipping sectors until it gave up. And since it's what MPlayer
does it seems ok (unless it skips some of the initial bytes elsewhere,
but then it must be skipping fewer of them). But I admit, I'm not
perfectly sure of what's happening here - perhaps some numbers need some
adjustment still.

Aside: I noticed that with the "familiar" GUI the timeskipping problem I
had was not present. The film displayed properly, going smoothly
forward. The sound still is a problem: there are loud spikes of random
noise through the sound. Synchronisation between sound and image seems
to remain good. All this was not related to vcd-s, it happened
identically on vcds and mpeg files.

> Sam.
-Olaf.
-- 
___ Olaf 'Rhialto' Seibert      -- The evil eye is caused by the black
\X/ rhialto/at/xs4all.nl        -- tongue - Tom Poes, "Het boze oog", 4456.
-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://www.videolan.org/lists.html
If you are in trouble, please contact <postmaster at videolan.org>



More information about the vlc-devel mailing list