[MPlayer-dev-eng] [PATCH] v4l2 interface

Martin Olschewski olschewski at zpr.uni-koeln.de
Mon Jan 13 16:15:50 CET 2003


On Mon, Jan 13, 2003 at 03:12:48PM +0100, Jindrich Makovicka wrote:
> Martin Olschewski wrote:
[v4l2 interface]
> Please send this patch to mplayer-users, too, to get a wider test-base.
Done.

> I'd like to commit this code if you're willing to maintain it so we 
> could have a working and well tested v4l2 capture when v4l2 appears in 
> the kernel.
I will try my very best.  Just for the moment there is surely a lot
of work to do.

> Unfortunately, I don't use v4l2 and am unfamiliar with the new 
> interface. How exactly does this tvi and v4l2 maintain the a/v sync? I 
> found that you pass the samplerate to v4l2 but it's not clear to me how 
> v4l2 knows which audio device is used, and thus which timebase it should 
> use.
The name of the audio device (if any) is passed to v4l2 like in v4l.
First it is set to some nice defaults (16-bit signed little endian
stereo at 44100 Hz).  All of this may be changed from the command line,
i.e. audiorate=22050 because my soundcard gives 44101 if I ask for
44100.  From now it delivers audio frames that are as long (talking
about time) as the video frames and makes sure that the values returned
from grab_audio/video_frame are correct.  In the begining I suspected
that would not be enough, but it works even if there are a lot of
(video-) framedrops.  For same reasons I do not understand right now
it fails if the video output is suspended for some time, i.e. if I
press pause in mplayer.

Regards,

  Martin

-- 
Dipl.-Inform. Martin Olschewski 	Center for Applied Computer Science
Email: olschewski at zpr.uni-koeln.de	University of Cologne
Tel.:  ++49/221/470-6018		Weyertal 80
Fax.:  ++49/221/470-5160		D-50931 K\"oln


More information about the MPlayer-dev-eng mailing list