From patchwork Wed Jan 30 23:02:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Devin Heitmueller X-Patchwork-Id: 16568 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1U0gfs-0001ql-3Z; Thu, 31 Jan 2013 00:02:36 +0100 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.75/mailfrontend-4) with esmtp id 1U0gfr-0001A5-9w; Thu, 31 Jan 2013 00:02:35 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757239Ab3A3XCd (ORCPT + 1 other); Wed, 30 Jan 2013 18:02:33 -0500 Received: from mail-vb0-f43.google.com ([209.85.212.43]:42593 "EHLO mail-vb0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756424Ab3A3XCc (ORCPT ); Wed, 30 Jan 2013 18:02:32 -0500 Received: by mail-vb0-f43.google.com with SMTP id fr13so1331120vbb.16 for ; Wed, 30 Jan 2013 15:02:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=aqGrXQAjpj9B0WrQ44eTjR3kuhpOBfhVoCtcH/NR+vE=; b=NqOuq2ulYsAFbwTZTMp/HlMnz9JJDBEj9t6huDtwEGqgmdLGSqoQySxJeiclARxVH5 F4wKK3AIY7P9eRw9Cv1ZYZt2agloYqadQOneulWGmKGVfHIYdpkFup3aYHIR5qhKVEbI rCgpEtPEUUldmKHMiaYFHnt+yC4jrmZWedqEvbl7RrIBseGkFgJbe4CaWeVsx072g+fU bPWAeOGZYwEfoudFZWCQOMx7ittMqwWE1CImxKBNcFa4alh1DV0jv8Y4CswvbNjNldH2 vH8CrT1by7DEMV2k4548Hjmp9oNc3UX9Fqehu1O48kVygyAxiEZeDZmXSY5+VlPjuqNI 7nmw== X-Received: by 10.220.230.135 with SMTP id jm7mr6363189vcb.32.1359586951549; Wed, 30 Jan 2013 15:02:31 -0800 (PST) Received: from devin-dell1.home (pool-108-54-72-165.nycmny.fios.verizon.net. [108.54.72.165]) by mx.google.com with ESMTPS id cl9sm2708648vdb.3.2013.01.30.15.02.30 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 30 Jan 2013 15:02:31 -0800 (PST) From: Devin Heitmueller To: linux-media@vger.kernel.org Cc: Devin Heitmueller Subject: [RFC PATCH] Add new value for V4L2_CID_MPEG_STREAM_VBI_FMT for userdata GOP Date: Wed, 30 Jan 2013 18:02:22 -0500 Message-Id: <1359586942-3963-1-git-send-email-dheitmueller@kernellabs.com> X-Mailer: git-send-email 1.7.9.5 X-Gm-Message-State: ALoCoQlW2aFpTE2/nW7wS8v/7PFIA6bw6y8UY69x5O4f4m9yUWXB+LNc50ehqXLP27Vc9cD3vKGS Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2013.1.30.225125 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' HTML_00_01 0.05, HTML_00_10 0.05, SUPERLONG_LINE 0.05, BODY_SIZE_3000_3999 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, DATE_TZ_NA 0, URI_ENDS_IN_HTML 0, __ANY_URI 0, __CP_URI_IN_BODY 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __INT_PROD_TV 0, __MIME_TEXT_ONLY 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __URI_NS , __YOUTUBE_RCVD 0' Add a new possible value to the V4L2 API for embedded VBI data, which allows for embedding of CC and teletext data in the userdata section of the GOP. This allows for compatibility with applications such as VLC which already have code to read captions out of the userdata area for ATSC A/53 compliant streams. This will be used by the cx18 driver to embed closed captions for NTSC streams. --- Documentation/DocBook/media/v4l/controls.xml | 4 ++++ Documentation/DocBook/media/v4l/dev-sliced-vbi.xml | 9 +++++++++ include/uapi/linux/v4l2-controls.h | 1 + 3 files changed, 14 insertions(+) diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml index 9e8f854..4b41b32 100644 --- a/Documentation/DocBook/media/v4l/controls.xml +++ b/Documentation/DocBook/media/v4l/controls.xml @@ -862,6 +862,10 @@ are: VBI in private packets, IVTV format (documented in the kernel sources in the file Documentation/video4linux/cx2341x/README.vbi) + + V4L2_MPEG_STREAM_VBI_FMT_USERDATA_GOP  + VBI in user_data section of GOP for MPEG2 streams (to embed closed captions that comply with ATSC A/53) + diff --git a/Documentation/DocBook/media/v4l/dev-sliced-vbi.xml b/Documentation/DocBook/media/v4l/dev-sliced-vbi.xml index 548f8ea..d295252 100644 --- a/Documentation/DocBook/media/v4l/dev-sliced-vbi.xml +++ b/Documentation/DocBook/media/v4l/dev-sliced-vbi.xml @@ -696,4 +696,13 @@ Sliced VBI services for a description of the line payload. + +
+ MPEG Stream Embedded, Sliced VBI Data Format: USERDATA_GOP + The +V4L2_MPEG_STREAM_VBI_FMT_USERDATA_GOP embedded sliced VBI +format injects EIA-608 closed captions or Teletext into the Userdata GOP area of the MPEG2 stream. This format allows for caption embedding which complies with the ATSC A/53 specification (the same format used for ATSC digital television streams in the United States). + This format is not as flexible as the IVTV format as it does not allow for embedding of arbitrary sliced VBI data. However it does have the advantage of being the same format used for ATSC digital television streams, meaning any application which can render captions for digital streams should be able to render captions for these streams as well with no additional code changes. +
+ diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h index 4dc0822..ad4901e 100644 --- a/include/uapi/linux/v4l2-controls.h +++ b/include/uapi/linux/v4l2-controls.h @@ -166,6 +166,7 @@ enum v4l2_mpeg_stream_type { enum v4l2_mpeg_stream_vbi_fmt { V4L2_MPEG_STREAM_VBI_FMT_NONE = 0, /* No VBI in the MPEG stream */ V4L2_MPEG_STREAM_VBI_FMT_IVTV = 1, /* VBI in private packets, IVTV format */ + V4L2_MPEG_STREAM_VBI_FMT_USERDATA_GOP = 2, /* Inject VBI into user_data GOP */ }; /* MPEG audio controls specific to multiplexed streams */