From patchwork Fri Jan 28 19:38:58 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Lachowsky X-Patchwork-Id: 515631 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p0SJd4nM014986 for ; Fri, 28 Jan 2011 19:39:04 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753258Ab1A1TjB (ORCPT ); Fri, 28 Jan 2011 14:39:01 -0500 Received: from antispam01.maxim-ic.com ([205.153.101.182]:37311 "EHLO antispam01.dummydomain.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751556Ab1A1TjA (ORCPT ); Fri, 28 Jan 2011 14:39:00 -0500 X-ASG-Debug-ID: 1296243539-62136d120001-rVgMWv Received: from terlingua.dalsemi.com (terlingua.dalsemi.com [180.0.34.46]) by antispam01.dummydomain.com with ESMTP id K2hYAhUWLWdli9iY; Fri, 28 Jan 2011 13:38:59 -0600 (CST) X-Barracuda-Envelope-From: stephan.lachowsky@maxim-ic.com X-Barracuda-Apparent-Source-IP: 180.0.34.46 Received: from maxdalex02.maxim-ic.internal (maxdalex02.maxim-ic.internal [10.16.15.104] (may be forged)) by terlingua.dalsemi.com (8.10.2/8.10.2) with ESMTP id p0SJcxI25565; Fri, 28 Jan 2011 13:38:59 -0600 (CST) Received: from maxsvlex01.maxim-ic.internal (172.18.47.214) by maxdalex02.maxim-ic.internal (10.16.15.104) with Microsoft SMTP Server (TLS) id 8.3.83.0; Fri, 28 Jan 2011 13:38:59 -0600 Received: from [10.32.80.201] (10.32.80.201) by maxsvlex01.maxim-ic.internal (172.18.47.214) with Microsoft SMTP Server (TLS) id 8.3.83.0; Fri, 28 Jan 2011 11:38:58 -0800 Subject: [PATCH RFC] uvcvideo: Add a mapping for H.264 payloads From: Stephan Lachowsky X-ASG-Orig-Subj: [PATCH RFC] uvcvideo: Add a mapping for H.264 payloads To: Laurent Pinchart CC: "linux-media@vger.kernel.org" , "linux-uvc-devel@lists.berlios.de" Date: Fri, 28 Jan 2011 11:38:58 -0800 Message-ID: <1296243538.17673.23.camel@svmlwks101> MIME-Version: 1.0 X-Mailer: Evolution 2.32.1 (2.32.1-1.fc14) X-Barracuda-Connect: terlingua.dalsemi.com[180.0.34.46] X-Barracuda-Start-Time: 1296243539 X-Barracuda-URL: http://AntiSpam02.maxim-ic.com:8000/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at dummydomain.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=5.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.53710 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 28 Jan 2011 19:39:05 +0000 (UTC) diff --git a/drivers/media/video/uvc/uvc_driver.c b/drivers/media/video/uvc/uvc_driver.c index 6bcb9e1..a5a86ce 100644 --- a/drivers/media/video/uvc/uvc_driver.c +++ b/drivers/media/video/uvc/uvc_driver.c @@ -108,6 +108,11 @@ static struct uvc_format_desc uvc_fmts[] = { .guid = UVC_GUID_FORMAT_MPEG, .fcc = V4L2_PIX_FMT_MPEG, }, + { + .name = "H.264", + .guid = UVC_GUID_FORMAT_H264, + .fcc = V4L2_PIX_FMT_H264, + }, }; /* ------------------------------------------------------------------------ diff --git a/drivers/media/video/uvc/uvcvideo.h b/drivers/media/video/uvc/uvcvideo.h index e522f99..4f65ac6 100644 --- a/drivers/media/video/uvc/uvcvideo.h +++ b/drivers/media/video/uvc/uvcvideo.h @@ -155,6 +155,9 @@ struct uvc_xu_control { #define UVC_GUID_FORMAT_MPEG \ { 'M', 'P', 'E', 'G', 0x00, 0x00, 0x10, 0x00, \ 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} +#define UVC_GUID_FORMAT_H264 \ + { 'H', '2', '6', '4', 0x00, 0x00, 0x10, 0x00, \ + 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} /* ------------------------------------------------------------------------ * Driver specific constants. diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 5f6f470..d3b5877 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h @@ -341,6 +341,7 @@ struct v4l2_pix_format { #define V4L2_PIX_FMT_JPEG v4l2_fourcc('J', 'P', 'E', 'G') /* JFIF JPEG */ #define V4L2_PIX_FMT_DV v4l2_fourcc('d', 'v', 's', 'd') /* 1394 */ #define V4L2_PIX_FMT_MPEG v4l2_fourcc('M', 'P', 'E', 'G') /* MPEG-1/2/4 */ +#define V4L2_PIX_FMT_H264 v4l2_fourcc('H', '2', '6', '4') /* H.264 Annex-B NAL Units */ /* Vendor-specific formats */ #define V4L2_PIX_FMT_CPIA1 v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1 YUV */