[MPlayer-dev-eng] [PATCH] MJPEG camera support for v4l2 driver
Aurelien Jacobs
aurel at gnuage.org
Wed Feb 22 00:01:48 CET 2006
On Tue, 21 Feb 2006 23:46:45 +0100
Luca Barbieri <luca.barbieri at gmail.com> wrote:
> The attached patch allows MPlayer to get an MJPEG format stream from
> cameras that support it such as the Logitech QuickCam Pro
> 5000/Fusion/Orbit with the uvcvideo driver.
>
> To use it, just specify the option "-tv driver=v4l2:outfmt=mjpeg".
>
> [...]
>
> int bytesperline = w*d/8;
> -
> + int sizeimage = priv->format.fmt.pix.sizeimage ? priv->format.fmt.pix.sizeimage : (bytesperline * h);
> +
> if (tv_param_buffer_size >= 0) {
Cosmetics and moreover adding trailing whitespace... should be removed.
> int bytesperline = w*d/8;
> -
> - memcpy(dest, source, bytesperline * h);
> + int sizeimage = priv->format.fmt.pix.sizeimage ? priv->format.fmt.pix.sizeimage : (bytesperline * h);
> +
> + memcpy(dest, source, sizeimage);
> }
Cosmetics, and won't compile with gcc 2.95. Variables need to be declared
at the begining of a block.
Aurel
More information about the MPlayer-dev-eng
mailing list