[PATCH] Port xf86-video-v4l driver to V4L2

Mauro Carvalho Chehab mchehab at infradead.org
Tue Feb 8 02:38:42 PST 2011


Hi Thierry,

Em 08-02-2011 08:12, Thierry Vignaud escreveu:
> On 8 February 2011 10:42, Mauro Carvalho Chehab <mchehab at redhat.com> wrote:
>> @@ -57,16 +65,16 @@ static MODULESETUPPROTO(v4lSetup);
>>
>>  static XF86ModuleVersionInfo v4lVersRec =
>>  {
>> -        "v4l",
>> -        MODULEVENDORSTRING,
>> -        MODINFOSTRING1,
>> -        MODINFOSTRING2,
>> -        XORG_VERSION_CURRENT,
>> -        0, 1, 1,
>> -        ABI_CLASS_VIDEODRV,
>> -        ABI_VIDEODRV_VERSION,
>> -        MOD_CLASS_NONE,
>> -        {0,0,0,0}
>> +    "v4l",
>> +    MODULEVENDORSTRING,
>> +    MODINFOSTRING1,
>> +    MODINFOSTRING2,
>> +    XORG_VERSION_CURRENT,
>> +    0, 1, 1,
>> +    ABI_CLASS_VIDEODRV,
>> +    ABI_VIDEODRV_VERSION,
>> +    MOD_CLASS_NONE,
>> +    {0,0,0,0}
>>  };
> 
> Looks like there's a lot of gratuitous space change mixed with real changes
> which makes harder to see what's actually changed...

As this is a major rewrite, I decided to fix a few 8-space indent at the first
lines of the driver, and remove a few trailing spaces. The only real changes up 
to the line 114 are some include file changes at hunks 1 and 2 and the increment
of the driver version. The real fun starts on this hunk:

@@ -114,6 +122,12 @@ v4lSetup(pointer module, pointer opts, int *errmaj, int *errmin)
 #define VIDEO_YUV     2  /* yuv overlay (to offscreen memory + hw scaling) */
 #define VIDEO_RECLIP  3  /* temporarly off, window clipping changes */
 
+typedef struct _XvV4LCtrlRec {
+    struct v4l2_queryctrl	qctrl;
+    Atom			xv;
+    INT32			min, max;
+} XvV4LCtrlRec, *XvV4LCtrlPtr;

...

Basically, almost all the driver were touched by this patch, as most of the code
there is due to the V4L API.

Cheers,
Mauro


More information about the xorg-devel mailing list