From patchwork Mon Jul 17 02:04:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Herdler X-Patchwork-Id: 93217 Received: from vger.kernel.org ([23.128.96.18]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from ) id 1qLDcI-00HRbP-Iz; Mon, 17 Jul 2023 02:05:39 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230359AbjGQCFg (ORCPT + 1 other); Sun, 16 Jul 2023 22:05:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230342AbjGQCFe (ORCPT ); Sun, 16 Jul 2023 22:05:34 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B9D2E54 for ; Sun, 16 Jul 2023 19:05:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nurfuerspam.de; s=s31663417; t=1689559513; x=1690164313; i=herdler@nurfuerspam.de; bh=sZTEgP7BqvTzPt3tLwGoXfs/8ByTdpc5bJK1e4QRKUg=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=Lt1jF3LWTCCrjemLRBAkbpC8UK9PVBk7WQUkZ3nXbe+/cPClj5HxbtUZPdd7JCMOrjsUNS4 sGco9azoThAWtXZP5J/+SkFWCkCvsa3ZW8ZsTrg7t0x80wIa3M35+rrYhGcZ1XMblE6So4hdN cC/QMqXBA/lqG2IYOZNTna5UQLqwtKxWBmupMHledchbVDlkv5ktQFBm46Ls1lDGyyhcVvzfc hx6ViRDi1OJWOMiT9OjAo3zgM7pfDGyNhbk9cukdNHYRy80z8k6Mmv4976oesC70vu6tNbVYd w5cqGy4xWNiiVJEirR9P9Yfsm55Hc6DnkjF2gSkRSEeC//7Oc6tQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from astro.haus ([217.113.179.15]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MHXBp-1q8HBR3NnF-00DVHK; Mon, 17 Jul 2023 04:05:12 +0200 From: Stefan Herdler To: Mauro Carvalho Chehab Cc: Hans Verkuil , linux-media@vger.kernel.org, Tomasz Maciej Nowak , Corinna Vinschen , Soeren Moch Subject: [PATCH v3 5/6] Add documentation for video.h (data types) Date: Mon, 17 Jul 2023 04:04:45 +0200 Message-Id: <20230717020446.28877-6-herdler@nurfuerspam.de> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20230717020446.28877-1-herdler@nurfuerspam.de> References: <20230717020446.28877-1-herdler@nurfuerspam.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:TOh6xpxLGlcajBXqNbDVf8Lb32jOievJLj41KO8jl8kXTUypo3P ga9wEm40r55Dp/zzadz8q1Ke1C4kAHqztpSV1c1d9pPwLp+TPieqca9C4BcKXdPVGWP88j9 DK9+FHW+GXbvIwfZcGy+WvcpTE905WUk8OKiNONZSnavaDRqqxmL2j7Fj1i2qY+yJ/tRaN+ 62e18niOeteNJk3ykidlQ== UI-OutboundReport: notjunk:1;M01:P0:LbiRKAGihis=;yJdoHiNLgxVu4PqMpHhI2kxz0LH YCA1DPnex//Y5rdfXqrSTWZknYBbb4mFwNGOUJA0uLTlTFmAVpxL8EeatvMjurtFpsndJQIUU 6MZfRHihoRSnTQufHr88sNETO5hKUlyOGXN6PLoQjxiMlkKjje+yyEZdtZi00k85Ibo09KStx /i8rIeCKwGbCiqmpMWPkIste2eaIdySn2YOtpMP+kUc7gASxrSHgGTxaT2UBW0zZH3+yZ0WYq Y51LVhXNTT6poUqZH2eXDsxxJcQglUfv2qCjnpTqaJdc4YmSIMJdVP4NdElv8y+Lr8UUX3BPe dxQkjAfZKHGKvq+O/S2o+mmWrquWR4IRxRWGMbKnvb1vYMlnsT8X+cXwOeZ7yXZAn5xacVboS A7RsSbu/rhfjQ8mRD/rZM8mPYtvp5SnJuNODCpOBq2483dd5zIsOtaXITeTVI+t7Dkc+aNgz8 eQaUKFo045yoXNa93n8pAEb61p6UktRCoAvMrjG2mXOqRPBSGoNgR2UI7N/Scf5ZA/sSI8Bfv p0Ijcr4Q8Z5DlySrxGqTppGxCFETfnpGll/ptQo1TEsfPF1zgY05LDBtusQuWrgwU4L30pfCv 25WQTHVCTCOthGfdWNXzy/wIj2x1hCnrw6sC9u1I8XpsnweWeVVWeHoeDMxJ82gXOgvTlI06E I5kwsdvPNEXa8Yx7G6lS63Lfulp7WGYFNDMw7Q5anPxcaZMMrHXPCfbUsz5XM+vEeOSLizeY5 QVnoez7T6h+eRT3GJyaUDivsQKgZ4Qa9zUg5scGrFFW/1Q6UUzu8yQ83PXeLq0q4//KUk7DH/ kD6B4BgdbcHHBCOL0t1XMMDy06oGyzeC3V7ITzRHiHk87Nncj3YNaNDc9iVUmG0sDSvpaauJ1 Bo01Qjvv6v2ixR4D6aGlhlyt1ArzRewzEkrWYm6DsYDmu2h0ys69Ns1LLN4CwkdRZQIPOVmq4 oT0rktKnoe44/VKsOmRzxO2MbkM= X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,NO_DNS_FOR_FROM,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_ABUSE_SURBL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-LSpam-Score: -1.9 (-) X-LSpam-Report: No, score=-1.9 required=5.0 tests=BAYES_00=-1.9,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,RCVD_IN_DNSWL_MED=-2.3,URIBL_ABUSE_SURBL=1.25,URIBL_WS_SURBL=1.608 autolearn=no autolearn_force=no Add new documentation file for video.h Step 1: data types only Signed-off-by: Stefan Herdler --- Possibly left overs from DVD-API ? : video_attributes_t VIDEO_CAP_SPU VIDEO_CAP_NAVI VIDEO_CAP_CSS >> + >> +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. I remember some DVB-cards, where, due to hardware limitations, only a fraction of the tuners can be active simultaneously. The user had to chose the active tuners while loading the driver. Which is definitely not a ideal solution, because changing the reception path without reloading the driver isn't possible. A real 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. 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