From patchwork Sun Jan 28 23:32:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Herdler X-Patchwork-Id: 767273 Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BF24A335BC for ; Sun, 28 Jan 2024 23:33:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.15.15 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706484833; cv=none; b=GErd/PyRNUTUCkhdEslEdbmiDnYqX2g+p38gK/rULiwf7y4bV7c+2c+Vv9m/5uy92pI12P0NrLx2fmVF72liP/UkqpfAlP59U/9eBWuw2KVQN2udUIvXHXOztCxBwTFSzq1cd3EcKRFljQTwfrCV1UhpZcfbvI4nd1KWlzekdQ0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706484833; c=relaxed/simple; bh=RTSjYeCNSqWYtAfxfQJyFMQRH2o76daM99KR5iSO0H0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=XyAyMMfvPep8w9hVl/BNpKp/veYKZSByFpB5FJ4SLXybZUbm9c9hl2ALne/OCo/VcwIcG4i/9BgIWRAXy5kxUBEkVowdrdII79En88e+DauALCD1ZHPYymLNg2C7dBFXP0U6AobaPq7QMUrNCbhNxA9jZgxVDfYOptf+IXz3Nzk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=nurfuerspam.de; spf=pass smtp.mailfrom=nurfuerspam.de; dkim=pass (2048-bit key) header.d=nurfuerspam.de header.i=herdler@nurfuerspam.de header.b=E4to4+i8; arc=none smtp.client-ip=212.227.15.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=nurfuerspam.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nurfuerspam.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nurfuerspam.de header.i=herdler@nurfuerspam.de header.b="E4to4+i8" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nurfuerspam.de; s=s31663417; t=1706484820; x=1707089620; i=herdler@nurfuerspam.de; bh=RTSjYeCNSqWYtAfxfQJyFMQRH2o76daM99KR5iSO0H0=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To: References; b=E4to4+i8HQUdILHGu+TyfU0sj3AbPZstROfkqVPPuPXtmJn2JEkRGd/MYxHluKuQ EEw8BlJYGyUQUNUvXICb1KYPVXetIln+aRHQwIaugXv1mqMExvTb+R5Ty9eCtZa3Z Z305B6ik56ed1c+MzG64waSE6rZw3HspvCseuBL2NznudbvJD6v/OmXTALBGCaVgK 0jc/v8Gt/vpTRqgQewlw/PBi03fqiak7NZHUMxYvOiXyKs08JrLW/dmvPRW/83Hqk ZpggHdTv/7nHYXFgwzQBmqFYLtOmMUBgRRvVOh1+cG7sp5U1Iydz25B7BulzSUJ0Z ApP9Pu+GAuNkXz8Qqg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from astro.haus ([185.101.173.202]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MUowV-1rdCw12I4n-00QhJi; Mon, 29 Jan 2024 00:33:40 +0100 From: Stefan Herdler To: mchehab@kernel.org, hverkuil-cisco@xs4all.nl Cc: linux-media@vger.kernel.org, smoch@web.de, tmn505@gmail.com, vinschen@redhat.com Subject: [PATCH v4 5/6] media: docs: uAPI: dvb/video: completing the documentation (data types) Date: Mon, 29 Jan 2024 00:32:48 +0100 Message-Id: <20240128233249.32794-6-herdler@nurfuerspam.de> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20240128233249.32794-1-herdler@nurfuerspam.de> References: <20240128233249.32794-1-herdler@nurfuerspam.de> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:NqfoNDL9OqY4xoqUnq4gk5ePC7w/1EMdWm5IsIqLwO0glRUJCdD qqu6CtRRYO9dKX2PpWHXggF00ID8mqIEEC5c3wgFoNCmSKGPPjNrrcWtY0t0pAI7S6ZQbsQ U3ecPBbV1OK1YhC9h1PDIlwE1XExbIjO8Y3C+9QbLxwq9dcsSjn1Rak3p5josKSzOB2x3nh vbt8fc4xt6UGP9100K9Rg== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:gxt48r0+T1E=;fCP9/uN8wN2IB25mC/SqKXkGMX8 7zzFBojpPRLLkmcVUoEB+ssPCUHk1Dq1GeeHKImhlqTG9nxKSPAUUIh04BIqKiqgYmC/mgO1J RUALYkG/Pg6CsprkScYq2F6iWH+99Wu8RrbyhuSpVrK4eILLwxClCCrCBsEWp5fJvGr5o0+Cp EqpVMyirbjPvfC5trpGLVimCqcULSee22HbttoYOeQuSw4QM9tzny0G2AGBZOmIEYC+TQvpRA Xz2ulPdxjb2/CNz02IhOjAmCjTA7+qr/p9bq2uYr1GSb+srgPtBy4eRjGR/eCt2E0HSrK/fBL lpnJAZGBu+E86sLflLQ/HuoUG+2+7b5o11GkKBZ8o6WssvP6UeFE+525EpJpIfmeVzwsm8jx+ 3o0Sps+JLDQEZqYs3ZwBOAEzpuxltAlnVIlsYoUIUZc5zFMCeQoApY2+8Z7e1eys1C6dTlR53 sFaPI2Aen5kWjtOvJYLpl4efVYXlmKnpjy2IbH+jv8NLY8Ea48ugJYyRBgeRFLFssWlDYcOzq gwnRFfJpP0TLnYkRhLugl/6o354jZ271Rc/m3xbWIWk3FhK7mKFGMCEF7vtmmMHkDjhxrQ+zP OOiAkE5WZshi6qYmfDPoGqNd2wDwdsFOIUQCVQRZTa2SBmb4tRCmcXAvG3+Uycl8E9HC+HdFo QQl6auxkvreyKwUrEaXTb/vDVY/8zlrYigIvqvizY84tqQMApL/4WeejyLuCY7WtJAyvsMHxL /kuIm55iSEGYzjMQKQvPrBsh4Y2bDFWJN5tkPzR4FOrUmoHotgi8B+x9bb+OVPUinPoXYl7v5 vI52ppIleLPtHCcS83Vr3aanwd4fIoTig7gcvXHI7LsU5sRZqVRXuE3YBOk444CRgUSK9dEWJ nnhFyRof2Iyb1H1Ey692rie8dQg8rJb/vZn/z8M8N6bXNZ+eD817X8Z/ifrmXicv6eyPtqzcR iwdyM1vXxNaDW3d22pgxRLB5b64= The existing documentation of the legacy DVB Decoder API was incomplete. Revising the documentation, adding missing parts and arranging the documentation files new. This patch contains the documentation of the data types defined in video.h. Signed-off-by: Stefan Herdler --- Changes since v3: * Adjust title and description to better match existing documentation. [PATCH v3] ------------------------------------------------------------ Possibly left overs from DVD-API ? : video_attributes_t VIDEO_CAP_SPU VIDEO_CAP_NAVI VIDEO_CAP_CSS The only thing which is not in the documentation yet! Can probably removed from header file too. >> + >> +video_stream_source_t >> +--------------------- >> + >> +The video stream source is set through the `VIDEO_SELECT_SOURCE`_ call >> +and can take the following values, depending on whether we are replaying >> +from an internal (demuxer) or external (user write) source. >> + >> + >> +.. code-block:: c >> + >> + typedef enum { >> + VIDEO_SOURCE_DEMUX, /* Select the demux as the main source */ >> + VIDEO_SOURCE_MEMORY /* If this source is selected, the stream >> + comes from the user through the write >> + system call */ >> + } video_stream_source_t; > > FYI, this carries the same problem as the audio one: this API is problematic > for modern hardware that has multiple tuners and demuxers. Setting up > pipelines for audio and video decoding on modern hardware require a lot > more than just demux/memory. This kind of limitations are pretty well known for a while now, even to normal users. A good solution would be widely appreciated, I think. Well, but back to topic ... In case of the decoder we are are maybe lucky. One decoder with multiple demuxers should theoretically already be possible without any changes. The data fed to the decoder can be controlled by the PID filter output selection DMX_OUT_DECODER. There are existing multi tuner systems with one decoder controlled by this API, but I don't know whether they do it this way or not. A quick search wasn't very successful and at least the AV7110 should have a hardware PID filter. More detailed research has to be done there to answer the question. However this topic is not directly part of the decoder API and I'm running out of time, so I had to stop at this point. .../media/dvb/legacy_dvb_video.rst | 798 ++++++++++++++++++ 1 file changed, 798 insertions(+) create mode 100644 Documentation/userspace-api/media/dvb/legacy_dvb_video.rst -- 2.34.0 diff --git a/Documentation/userspace-api/media/dvb/legacy_dvb_video.rst b/Documentation/userspace-api/media/dvb/legacy_dvb_video.rst new file mode 100644 index 000000000000..165fd6005a07 --- /dev/null +++ b/Documentation/userspace-api/media/dvb/legacy_dvb_video.rst @@ -0,0 +1,798 @@ +.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later OR GPL-2.0 + +.. c:namespace:: dtv.legacy.video + +.. _dvb_video: + +================ +DVB Video Device +================ + +.. attention:: Do **not** use in new drivers! + See: :ref:`legacy_dvb_decoder_notes` + +The DVB video device controls the MPEG2 video decoder of the DVB +hardware. It can be accessed through ``/dev/dvb/adapter0/video0``. Data +types and ioctl definitions can be accessed by including +``linux/dvb/video.h`` in your application. + +Note that the DVB video device only controls decoding of the MPEG video +stream, not its presentation on the TV or computer screen. On PCs this +is typically handled by an associated video4linux device, e.g. +``/dev/video``, which allows scaling and defining output windows. + +Most DVB cards don’t have their own MPEG decoder, which results in the +omission of the audio and video device as well as the video4linux +device. + +These ioctls were also used by V4L2 to control MPEG decoders implemented +in V4L2. The use of these ioctls for that purpose has been made obsolete +and proper V4L2 ioctls or controls have been created to replace that +functionality. Use :ref:`V4L2 ioctls