[Asterisk-video] [rizzo at icir.org: call for testers for team/rizzo/video_v2]

Luigi Rizzo rizzo at icir.org
Fri Sep 28 10:12:39 CDT 2007


On Fri, Sep 28, 2007 at 04:48:51PM +0200, Matteo Brancaleoni wrote:
> Hi,
> 
> Il Thursday 27 September 2007 12:40:07 Matteo Brancaleoni ha scritto:
> > I've digged into v4l2 specs and the read() is present but depends
> > on the cam driver. The cam I'm using now (using uvcvideo drivers)
> > does not have it, only mmap'ed buffer.
> 
> ok, I've explored the v4l2 and started to play with console_video.c 
> to try to add v4l2 support.
> first of all I've found a patch for my webcam to implement read(),
> so I an avoid playing with mmap :) (and it works with other softwares
> that uses the v4l2 read() ).
> 
> the cam is initialized ok (so the ioctls are done), but now I'm stuck
> on another problem...
> 
> the uvc cams (and maybe others) does not support PIX_FMT_YUV420P
> but only PIX_FMT_YUYV422, and cannot grab directly in 352x288,
> but in 640x480 and higher.... (it can do 320x240, but with a different
> colorspace)
> 
> so sws_scale of the input stream must be converted to YUV420P
> colorspace and the image must be resampled to the correct size
> for displaying and for proper h263p encoding...
> 
> I'm now stuck in understanding how to put the src buf into
> a resampling routine... but maybe I need to understand
> better ffmpeg internals...
> 
> btw, if someone has some hints, is welcome :)

the code is almost already there, in fact - if you look at
function show_frame(), the block marked "/* decode */"
does the format and size conversion between the incoming
format (after ffmpeg decoding) and the format required
by SDL. You would need to duplicate the code and
use it to convert between the camera format and what
is required by the encoder.

(This is something i will have to do anyways, to adapt to the different
video formats that the X11 grabber generates).

	cheers
	luigi

> matteo.
> 
> -- 
> Matteo Brancaleoni
> R&D Director
> Tel  :+39.02.70633354
> Voip :sip:matteo at sip.voismart.it
> 
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
> 
> asterisk-video mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-video



More information about the asterisk-video mailing list