Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'media-uapi' into docs-mw

Mauro says:

In the past, media used Docbook to generate documentation, together
with some logic to ensure that cross-references would match the
actual defined uAPI.

The rationale is that we wanted to automatically check for uAPI
documentation gaps.

The same logic was migrated to Sphinx. Back then, broken links
were reported. However, recent versions of it and/or changes at
conf.py disabled such checks.

The result is that several symbols are now not cross-referenced,
and we don't get warnings anymore when something breaks.

This series consist on 2 parts:

Part 1: extra patches to parse_data_structs.py and kernel_include.py;
Part 2: media documentation fixes.

+608 -324
+94 -16
Documentation/sphinx/kernel_include.py
··· 87 87 import re 88 88 import sys 89 89 90 + from difflib import get_close_matches 91 + 90 92 from docutils import io, nodes, statemachine 91 93 from docutils.statemachine import ViewList 92 94 from docutils.parsers.rst import Directive, directives ··· 106 104 107 105 RE_DOMAIN_REF = re.compile(r'\\ :(ref|c:type|c:func):`([^<`]+)(?:<([^>]+)>)?`\\') 108 106 RE_SIMPLE_REF = re.compile(r'`([^`]+)`') 107 + RE_LINENO_REF = re.compile(r'^\s*-\s+LINENO_(\d+):\s+(.*)') 108 + RE_SPLIT_DOMAIN = re.compile(r"(.*)\.(.*)") 109 109 110 110 def ErrorString(exc): # Shamelessly stolen from docutils 111 111 return f'{exc.__class__.__name}: {exc}' ··· 216 212 - a TOC table containing cross references. 217 213 """ 218 214 parser = ParseDataStructs() 219 - parser.parse_file(path) 220 215 221 216 if 'exception-file' in self.options: 222 217 source_dir = os.path.dirname(os.path.abspath( 223 218 self.state_machine.input_lines.source( 224 219 self.lineno - self.state_machine.input_offset - 1))) 225 220 exceptions_file = os.path.join(source_dir, self.options['exception-file']) 226 - parser.process_exceptions(exceptions_file) 221 + else: 222 + exceptions_file = None 223 + 224 + parser.parse_file(path, exceptions_file) 227 225 228 226 # Store references on a symbol dict to be used at check time 229 227 if 'warn-broken' in self.options: ··· 248 242 # TOC output is a ReST file, not a literal. So, we can add line 249 243 # numbers 250 244 251 - rawtext = parser.gen_toc() 252 - 253 - include_lines = statemachine.string2lines(rawtext, tab_width, 254 - convert_whitespace=True) 255 - 256 - # Append line numbers data 257 - 258 245 startline = self.options.get('start-line', None) 246 + endline = self.options.get('end-line', None) 247 + 248 + relpath = os.path.relpath(path, srctree) 259 249 260 250 result = ViewList() 261 - if startline and startline > 0: 262 - offset = startline - 1 263 - else: 264 - offset = 0 251 + for line in parser.gen_toc().split("\n"): 252 + match = RE_LINENO_REF.match(line) 253 + if not match: 254 + result.append(line, path) 255 + continue 265 256 266 - for ln, line in enumerate(include_lines, start=offset): 267 - result.append(line, path, ln) 257 + ln, ref = match.groups() 258 + ln = int(ln) 259 + 260 + # Filter line range if needed 261 + if startline and (ln < startline): 262 + continue 263 + 264 + if endline and (ln > endline): 265 + continue 266 + 267 + # Sphinx numerates starting with zero, but text editors 268 + # and other tools start from one 269 + realln = ln + 1 270 + result.append(f"- {ref}: {relpath}#{realln}", path, ln) 268 271 269 272 self.state_machine.insert_input(result, path) 270 273 ··· 403 388 # ============================================================================== 404 389 405 390 reported = set() 391 + DOMAIN_INFO = {} 392 + all_refs = {} 393 + 394 + def fill_domain_info(env): 395 + """ 396 + Get supported reference types for each Sphinx domain and C namespaces 397 + """ 398 + if DOMAIN_INFO: 399 + return 400 + 401 + for domain_name, domain_instance in env.domains.items(): 402 + try: 403 + object_types = list(domain_instance.object_types.keys()) 404 + DOMAIN_INFO[domain_name] = object_types 405 + except AttributeError: 406 + # Ignore domains that we can't retrieve object types, if any 407 + pass 408 + 409 + for domain in DOMAIN_INFO.keys(): 410 + domain_obj = env.get_domain(domain) 411 + for name, dispname, objtype, docname, anchor, priority in domain_obj.get_objects(): 412 + ref_name = name.lower() 413 + 414 + if domain == "c": 415 + if '.' in ref_name: 416 + ref_name = ref_name.split(".")[-1] 417 + 418 + if not ref_name in all_refs: 419 + all_refs[ref_name] = [] 420 + 421 + all_refs[ref_name].append(f"\t{domain}:{objtype}:`{name}` (from {docname})") 422 + 423 + def get_suggestions(app, env, node, 424 + original_target, original_domain, original_reftype): 425 + """Check if target exists in the other domain or with different reftypes.""" 426 + original_target = original_target.lower() 427 + 428 + # Remove namespace if present 429 + if original_domain == "c": 430 + if '.' in original_target: 431 + original_target = original_target.split(".")[-1] 432 + 433 + suggestions = [] 434 + 435 + # If name exists, propose exact name match on different domains 436 + if original_target in all_refs: 437 + return all_refs[original_target] 438 + 439 + # If not found, get a close match, using difflib. 440 + # Such method is based on Ratcliff-Obershelp Algorithm, which seeks 441 + # for a close match within a certain distance. We're using the defaults 442 + # here, e.g. cutoff=0.6, proposing 3 alternatives 443 + matches = get_close_matches(original_target, all_refs.keys()) 444 + for match in matches: 445 + suggestions += all_refs[match] 446 + 447 + return suggestions 406 448 407 449 def check_missing_refs(app, env, node, contnode): 408 450 """Check broken refs for the files it creates xrefs""" ··· 476 404 if node.source not in xref_files: 477 405 return None 478 406 407 + fill_domain_info(env) 408 + 479 409 target = node.get('reftarget', '') 480 410 domain = node.get('refdomain', 'std') 481 411 reftype = node.get('reftype', '') 482 412 483 - msg = f"can't link to: {domain}:{reftype}:: {target}" 413 + msg = f"Invalid xref: {domain}:{reftype}:`{target}`" 484 414 485 415 # Don't duplicate warnings 486 416 data = (node.source, msg) 487 417 if data in reported: 488 418 return None 489 419 reported.add(data) 420 + 421 + suggestions = get_suggestions(app, env, node, target, domain, reftype) 422 + if suggestions: 423 + msg += ". Possible alternatives:\n" + '\n'.join(suggestions) 490 424 491 425 logger.warning(msg, location=node, type='ref', subtype='missing') 492 426
+5 -3
Documentation/userspace-api/media/cec/cec-header.rst
··· 2 2 3 3 .. _cec_header: 4 4 5 - *************** 6 - CEC Header File 7 - *************** 5 + **************** 6 + CEC uAPI Symbols 7 + **************** 8 8 9 9 .. kernel-include:: include/uapi/linux/cec.h 10 10 :generate-cross-refs: 11 11 :exception-file: cec.h.rst.exceptions 12 + :toc: 13 + :warn-broken:
+3
Documentation/userspace-api/media/cec/cec.h.rst.exceptions
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 3 + # All symbols belong to CEC namespace 4 + namespace CEC 5 + 3 6 # Ignore header name 4 7 ignore define _CEC_UAPI_H 5 8
+39 -43
Documentation/userspace-api/media/dvb/dmx.h.rst.exceptions
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 3 + # All symbols belone to this namespace 4 + namespace DTV.dmx 5 + 3 6 # Ignore header name 4 7 ignore define _UAPI_DVBDMX_H_ 5 8 6 9 # Ignore limit constants 7 10 ignore define DMX_FILTER_SIZE 8 11 9 - # dmx_pes_type_t enum symbols 10 - replace enum dmx_ts_pes :c:type:`dmx_pes_type` 11 - replace symbol DMX_PES_AUDIO0 :c:type:`dmx_pes_type` 12 - replace symbol DMX_PES_VIDEO0 :c:type:`dmx_pes_type` 13 - replace symbol DMX_PES_TELETEXT0 :c:type:`dmx_pes_type` 14 - replace symbol DMX_PES_SUBTITLE0 :c:type:`dmx_pes_type` 15 - replace symbol DMX_PES_PCR0 :c:type:`dmx_pes_type` 16 - replace symbol DMX_PES_AUDIO1 :c:type:`dmx_pes_type` 17 - replace symbol DMX_PES_VIDEO1 :c:type:`dmx_pes_type` 18 - replace symbol DMX_PES_TELETEXT1 :c:type:`dmx_pes_type` 19 - replace symbol DMX_PES_SUBTITLE1 :c:type:`dmx_pes_type` 20 - replace symbol DMX_PES_PCR1 :c:type:`dmx_pes_type` 21 - replace symbol DMX_PES_AUDIO2 :c:type:`dmx_pes_type` 22 - replace symbol DMX_PES_VIDEO2 :c:type:`dmx_pes_type` 23 - replace symbol DMX_PES_TELETEXT2 :c:type:`dmx_pes_type` 24 - replace symbol DMX_PES_SUBTITLE2 :c:type:`dmx_pes_type` 25 - replace symbol DMX_PES_PCR2 :c:type:`dmx_pes_type` 26 - replace symbol DMX_PES_AUDIO3 :c:type:`dmx_pes_type` 27 - replace symbol DMX_PES_VIDEO3 :c:type:`dmx_pes_type` 28 - replace symbol DMX_PES_TELETEXT3 :c:type:`dmx_pes_type` 29 - replace symbol DMX_PES_SUBTITLE3 :c:type:`dmx_pes_type` 30 - replace symbol DMX_PES_PCR3 :c:type:`dmx_pes_type` 31 - replace symbol DMX_PES_OTHER :c:type:`dmx_pes_type` 12 + # dmx_ts_pes_type_t enum symbols 13 + replace symbol DMX_PES_AUDIO0 :c:type:`DTV.dmx.dmx_ts_pes` 14 + replace symbol DMX_PES_VIDEO0 :c:type:`DTV.dmx.dmx_ts_pes` 15 + replace symbol DMX_PES_TELETEXT0 :c:type:`DTV.dmx.dmx_ts_pes` 16 + replace symbol DMX_PES_SUBTITLE0 :c:type:`DTV.dmx.dmx_ts_pes` 17 + replace symbol DMX_PES_PCR0 :c:type:`DTV.dmx.dmx_ts_pes` 18 + replace symbol DMX_PES_AUDIO1 :c:type:`DTV.dmx.dmx_ts_pes` 19 + replace symbol DMX_PES_VIDEO1 :c:type:`DTV.dmx.dmx_ts_pes` 20 + replace symbol DMX_PES_TELETEXT1 :c:type:`DTV.dmx.dmx_ts_pes` 21 + replace symbol DMX_PES_SUBTITLE1 :c:type:`DTV.dmx.dmx_ts_pes` 22 + replace symbol DMX_PES_PCR1 :c:type:`DTV.dmx.dmx_ts_pes` 23 + replace symbol DMX_PES_AUDIO2 :c:type:`DTV.dmx.dmx_ts_pes` 24 + replace symbol DMX_PES_VIDEO2 :c:type:`DTV.dmx.dmx_ts_pes` 25 + replace symbol DMX_PES_TELETEXT2 :c:type:`DTV.dmx.dmx_ts_pes` 26 + replace symbol DMX_PES_SUBTITLE2 :c:type:`DTV.dmx.dmx_ts_pes` 27 + replace symbol DMX_PES_PCR2 :c:type:`DTV.dmx.dmx_ts_pes` 28 + replace symbol DMX_PES_AUDIO3 :c:type:`DTV.dmx.dmx_ts_pes` 29 + replace symbol DMX_PES_VIDEO3 :c:type:`DTV.dmx.dmx_ts_pes` 30 + replace symbol DMX_PES_TELETEXT3 :c:type:`DTV.dmx.dmx_ts_pes` 31 + replace symbol DMX_PES_SUBTITLE3 :c:type:`DTV.dmx.dmx_ts_pes` 32 + replace symbol DMX_PES_PCR3 :c:type:`DTV.dmx.dmx_ts_pes` 33 + replace symbol DMX_PES_OTHER :c:type:`DTV.dmx.dmx_ts_pes` 32 34 33 35 # Ignore obsolete symbols 34 36 ignore define DMX_PES_AUDIO ··· 40 38 ignore define DMX_PES_PCR 41 39 42 40 # dmx_input_t symbols 43 - replace enum dmx_input :c:type:`dmx_input` 44 - replace symbol DMX_IN_FRONTEND :c:type:`dmx_input` 45 - replace symbol DMX_IN_DVR :c:type:`dmx_input` 41 + replace symbol DMX_IN_FRONTEND :c:enum:`DTV.dmx.dmx_input` 42 + replace symbol DMX_IN_DVR :c:enum:`DTV.dmx.dmx_input` 46 43 47 44 # Flags for struct dmx_sct_filter_params 48 - replace define DMX_CHECK_CRC :c:type:`dmx_sct_filter_params` 49 - replace define DMX_ONESHOT :c:type:`dmx_sct_filter_params` 50 - replace define DMX_IMMEDIATE_START :c:type:`dmx_sct_filter_params` 45 + replace define DMX_CHECK_CRC :c:type:`DTV.dmx.dmx_sct_filter_params` 46 + replace define DMX_ONESHOT :c:type:`DTV.dmx.dmx_sct_filter_params` 47 + replace define DMX_IMMEDIATE_START :c:type:`DTV.dmx.dmx_sct_filter_params` 51 48 52 - # some typedefs should point to struct/enums 53 - replace typedef dmx_filter_t :c:type:`dmx_filter` 54 - replace typedef dmx_pes_type_t :c:type:`dmx_pes_type` 55 - replace typedef dmx_input_t :c:type:`dmx_input` 49 + replace symbol DMX_BUFFER_FLAG_HAD_CRC32_DISCARD :c:type:`DTV.dmx.dmx_buffer_flags` 50 + replace symbol DMX_BUFFER_FLAG_TEI :c:type:`DTV.dmx.dmx_buffer_flags` 51 + replace symbol DMX_BUFFER_PKT_COUNTER_MISMATCH :c:type:`DTV.dmx.dmx_buffer_flags` 52 + replace symbol DMX_BUFFER_FLAG_DISCONTINUITY_DETECTED :c:type:`DTV.dmx.dmx_buffer_flags` 53 + replace symbol DMX_BUFFER_FLAG_DISCONTINUITY_INDICATOR :c:type:`DTV.dmx.dmx_buffer_flags` 56 54 57 - replace symbol DMX_BUFFER_FLAG_HAD_CRC32_DISCARD :c:type:`dmx_buffer_flags` 58 - replace symbol DMX_BUFFER_FLAG_TEI :c:type:`dmx_buffer_flags` 59 - replace symbol DMX_BUFFER_PKT_COUNTER_MISMATCH :c:type:`dmx_buffer_flags` 60 - replace symbol DMX_BUFFER_FLAG_DISCONTINUITY_DETECTED :c:type:`dmx_buffer_flags` 61 - replace symbol DMX_BUFFER_FLAG_DISCONTINUITY_INDICATOR :c:type:`dmx_buffer_flags` 62 - 63 - replace symbol DMX_OUT_DECODER :c:type:`dmx_output` 64 - replace symbol DMX_OUT_TAP :c:type:`dmx_output` 65 - replace symbol DMX_OUT_TS_TAP :c:type:`dmx_output` 66 - replace symbol DMX_OUT_TSDEMUX_TAP :c:type:`dmx_output` 55 + replace symbol DMX_OUT_DECODER :c:type:`DTV.dmx.dmx_output` 56 + replace symbol DMX_OUT_TAP :c:type:`DTV.dmx.dmx_output` 57 + replace symbol DMX_OUT_TS_TAP :c:type:`DTV.dmx.dmx_output` 58 + replace symbol DMX_OUT_TSDEMUX_TAP :c:type:`DTV.dmx.dmx_output` 67 59 68 60 replace ioctl DMX_DQBUF dmx_qbuf
+1
Documentation/userspace-api/media/dvb/dmx_types.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.dmx 2 3 3 4 .. _dmx_types: 4 5
+3 -2
Documentation/userspace-api/media/dvb/frontend.h.rst.exceptions
··· 28 28 ignore define DTV_IOCTL_MAX_MSGS 29 29 30 30 # the same reference is used for both get and set ioctls 31 - replace ioctl FE_SET_PROPERTY :c:type:`FE_GET_PROPERTY` 31 + replace ioctl FE_SET_PROPERTY :ref:`FE_GET_PROPERTY` 32 + replace ioctl FE_GET_PROPERTY :ref:`FE_GET_PROPERTY` 32 33 33 34 # Typedefs that use the enum reference 34 35 replace typedef fe_sec_voltage_t :c:type:`fe_sec_voltage` 35 36 36 37 # Replaces for flag constants 37 - replace define FE_TUNE_MODE_ONESHOT :c:func:`FE_SET_FRONTEND_TUNE_MODE` 38 + replace define FE_TUNE_MODE_ONESHOT :ref:`FE_SET_FRONTEND_TUNE_MODE` 38 39 replace define LNA_AUTO dtv-lna 39 40 replace define NO_STREAM_ID_FILTER dtv-stream-id 40 41
+26 -5
Documentation/userspace-api/media/dvb/headers.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 2 3 - **************************** 4 - Digital TV uAPI header files 5 - **************************** 6 - 7 - Digital TV uAPI headers 8 3 *********************** 4 + Digital TV uAPI symbols 5 + *********************** 6 + 7 + .. contents:: Table of Contents 8 + :depth: 2 9 + :local: 10 + 11 + Frontend 12 + ======== 9 13 10 14 .. kernel-include:: include/uapi/linux/dvb/frontend.h 11 15 :generate-cross-refs: 12 16 :exception-file: frontend.h.rst.exceptions 17 + :toc: 18 + :warn-broken: 19 + 20 + Demux 21 + ===== 13 22 14 23 .. kernel-include:: include/uapi/linux/dvb/dmx.h 15 24 :generate-cross-refs: 16 25 :exception-file: dmx.h.rst.exceptions 26 + :toc: 27 + :warn-broken: 28 + 29 + Conditional Access 30 + ================== 17 31 18 32 .. kernel-include:: include/uapi/linux/dvb/ca.h 19 33 :generate-cross-refs: 20 34 :exception-file: ca.h.rst.exceptions 35 + :toc: 36 + :warn-broken: 37 + 38 + Network 39 + ======= 21 40 22 41 .. kernel-include:: include/uapi/linux/dvb/net.h 23 42 :generate-cross-refs: 24 43 :exception-file: net.h.rst.exceptions 44 + :toc: 45 + :warn-broken: 25 46
+5 -3
Documentation/userspace-api/media/mediactl/media-header.rst
··· 2 2 3 3 .. _media_header: 4 4 5 - **************************** 6 - Media Controller Header File 7 - **************************** 5 + ***************************** 6 + Media controller uAPI symbols 7 + ***************************** 8 8 9 9 .. kernel-include:: include/uapi/linux/media.h 10 10 :generate-cross-refs: 11 11 :exception-file: media.h.rst.exceptions 12 + :toc: 13 + :warn-broken:
+3
Documentation/userspace-api/media/mediactl/media.h.rst.exceptions
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 3 + # All symbols are mapped inside MC C domain namespace 4 + namespace MC 5 + 3 6 # Ignore header name 4 7 ignore define __LINUX_MEDIA_H 5 8
+11 -3
Documentation/userspace-api/media/rc/lirc-header.rst
··· 2 2 3 3 .. _lirc_header: 4 4 5 - **************** 6 - LIRC Header File 7 - **************** 5 + ***************** 6 + LIRC uAPI symbols 7 + ***************** 8 + 9 + .. contents:: Table of Contents 10 + :depth: 2 11 + :local: 12 + 13 + 8 14 9 15 .. kernel-include:: include/uapi/linux/lirc.h 10 16 :generate-cross-refs: 11 17 :exception-file: lirc.h.rst.exceptions 18 + :toc: 19 + :warn-broken: 12 20
+1
Documentation/userspace-api/media/v4l/app-pri.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _app-pri: 4 5
+1
Documentation/userspace-api/media/v4l/audio.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _audio: 4 5
+1
Documentation/userspace-api/media/v4l/biblio.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 ********** 4 5 References
+2
Documentation/userspace-api/media/v4l/buffer.rst
··· 667 667 exposure of the frame has begun. This is only valid for the 668 668 ``V4L2_BUF_TYPE_VIDEO_CAPTURE`` buffer type. 669 669 670 + .. c:enum:: v4l2_memory 671 + 670 672 .. raw:: latex 671 673 672 674 \normalsize
+1
Documentation/userspace-api/media/v4l/capture-example.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _capture-example: 4 5
+1
Documentation/userspace-api/media/v4l/capture.c.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 file: media/v4l/capture.c 4 5 =========================
+1
Documentation/userspace-api/media/v4l/colorspaces-defs.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 **************************** 4 5 Defining Colorspaces in V4L2
+1
Documentation/userspace-api/media/v4l/colorspaces-details.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 ******************************** 4 5 Detailed Colorspace Descriptions
+1
Documentation/userspace-api/media/v4l/colorspaces.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _colorspaces: 4 5
+1
Documentation/userspace-api/media/v4l/common-defs.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _common-defs: 4 5
+1
Documentation/userspace-api/media/v4l/common.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _common: 4 5
+1
Documentation/userspace-api/media/v4l/compat.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _compat: 4 5
+1
Documentation/userspace-api/media/v4l/control.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _control: 4 5
+1
Documentation/userspace-api/media/v4l/crop.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _crop: 4 5
+1
Documentation/userspace-api/media/v4l/depth-formats.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _depth-formats: 4 5
+1
Documentation/userspace-api/media/v4l/dev-decoder.rst
··· 1 1 .. SPDX-License-Identifier: GPL-2.0 2 + .. c:namespace:: V4L 2 3 3 4 .. _decoder: 4 5
+1
Documentation/userspace-api/media/v4l/dev-encoder.rst
··· 1 1 .. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _encoder: 4 5
+1
Documentation/userspace-api/media/v4l/dev-event.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _event: 4 5
+1
Documentation/userspace-api/media/v4l/dev-mem2mem.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _mem2mem: 4 5
+1
Documentation/userspace-api/media/v4l/dev-meta.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _metadata: 4 5
+1
Documentation/userspace-api/media/v4l/dev-osd.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _osd: 4 5
+1
Documentation/userspace-api/media/v4l/dev-overlay.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _overlay: 4 5
+1
Documentation/userspace-api/media/v4l/dev-radio.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _radio: 4 5
+1
Documentation/userspace-api/media/v4l/dev-sdr.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _sdr: 4 5
+1
Documentation/userspace-api/media/v4l/dev-stateless-decoder.rst
··· 1 1 .. SPDX-License-Identifier: GPL-2.0 2 + .. c:namespace:: V4L 2 3 3 4 .. _stateless_decoder: 4 5
+1
Documentation/userspace-api/media/v4l/dev-subdev.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _subdev: 4 5
+1
Documentation/userspace-api/media/v4l/dev-touch.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _touch: 4 5
+1
Documentation/userspace-api/media/v4l/devices.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _devices: 4 5
+1
Documentation/userspace-api/media/v4l/dv-timings.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _dv-timings: 4 5
+1
Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _camera-controls: 4 5
+1
Documentation/userspace-api/media/v4l/ext-ctrls-codec-stateless.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _codec-stateless-controls: 4 5
+1
Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _codec-controls: 4 5
+1
Documentation/userspace-api/media/v4l/ext-ctrls-colorimetry.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _colorimetry-controls: 4 5
+1
Documentation/userspace-api/media/v4l/ext-ctrls-detect.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _detect-controls: 4 5
+1
Documentation/userspace-api/media/v4l/ext-ctrls-dv.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _dv-controls: 4 5
+1
Documentation/userspace-api/media/v4l/ext-ctrls-flash.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _flash-controls: 4 5
+1
Documentation/userspace-api/media/v4l/ext-ctrls-fm-rx.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _fm-rx-controls: 4 5
+1
Documentation/userspace-api/media/v4l/ext-ctrls-fm-tx.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _fm-tx-controls: 4 5
+1
Documentation/userspace-api/media/v4l/ext-ctrls-image-process.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _image-process-controls: 4 5
+1
Documentation/userspace-api/media/v4l/ext-ctrls-image-source.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _image-source-controls: 4 5
+1
Documentation/userspace-api/media/v4l/ext-ctrls-jpeg.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _jpeg-controls: 4 5
+1
Documentation/userspace-api/media/v4l/ext-ctrls-rf-tuner.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _rf-tuner-controls: 4 5
+1
Documentation/userspace-api/media/v4l/extended-controls.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _extended-controls: 4 5
+1
Documentation/userspace-api/media/v4l/field-order.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _field-order: 4 5
+1
Documentation/userspace-api/media/v4l/fourcc.rst
··· 1 1 .. SPDX-License-Identifier: GPL-2.0 2 + .. c:namespace:: V4L 2 3 3 4 Guidelines for Video4Linux pixel format 4CCs 4 5 ============================================
+1
Documentation/userspace-api/media/v4l/hsv-formats.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _hsv-formats: 4 5
+1
Documentation/userspace-api/media/v4l/libv4l.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _libv4l: 4 5
+1
Documentation/userspace-api/media/v4l/meta-formats.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _meta-formats: 4 5
+1
Documentation/userspace-api/media/v4l/metafmt-c3-isp.rst
··· 1 1 .. SPDX-License-Identifier: (GPL-2.0-only OR MIT) 2 + .. c:namespace:: V4L 2 3 3 4 .. _v4l2-meta-fmt-c3isp-stats: 4 5 .. _v4l2-meta-fmt-c3isp-params:
+1
Documentation/userspace-api/media/v4l/metafmt-d4xx.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _v4l2-meta-fmt-d4xx: 4 5
+1
Documentation/userspace-api/media/v4l/metafmt-generic.rst
··· 1 1 .. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 ******************************************************************************************************************************************************************************************************************************************************************************** 4 5 V4L2_META_FMT_GENERIC_8 ('MET8'), V4L2_META_FMT_GENERIC_CSI2_10 ('MC1A'), V4L2_META_FMT_GENERIC_CSI2_12 ('MC1C'), V4L2_META_FMT_GENERIC_CSI2_14 ('MC1E'), V4L2_META_FMT_GENERIC_CSI2_16 ('MC1G'), V4L2_META_FMT_GENERIC_CSI2_20 ('MC1K'), V4L2_META_FMT_GENERIC_CSI2_24 ('MC1O')
+1
Documentation/userspace-api/media/v4l/metafmt-intel-ipu3.rst
··· 1 1 .. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _v4l2-meta-fmt-params: 4 5 .. _v4l2-meta-fmt-stat-3a:
+1
Documentation/userspace-api/media/v4l/metafmt-pisp-be.rst
··· 1 1 .. SPDX-License-Identifier: GPL-2.0 2 + .. c:namespace:: V4L 2 3 3 4 .. _v4l2-meta-fmt-rpi-be-cfg: 4 5
+1
Documentation/userspace-api/media/v4l/metafmt-pisp-fe.rst
··· 1 1 .. SPDX-License-Identifier: GPL-2.0 2 + .. c:namespace:: V4L 2 3 3 4 .. _v4l2-meta-fmt-rpi-fe-cfg: 4 5
+1
Documentation/userspace-api/media/v4l/metafmt-rkisp1.rst
··· 1 1 .. SPDX-License-Identifier: GPL-2.0 2 + .. c:namespace:: V4L 2 3 3 4 .. _v4l2-meta-fmt-rk-isp1-stat-3a: 4 5
+1
Documentation/userspace-api/media/v4l/metafmt-uvc.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _v4l2-meta-fmt-uvc: 4 5
+1
Documentation/userspace-api/media/v4l/metafmt-vivid.rst
··· 1 1 .. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _v4l2-meta-fmt-vivid: 4 5
+1
Documentation/userspace-api/media/v4l/metafmt-vsp1-hgo.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _v4l2-meta-fmt-vsp1-hgo: 4 5
+1
Documentation/userspace-api/media/v4l/metafmt-vsp1-hgt.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _v4l2-meta-fmt-vsp1-hgt: 4 5
+1
Documentation/userspace-api/media/v4l/pixfmt-bayer.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _pixfmt-bayer: 4 5
+1
Documentation/userspace-api/media/v4l/pixfmt-cnf4.rst
··· 1 1 .. -*- coding: utf-8; mode: rst -*- 2 + .. c:namespace:: V4L 2 3 3 4 .. _V4L2-PIX-FMT-CNF4: 4 5
+1
Documentation/userspace-api/media/v4l/pixfmt-compressed.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 ****************** 4 5 Compressed Formats
+1
Documentation/userspace-api/media/v4l/pixfmt-indexed.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _pixfmt-indexed: 4 5
+1
Documentation/userspace-api/media/v4l/pixfmt-intro.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 ********************** 4 5 Standard Image Formats
+1
Documentation/userspace-api/media/v4l/pixfmt-inzi.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _V4L2-PIX-FMT-INZI: 4 5
+1
Documentation/userspace-api/media/v4l/pixfmt-m420.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _V4L2-PIX-FMT-M420: 4 5
+1
Documentation/userspace-api/media/v4l/pixfmt-packed-hsv.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _packed-hsv: 4 5
+1
Documentation/userspace-api/media/v4l/pixfmt-packed-yuv.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _packed-yuv: 4 5
+1
Documentation/userspace-api/media/v4l/pixfmt-reserved.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _pixfmt-reserved: 4 5
+1
Documentation/userspace-api/media/v4l/pixfmt-rgb.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _pixfmt-rgb: 4 5
+1
Documentation/userspace-api/media/v4l/pixfmt-sdr-cs08.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _v4l2-sdr-fmt-cs8: 4 5
+1
Documentation/userspace-api/media/v4l/pixfmt-sdr-cs14le.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _V4L2-SDR-FMT-CS14LE: 4 5
+1
Documentation/userspace-api/media/v4l/pixfmt-sdr-cu08.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _v4l2-sdr-fmt-cu8: 4 5
+1
Documentation/userspace-api/media/v4l/pixfmt-sdr-cu16le.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _V4L2-SDR-FMT-CU16LE: 4 5
+1
Documentation/userspace-api/media/v4l/pixfmt-sdr-pcu16be.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _V4L2-SDR-FMT-PCU16BE: 4 5
+1
Documentation/userspace-api/media/v4l/pixfmt-sdr-pcu18be.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _V4L2-SDR-FMT-PCU18BE: 4 5
+1
Documentation/userspace-api/media/v4l/pixfmt-sdr-pcu20be.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _V4L2-SDR-FMT-PCU20BE: 4 5
+1
Documentation/userspace-api/media/v4l/pixfmt-sdr-ru12le.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _V4L2-SDR-FMT-RU12LE: 4 5
+1
Documentation/userspace-api/media/v4l/pixfmt-srggb10-ipu3.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _v4l2-pix-fmt-ipu3-sbggr10: 4 5 .. _v4l2-pix-fmt-ipu3-sgbrg10:
+1
Documentation/userspace-api/media/v4l/pixfmt-srggb10.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _V4L2-PIX-FMT-SRGGB10: 4 5 .. _v4l2-pix-fmt-sbggr10:
+1
Documentation/userspace-api/media/v4l/pixfmt-srggb10alaw8.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _V4L2-PIX-FMT-SBGGR10ALAW8: 4 5 .. _v4l2-pix-fmt-sgbrg10alaw8:
+1
Documentation/userspace-api/media/v4l/pixfmt-srggb10dpcm8.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _V4L2-PIX-FMT-SBGGR10DPCM8: 4 5 .. _v4l2-pix-fmt-sgbrg10dpcm8:
+1
Documentation/userspace-api/media/v4l/pixfmt-srggb10p.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _V4L2-PIX-FMT-SRGGB10P: 4 5 .. _v4l2-pix-fmt-sbggr10p:
+1
Documentation/userspace-api/media/v4l/pixfmt-srggb12.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _V4L2-PIX-FMT-SRGGB12: 4 5 .. _v4l2-pix-fmt-sbggr12:
+1
Documentation/userspace-api/media/v4l/pixfmt-srggb12p.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _V4L2-PIX-FMT-SRGGB12P: 4 5 .. _v4l2-pix-fmt-sbggr12p:
+1
Documentation/userspace-api/media/v4l/pixfmt-srggb14.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _V4L2-PIX-FMT-SRGGB14: 4 5 .. _v4l2-pix-fmt-sbggr14:
+1
Documentation/userspace-api/media/v4l/pixfmt-srggb14p.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _V4L2-PIX-FMT-SRGGB14P: 4 5 .. _v4l2-pix-fmt-sbggr14p:
+1
Documentation/userspace-api/media/v4l/pixfmt-srggb16.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _V4L2-PIX-FMT-SRGGB16: 4 5 .. _v4l2-pix-fmt-sbggr16:
+1
Documentation/userspace-api/media/v4l/pixfmt-srggb8-pisp-comp.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _v4l2-pix-fmt-pisp-comp1-rggb: 4 5 .. _v4l2-pix-fmt-pisp-comp1-grbg:
+1
Documentation/userspace-api/media/v4l/pixfmt-srggb8.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _V4L2-PIX-FMT-SRGGB8: 4 5 .. _v4l2-pix-fmt-sbggr8:
+1
Documentation/userspace-api/media/v4l/pixfmt-tch-td08.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _V4L2-TCH-FMT-DELTA-TD08: 4 5
+1
Documentation/userspace-api/media/v4l/pixfmt-tch-td16.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _V4L2-TCH-FMT-DELTA-TD16: 4 5
+1
Documentation/userspace-api/media/v4l/pixfmt-tch-tu08.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _V4L2-TCH-FMT-TU08: 4 5
+1
Documentation/userspace-api/media/v4l/pixfmt-tch-tu16.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _V4L2-TCH-FMT-TU16: 4 5
+1
Documentation/userspace-api/media/v4l/pixfmt-uv8.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _V4L2-PIX-FMT-UV8: 4 5
+1
Documentation/userspace-api/media/v4l/pixfmt-v4l2-mplane.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 ****************************** 4 5 Multi-planar format structures
+1
Documentation/userspace-api/media/v4l/pixfmt-v4l2.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 ****************************** 4 5 Single-planar format structure
+1
Documentation/userspace-api/media/v4l/pixfmt-y12i.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _V4L2-PIX-FMT-Y12I: 4 5
+1
Documentation/userspace-api/media/v4l/pixfmt-y16i.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _V4L2-PIX-FMT-Y16I: 4 5
+1
Documentation/userspace-api/media/v4l/pixfmt-y8i.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _V4L2-PIX-FMT-Y8I: 4 5
+1
Documentation/userspace-api/media/v4l/pixfmt-yuv-luma.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _yuv-luma-only: 4 5
+1
Documentation/userspace-api/media/v4l/pixfmt-yuv-planar.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. planar-yuv: 4 5
+1
Documentation/userspace-api/media/v4l/pixfmt-z16.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _V4L2-PIX-FMT-Z16: 4 5
+1
Documentation/userspace-api/media/v4l/pixfmt.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _pixfmt: 4 5
+1
Documentation/userspace-api/media/v4l/planar-apis.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _planar-apis: 4 5
+1
Documentation/userspace-api/media/v4l/querycap.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _querycap: 4 5
+1
Documentation/userspace-api/media/v4l/sdr-formats.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _sdr-formats: 4 5
+1
Documentation/userspace-api/media/v4l/selection-api-configuration.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 ************* 4 5 Configuration
+1
Documentation/userspace-api/media/v4l/selection-api-examples.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 ******** 4 5 Examples
+1
Documentation/userspace-api/media/v4l/selection-api-intro.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 ************ 4 5 Introduction
+1
Documentation/userspace-api/media/v4l/selection-api-targets.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 ***************** 4 5 Selection targets
+1
Documentation/userspace-api/media/v4l/selection-api-vs-crop-api.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _selection-vs-crop: 4 5
+1
Documentation/userspace-api/media/v4l/selection-api.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _selection-api: 4 5
+1
Documentation/userspace-api/media/v4l/selections-common.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _v4l2-selections-common: 4 5
+1
Documentation/userspace-api/media/v4l/standard.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _standard: 4 5
+1
Documentation/userspace-api/media/v4l/subdev-formats.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _v4l2-mbus-format: 4 5
+1
Documentation/userspace-api/media/v4l/tch-formats.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _tch-formats: 4 5
+1
Documentation/userspace-api/media/v4l/tuner.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _tuner: 4 5
+1
Documentation/userspace-api/media/v4l/user-func.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _user-func: 4 5
+1
Documentation/userspace-api/media/v4l/v4l2-selection-flags.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _v4l2-selection-flags: 4 5
+1
Documentation/userspace-api/media/v4l/v4l2-selection-targets.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _v4l2-selection-targets: 4 5
+1
Documentation/userspace-api/media/v4l/v4l2.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 .. include:: <isonum.txt> 3 4 4 5 .. _v4l2spec:
+1
Documentation/userspace-api/media/v4l/v4l2grab-example.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _v4l2grab-example: 4 5
+1
Documentation/userspace-api/media/v4l/v4l2grab.c.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 file: media/v4l/v4l2grab.c 4 5 ==========================
+1
Documentation/userspace-api/media/v4l/video.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _video: 4 5
+6 -3
Documentation/userspace-api/media/v4l/videodev.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _videodev: 4 5 5 - ******************************* 6 - Video For Linux Two Header File 7 - ******************************* 6 + *************************************** 7 + Video For Linux Two Header uAPI Symbols 8 + *************************************** 8 9 9 10 .. kernel-include:: include/uapi/linux/videodev2.h 10 11 :generate-cross-refs: 11 12 :exception-file: videodev2.h.rst.exceptions 13 + :toc: 14 + :warn-broken:
+146 -142
Documentation/userspace-api/media/v4l/videodev2.h.rst.exceptions
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 3 + # All symbols are mapped inside V4L C domain namespace 4 + namespace V4L 5 + 3 6 # Ignore header name 4 7 ignore define _UAPI__LINUX_VIDEODEV2_H 5 8 ··· 18 15 ignore symbol V4L2_BUF_TYPE_PRIVATE 19 16 ignore symbol V4L2_TUNER_DIGITAL_TV 20 17 ignore symbol V4L2_COLORSPACE_BT878 18 + ignore struct __kernel_v4l2_timeval 21 19 22 20 # Documented enum v4l2_field 23 - replace symbol V4L2_FIELD_ALTERNATE :c:type:`v4l2_field` 24 - replace symbol V4L2_FIELD_ANY :c:type:`v4l2_field` 25 - replace symbol V4L2_FIELD_BOTTOM :c:type:`v4l2_field` 26 - replace symbol V4L2_FIELD_INTERLACED :c:type:`v4l2_field` 27 - replace symbol V4L2_FIELD_INTERLACED_BT :c:type:`v4l2_field` 28 - replace symbol V4L2_FIELD_INTERLACED_TB :c:type:`v4l2_field` 29 - replace symbol V4L2_FIELD_NONE :c:type:`v4l2_field` 30 - replace symbol V4L2_FIELD_SEQ_BT :c:type:`v4l2_field` 31 - replace symbol V4L2_FIELD_SEQ_TB :c:type:`v4l2_field` 32 - replace symbol V4L2_FIELD_TOP :c:type:`v4l2_field` 21 + replace symbol V4L2_FIELD_ALTERNATE :c:type:`V4L.v4l2_field` 22 + replace symbol V4L2_FIELD_ANY :c:type:`V4L.v4l2_field` 23 + replace symbol V4L2_FIELD_BOTTOM :c:type:`V4L.v4l2_field` 24 + replace symbol V4L2_FIELD_INTERLACED :c:type:`V4L.v4l2_field` 25 + replace symbol V4L2_FIELD_INTERLACED_BT :c:type:`V4L.v4l2_field` 26 + replace symbol V4L2_FIELD_INTERLACED_TB :c:type:`V4L.v4l2_field` 27 + replace symbol V4L2_FIELD_NONE :c:type:`V4L.v4l2_field` 28 + replace symbol V4L2_FIELD_SEQ_BT :c:type:`V4L.v4l2_field` 29 + replace symbol V4L2_FIELD_SEQ_TB :c:type:`V4L.v4l2_field` 30 + replace symbol V4L2_FIELD_TOP :c:type:`V4L.v4l2_field` 33 31 34 32 # Documented enum v4l2_buf_type 35 - replace symbol V4L2_BUF_TYPE_META_CAPTURE :c:type:`v4l2_buf_type` 36 - replace symbol V4L2_BUF_TYPE_META_OUTPUT :c:type:`v4l2_buf_type` 37 - replace symbol V4L2_BUF_TYPE_SDR_CAPTURE :c:type:`v4l2_buf_type` 38 - replace symbol V4L2_BUF_TYPE_SDR_OUTPUT :c:type:`v4l2_buf_type` 39 - replace symbol V4L2_BUF_TYPE_SLICED_VBI_CAPTURE :c:type:`v4l2_buf_type` 40 - replace symbol V4L2_BUF_TYPE_SLICED_VBI_OUTPUT :c:type:`v4l2_buf_type` 41 - replace symbol V4L2_BUF_TYPE_VBI_CAPTURE :c:type:`v4l2_buf_type` 42 - replace symbol V4L2_BUF_TYPE_VBI_OUTPUT :c:type:`v4l2_buf_type` 43 - replace symbol V4L2_BUF_TYPE_VIDEO_CAPTURE :c:type:`v4l2_buf_type` 44 - replace symbol V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE :c:type:`v4l2_buf_type` 45 - replace symbol V4L2_BUF_TYPE_VIDEO_OUTPUT :c:type:`v4l2_buf_type` 46 - replace symbol V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE :c:type:`v4l2_buf_type` 47 - replace symbol V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY :c:type:`v4l2_buf_type` 48 - replace symbol V4L2_BUF_TYPE_VIDEO_OVERLAY :c:type:`v4l2_buf_type` 33 + replace symbol V4L2_BUF_TYPE_META_CAPTURE :c:type:`V4L.v4l2_buf_type` 34 + replace symbol V4L2_BUF_TYPE_META_OUTPUT :c:type:`V4L.v4l2_buf_type` 35 + replace symbol V4L2_BUF_TYPE_SDR_CAPTURE :c:type:`V4L.v4l2_buf_type` 36 + replace symbol V4L2_BUF_TYPE_SDR_OUTPUT :c:type:`V4L.v4l2_buf_type` 37 + replace symbol V4L2_BUF_TYPE_SLICED_VBI_CAPTURE :c:type:`V4L.v4l2_buf_type` 38 + replace symbol V4L2_BUF_TYPE_SLICED_VBI_OUTPUT :c:type:`V4L.v4l2_buf_type` 39 + replace symbol V4L2_BUF_TYPE_VBI_CAPTURE :c:type:`V4L.v4l2_buf_type` 40 + replace symbol V4L2_BUF_TYPE_VBI_OUTPUT :c:type:`V4L.v4l2_buf_type` 41 + replace symbol V4L2_BUF_TYPE_VIDEO_CAPTURE :c:type:`V4L.v4l2_buf_type` 42 + replace symbol V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE :c:type:`V4L.v4l2_buf_type` 43 + replace symbol V4L2_BUF_TYPE_VIDEO_OUTPUT :c:type:`V4L.v4l2_buf_type` 44 + replace symbol V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE :c:type:`V4L.v4l2_buf_type` 45 + replace symbol V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY :c:type:`V4L.v4l2_buf_type` 46 + replace symbol V4L2_BUF_TYPE_VIDEO_OVERLAY :c:type:`V4L.v4l2_buf_type` 49 47 50 48 # Documented enum v4l2_tuner_type 51 - replace symbol V4L2_TUNER_ANALOG_TV :c:type:`v4l2_tuner_type` 52 - replace symbol V4L2_TUNER_RADIO :c:type:`v4l2_tuner_type` 53 - replace symbol V4L2_TUNER_RF :c:type:`v4l2_tuner_type` 54 - replace symbol V4L2_TUNER_SDR :c:type:`v4l2_tuner_type` 49 + replace symbol V4L2_TUNER_ANALOG_TV :c:type:`V4L.v4l2_tuner_type` 50 + replace symbol V4L2_TUNER_RADIO :c:type:`V4L.v4l2_tuner_type` 51 + replace symbol V4L2_TUNER_RF :c:type:`V4L.v4l2_tuner_type` 52 + replace symbol V4L2_TUNER_SDR :c:type:`V4L.v4l2_tuner_type` 55 53 56 54 # Documented enum v4l2_memory 57 - replace symbol V4L2_MEMORY_DMABUF :c:type:`v4l2_memory` 58 - replace symbol V4L2_MEMORY_MMAP :c:type:`v4l2_memory` 59 - replace symbol V4L2_MEMORY_OVERLAY :c:type:`v4l2_memory` 60 - replace symbol V4L2_MEMORY_USERPTR :c:type:`v4l2_memory` 55 + replace symbol V4L2_MEMORY_DMABUF :c:type:`V4L.v4l2_memory` 56 + replace symbol V4L2_MEMORY_MMAP :c:type:`V4L.v4l2_memory` 57 + replace symbol V4L2_MEMORY_OVERLAY :c:type:`V4L.v4l2_memory` 58 + replace symbol V4L2_MEMORY_USERPTR :c:type:`V4L.v4l2_memory` 61 59 62 60 # Documented enum v4l2_colorspace 63 - replace symbol V4L2_COLORSPACE_470_SYSTEM_BG :c:type:`v4l2_colorspace` 64 - replace symbol V4L2_COLORSPACE_470_SYSTEM_M :c:type:`v4l2_colorspace` 65 - replace symbol V4L2_COLORSPACE_OPRGB :c:type:`v4l2_colorspace` 66 - replace define V4L2_COLORSPACE_ADOBERGB :c:type:`v4l2_colorspace` 67 - replace symbol V4L2_COLORSPACE_BT2020 :c:type:`v4l2_colorspace` 68 - replace symbol V4L2_COLORSPACE_DCI_P3 :c:type:`v4l2_colorspace` 69 - replace symbol V4L2_COLORSPACE_DEFAULT :c:type:`v4l2_colorspace` 70 - replace symbol V4L2_COLORSPACE_JPEG :c:type:`v4l2_colorspace` 71 - replace symbol V4L2_COLORSPACE_RAW :c:type:`v4l2_colorspace` 72 - replace symbol V4L2_COLORSPACE_REC709 :c:type:`v4l2_colorspace` 73 - replace symbol V4L2_COLORSPACE_SMPTE170M :c:type:`v4l2_colorspace` 74 - replace symbol V4L2_COLORSPACE_SMPTE240M :c:type:`v4l2_colorspace` 75 - replace symbol V4L2_COLORSPACE_SRGB :c:type:`v4l2_colorspace` 76 - replace symbol V4L2_COLORSPACE_LAST :c:type:`v4l2_colorspace` 61 + replace symbol V4L2_COLORSPACE_470_SYSTEM_BG :c:type:`V4L.v4l2_colorspace` 62 + replace symbol V4L2_COLORSPACE_470_SYSTEM_M :c:type:`V4L.v4l2_colorspace` 63 + replace symbol V4L2_COLORSPACE_OPRGB :c:type:`V4L.v4l2_colorspace` 64 + replace define V4L2_COLORSPACE_ADOBERGB :c:type:`V4L.v4l2_colorspace` 65 + replace symbol V4L2_COLORSPACE_BT2020 :c:type:`V4L.v4l2_colorspace` 66 + replace symbol V4L2_COLORSPACE_DCI_P3 :c:type:`V4L.v4l2_colorspace` 67 + replace symbol V4L2_COLORSPACE_DEFAULT :c:type:`V4L.v4l2_colorspace` 68 + replace symbol V4L2_COLORSPACE_JPEG :c:type:`V4L.v4l2_colorspace` 69 + replace symbol V4L2_COLORSPACE_RAW :c:type:`V4L.v4l2_colorspace` 70 + replace symbol V4L2_COLORSPACE_REC709 :c:type:`V4L.v4l2_colorspace` 71 + replace symbol V4L2_COLORSPACE_SMPTE170M :c:type:`V4L.v4l2_colorspace` 72 + replace symbol V4L2_COLORSPACE_SMPTE240M :c:type:`V4L.v4l2_colorspace` 73 + replace symbol V4L2_COLORSPACE_SRGB :c:type:`V4L.v4l2_colorspace` 74 + replace symbol V4L2_COLORSPACE_LAST :c:type:`V4L.v4l2_colorspace` 77 75 78 76 # Documented enum v4l2_xfer_func 79 - replace symbol V4L2_XFER_FUNC_709 :c:type:`v4l2_xfer_func` 80 - replace symbol V4L2_XFER_FUNC_OPRGB :c:type:`v4l2_xfer_func` 81 - replace define V4L2_XFER_FUNC_ADOBERGB :c:type:`v4l2_xfer_func` 82 - replace symbol V4L2_XFER_FUNC_DCI_P3 :c:type:`v4l2_xfer_func` 83 - replace symbol V4L2_XFER_FUNC_DEFAULT :c:type:`v4l2_xfer_func` 84 - replace symbol V4L2_XFER_FUNC_NONE :c:type:`v4l2_xfer_func` 85 - replace symbol V4L2_XFER_FUNC_SMPTE2084 :c:type:`v4l2_xfer_func` 86 - replace symbol V4L2_XFER_FUNC_SMPTE240M :c:type:`v4l2_xfer_func` 87 - replace symbol V4L2_XFER_FUNC_SRGB :c:type:`v4l2_xfer_func` 88 - replace symbol V4L2_XFER_FUNC_LAST :c:type:`v4l2_xfer_func` 77 + replace symbol V4L2_XFER_FUNC_709 :c:type:`V4L.v4l2_xfer_func` 78 + replace symbol V4L2_XFER_FUNC_OPRGB :c:type:`V4L.v4l2_xfer_func` 79 + replace define V4L2_XFER_FUNC_ADOBERGB :c:type:`V4L.v4l2_xfer_func` 80 + replace symbol V4L2_XFER_FUNC_DCI_P3 :c:type:`V4L.v4l2_xfer_func` 81 + replace symbol V4L2_XFER_FUNC_DEFAULT :c:type:`V4L.v4l2_xfer_func` 82 + replace symbol V4L2_XFER_FUNC_NONE :c:type:`V4L.v4l2_xfer_func` 83 + replace symbol V4L2_XFER_FUNC_SMPTE2084 :c:type:`V4L.v4l2_xfer_func` 84 + replace symbol V4L2_XFER_FUNC_SMPTE240M :c:type:`V4L.v4l2_xfer_func` 85 + replace symbol V4L2_XFER_FUNC_SRGB :c:type:`V4L.v4l2_xfer_func` 86 + replace symbol V4L2_XFER_FUNC_LAST :c:type:`V4L.v4l2_xfer_func` 89 87 90 88 # Documented enum v4l2_ycbcr_encoding 91 - replace symbol V4L2_YCBCR_ENC_601 :c:type:`v4l2_ycbcr_encoding` 92 - replace symbol V4L2_YCBCR_ENC_709 :c:type:`v4l2_ycbcr_encoding` 93 - replace symbol V4L2_YCBCR_ENC_BT2020 :c:type:`v4l2_ycbcr_encoding` 94 - replace symbol V4L2_YCBCR_ENC_BT2020_CONST_LUM :c:type:`v4l2_ycbcr_encoding` 95 - replace symbol V4L2_YCBCR_ENC_DEFAULT :c:type:`v4l2_ycbcr_encoding` 96 - replace symbol V4L2_YCBCR_ENC_SYCC :c:type:`v4l2_ycbcr_encoding` 97 - replace symbol V4L2_YCBCR_ENC_XV601 :c:type:`v4l2_ycbcr_encoding` 98 - replace symbol V4L2_YCBCR_ENC_XV709 :c:type:`v4l2_ycbcr_encoding` 99 - replace symbol V4L2_YCBCR_ENC_SMPTE240M :c:type:`v4l2_ycbcr_encoding` 100 - replace symbol V4L2_YCBCR_ENC_LAST :c:type:`v4l2_ycbcr_encoding` 89 + replace symbol V4L2_YCBCR_ENC_601 :c:type:`V4L.v4l2_ycbcr_encoding` 90 + replace symbol V4L2_YCBCR_ENC_709 :c:type:`V4L.v4l2_ycbcr_encoding` 91 + replace symbol V4L2_YCBCR_ENC_BT2020 :c:type:`V4L.v4l2_ycbcr_encoding` 92 + replace symbol V4L2_YCBCR_ENC_BT2020_CONST_LUM :c:type:`V4L.v4l2_ycbcr_encoding` 93 + replace symbol V4L2_YCBCR_ENC_DEFAULT :c:type:`V4L.v4l2_ycbcr_encoding` 94 + replace symbol V4L2_YCBCR_ENC_SYCC :c:type:`V4L.v4l2_ycbcr_encoding` 95 + replace symbol V4L2_YCBCR_ENC_XV601 :c:type:`V4L.v4l2_ycbcr_encoding` 96 + replace symbol V4L2_YCBCR_ENC_XV709 :c:type:`V4L.v4l2_ycbcr_encoding` 97 + replace symbol V4L2_YCBCR_ENC_SMPTE240M :c:type:`V4L.v4l2_ycbcr_encoding` 98 + replace symbol V4L2_YCBCR_ENC_LAST :c:type:`V4L.v4l2_ycbcr_encoding` 101 99 102 100 # Documented enum v4l2_hsv_encoding 103 - replace symbol V4L2_HSV_ENC_180 :c:type:`v4l2_hsv_encoding` 104 - replace symbol V4L2_HSV_ENC_256 :c:type:`v4l2_hsv_encoding` 101 + replace symbol V4L2_HSV_ENC_180 :c:type:`V4L.v4l2_hsv_encoding` 102 + replace symbol V4L2_HSV_ENC_256 :c:type:`V4L.v4l2_hsv_encoding` 105 103 106 104 # Documented enum v4l2_quantization 107 - replace symbol V4L2_QUANTIZATION_DEFAULT :c:type:`v4l2_quantization` 108 - replace symbol V4L2_QUANTIZATION_FULL_RANGE :c:type:`v4l2_quantization` 109 - replace symbol V4L2_QUANTIZATION_LIM_RANGE :c:type:`v4l2_quantization` 105 + replace symbol V4L2_QUANTIZATION_DEFAULT :c:type:`V4L.v4l2_quantization` 106 + replace symbol V4L2_QUANTIZATION_FULL_RANGE :c:type:`V4L.v4l2_quantization` 107 + replace symbol V4L2_QUANTIZATION_LIM_RANGE :c:type:`V4L.v4l2_quantization` 110 108 111 109 # Documented enum v4l2_priority 112 - replace symbol V4L2_PRIORITY_BACKGROUND :c:type:`v4l2_priority` 113 - replace symbol V4L2_PRIORITY_DEFAULT :c:type:`v4l2_priority` 114 - replace symbol V4L2_PRIORITY_INTERACTIVE :c:type:`v4l2_priority` 115 - replace symbol V4L2_PRIORITY_RECORD :c:type:`v4l2_priority` 116 - replace symbol V4L2_PRIORITY_UNSET :c:type:`v4l2_priority` 110 + replace symbol V4L2_PRIORITY_BACKGROUND :c:type:`V4L.v4l2_priority` 111 + replace symbol V4L2_PRIORITY_DEFAULT :c:type:`V4L.v4l2_priority` 112 + replace symbol V4L2_PRIORITY_INTERACTIVE :c:type:`V4L.v4l2_priority` 113 + replace symbol V4L2_PRIORITY_RECORD :c:type:`V4L.v4l2_priority` 114 + replace symbol V4L2_PRIORITY_UNSET :c:type:`V4L.v4l2_priority` 117 115 118 116 # Documented enum v4l2_frmsizetypes 119 - replace symbol V4L2_FRMSIZE_TYPE_CONTINUOUS :c:type:`v4l2_frmsizetypes` 120 - replace symbol V4L2_FRMSIZE_TYPE_DISCRETE :c:type:`v4l2_frmsizetypes` 121 - replace symbol V4L2_FRMSIZE_TYPE_STEPWISE :c:type:`v4l2_frmsizetypes` 117 + replace symbol V4L2_FRMSIZE_TYPE_CONTINUOUS :c:type:`V4L.v4l2_frmsizetypes` 118 + replace symbol V4L2_FRMSIZE_TYPE_DISCRETE :c:type:`V4L.v4l2_frmsizetypes` 119 + replace symbol V4L2_FRMSIZE_TYPE_STEPWISE :c:type:`V4L.v4l2_frmsizetypes` 122 120 123 121 # Documented enum frmivaltypes 124 - replace symbol V4L2_FRMIVAL_TYPE_CONTINUOUS :c:type:`v4l2_frmivaltypes` 125 - replace symbol V4L2_FRMIVAL_TYPE_DISCRETE :c:type:`v4l2_frmivaltypes` 126 - replace symbol V4L2_FRMIVAL_TYPE_STEPWISE :c:type:`v4l2_frmivaltypes` 122 + replace symbol V4L2_FRMIVAL_TYPE_CONTINUOUS :c:type:`V4L.v4l2_frmivaltypes` 123 + replace symbol V4L2_FRMIVAL_TYPE_DISCRETE :c:type:`V4L.v4l2_frmivaltypes` 124 + replace symbol V4L2_FRMIVAL_TYPE_STEPWISE :c:type:`V4L.v4l2_frmivaltypes` 127 125 128 - # Documented enum :c:type:`v4l2_ctrl_type` 126 + # Documented enum :c:type:`V4L.v4l2_ctrl_type` 129 127 replace symbol V4L2_CTRL_COMPOUND_TYPES vidioc_queryctrl 130 128 131 - replace symbol V4L2_CTRL_TYPE_BITMASK :c:type:`v4l2_ctrl_type` 132 - replace symbol V4L2_CTRL_TYPE_BOOLEAN :c:type:`v4l2_ctrl_type` 133 - replace symbol V4L2_CTRL_TYPE_BUTTON :c:type:`v4l2_ctrl_type` 134 - replace symbol V4L2_CTRL_TYPE_CTRL_CLASS :c:type:`v4l2_ctrl_type` 135 - replace symbol V4L2_CTRL_TYPE_INTEGER :c:type:`v4l2_ctrl_type` 136 - replace symbol V4L2_CTRL_TYPE_INTEGER64 :c:type:`v4l2_ctrl_type` 137 - replace symbol V4L2_CTRL_TYPE_INTEGER_MENU :c:type:`v4l2_ctrl_type` 138 - replace symbol V4L2_CTRL_TYPE_MENU :c:type:`v4l2_ctrl_type` 139 - replace symbol V4L2_CTRL_TYPE_STRING :c:type:`v4l2_ctrl_type` 140 - replace symbol V4L2_CTRL_TYPE_U16 :c:type:`v4l2_ctrl_type` 141 - replace symbol V4L2_CTRL_TYPE_U32 :c:type:`v4l2_ctrl_type` 142 - replace symbol V4L2_CTRL_TYPE_U8 :c:type:`v4l2_ctrl_type` 143 - replace symbol V4L2_CTRL_TYPE_MPEG2_SEQUENCE :c:type:`v4l2_ctrl_type` 144 - replace symbol V4L2_CTRL_TYPE_MPEG2_PICTURE :c:type:`v4l2_ctrl_type` 145 - replace symbol V4L2_CTRL_TYPE_MPEG2_QUANTISATION :c:type:`v4l2_ctrl_type` 146 - replace symbol V4L2_CTRL_TYPE_H264_SPS :c:type:`v4l2_ctrl_type` 147 - replace symbol V4L2_CTRL_TYPE_H264_PPS :c:type:`v4l2_ctrl_type` 148 - replace symbol V4L2_CTRL_TYPE_H264_SCALING_MATRIX :c:type:`v4l2_ctrl_type` 149 - replace symbol V4L2_CTRL_TYPE_H264_PRED_WEIGHTS :c:type:`v4l2_ctrl_type` 150 - replace symbol V4L2_CTRL_TYPE_H264_SLICE_PARAMS :c:type:`v4l2_ctrl_type` 151 - replace symbol V4L2_CTRL_TYPE_H264_DECODE_PARAMS :c:type:`v4l2_ctrl_type` 152 - replace symbol V4L2_CTRL_TYPE_HEVC_SPS :c:type:`v4l2_ctrl_type` 153 - replace symbol V4L2_CTRL_TYPE_HEVC_PPS :c:type:`v4l2_ctrl_type` 154 - replace symbol V4L2_CTRL_TYPE_HEVC_SLICE_PARAMS :c:type:`v4l2_ctrl_type` 155 - replace symbol V4L2_CTRL_TYPE_AREA :c:type:`v4l2_ctrl_type` 156 - replace symbol V4L2_CTRL_TYPE_RECT :c:type:`v4l2_ctrl_type` 157 - replace symbol V4L2_CTRL_TYPE_FWHT_PARAMS :c:type:`v4l2_ctrl_type` 158 - replace symbol V4L2_CTRL_TYPE_VP8_FRAME :c:type:`v4l2_ctrl_type` 159 - replace symbol V4L2_CTRL_TYPE_VP9_COMPRESSED_HDR :c:type:`v4l2_ctrl_type` 160 - replace symbol V4L2_CTRL_TYPE_VP9_FRAME :c:type:`v4l2_ctrl_type` 161 - replace symbol V4L2_CTRL_TYPE_HDR10_CLL_INFO :c:type:`v4l2_ctrl_type` 162 - replace symbol V4L2_CTRL_TYPE_HDR10_MASTERING_DISPLAY :c:type:`v4l2_ctrl_type` 163 - replace symbol V4L2_CTRL_TYPE_HEVC_SPS :c:type:`v4l2_ctrl_type` 164 - replace symbol V4L2_CTRL_TYPE_HEVC_PPS :c:type:`v4l2_ctrl_type` 165 - replace symbol V4L2_CTRL_TYPE_HEVC_SLICE_PARAMS :c:type:`v4l2_ctrl_type` 166 - replace symbol V4L2_CTRL_TYPE_HEVC_SCALING_MATRIX :c:type:`v4l2_ctrl_type` 167 - replace symbol V4L2_CTRL_TYPE_HEVC_DECODE_PARAMS :c:type:`v4l2_ctrl_type` 168 - replace symbol V4L2_CTRL_TYPE_AV1_SEQUENCE :c:type:`v4l2_ctrl_type` 169 - replace symbol V4L2_CTRL_TYPE_AV1_TILE_GROUP_ENTRY :c:type:`v4l2_ctrl_type` 170 - replace symbol V4L2_CTRL_TYPE_AV1_FRAME :c:type:`v4l2_ctrl_type` 171 - replace symbol V4L2_CTRL_TYPE_AV1_FILM_GRAIN :c:type:`v4l2_ctrl_type` 129 + replace symbol V4L2_CTRL_TYPE_BITMASK :c:type:`V4L.v4l2_ctrl_type` 130 + replace symbol V4L2_CTRL_TYPE_BOOLEAN :c:type:`V4L.v4l2_ctrl_type` 131 + replace symbol V4L2_CTRL_TYPE_BUTTON :c:type:`V4L.v4l2_ctrl_type` 132 + replace symbol V4L2_CTRL_TYPE_CTRL_CLASS :c:type:`V4L.v4l2_ctrl_type` 133 + replace symbol V4L2_CTRL_TYPE_INTEGER :c:type:`V4L.v4l2_ctrl_type` 134 + replace symbol V4L2_CTRL_TYPE_INTEGER64 :c:type:`V4L.v4l2_ctrl_type` 135 + replace symbol V4L2_CTRL_TYPE_INTEGER_MENU :c:type:`V4L.v4l2_ctrl_type` 136 + replace symbol V4L2_CTRL_TYPE_MENU :c:type:`V4L.v4l2_ctrl_type` 137 + replace symbol V4L2_CTRL_TYPE_STRING :c:type:`V4L.v4l2_ctrl_type` 138 + replace symbol V4L2_CTRL_TYPE_U16 :c:type:`V4L.v4l2_ctrl_type` 139 + replace symbol V4L2_CTRL_TYPE_U32 :c:type:`V4L.v4l2_ctrl_type` 140 + replace symbol V4L2_CTRL_TYPE_U8 :c:type:`V4L.v4l2_ctrl_type` 141 + replace symbol V4L2_CTRL_TYPE_MPEG2_SEQUENCE :c:type:`V4L.v4l2_ctrl_type` 142 + replace symbol V4L2_CTRL_TYPE_MPEG2_PICTURE :c:type:`V4L.v4l2_ctrl_type` 143 + replace symbol V4L2_CTRL_TYPE_MPEG2_QUANTISATION :c:type:`V4L.v4l2_ctrl_type` 144 + replace symbol V4L2_CTRL_TYPE_H264_SPS :c:type:`V4L.v4l2_ctrl_type` 145 + replace symbol V4L2_CTRL_TYPE_H264_PPS :c:type:`V4L.v4l2_ctrl_type` 146 + replace symbol V4L2_CTRL_TYPE_H264_SCALING_MATRIX :c:type:`V4L.v4l2_ctrl_type` 147 + replace symbol V4L2_CTRL_TYPE_H264_PRED_WEIGHTS :c:type:`V4L.v4l2_ctrl_type` 148 + replace symbol V4L2_CTRL_TYPE_H264_SLICE_PARAMS :c:type:`V4L.v4l2_ctrl_type` 149 + replace symbol V4L2_CTRL_TYPE_H264_DECODE_PARAMS :c:type:`V4L.v4l2_ctrl_type` 150 + replace symbol V4L2_CTRL_TYPE_HEVC_SPS :c:type:`V4L.v4l2_ctrl_type` 151 + replace symbol V4L2_CTRL_TYPE_HEVC_PPS :c:type:`V4L.v4l2_ctrl_type` 152 + replace symbol V4L2_CTRL_TYPE_HEVC_SLICE_PARAMS :c:type:`V4L.v4l2_ctrl_type` 153 + replace symbol V4L2_CTRL_TYPE_AREA :c:type:`V4L.v4l2_ctrl_type` 154 + replace symbol V4L2_CTRL_TYPE_RECT :c:type:`V4L.v4l2_ctrl_type` 155 + replace symbol V4L2_CTRL_TYPE_FWHT_PARAMS :c:type:`V4L.v4l2_ctrl_type` 156 + replace symbol V4L2_CTRL_TYPE_VP8_FRAME :c:type:`V4L.v4l2_ctrl_type` 157 + replace symbol V4L2_CTRL_TYPE_VP9_COMPRESSED_HDR :c:type:`V4L.v4l2_ctrl_type` 158 + replace symbol V4L2_CTRL_TYPE_VP9_FRAME :c:type:`V4L.v4l2_ctrl_type` 159 + replace symbol V4L2_CTRL_TYPE_HDR10_CLL_INFO :c:type:`V4L.v4l2_ctrl_type` 160 + replace symbol V4L2_CTRL_TYPE_HDR10_MASTERING_DISPLAY :c:type:`V4L.v4l2_ctrl_type` 161 + replace symbol V4L2_CTRL_TYPE_HEVC_SPS :c:type:`V4L.v4l2_ctrl_type` 162 + replace symbol V4L2_CTRL_TYPE_HEVC_PPS :c:type:`V4L.v4l2_ctrl_type` 163 + replace symbol V4L2_CTRL_TYPE_HEVC_SLICE_PARAMS :c:type:`V4L.v4l2_ctrl_type` 164 + replace symbol V4L2_CTRL_TYPE_HEVC_SCALING_MATRIX :c:type:`V4L.v4l2_ctrl_type` 165 + replace symbol V4L2_CTRL_TYPE_HEVC_DECODE_PARAMS :c:type:`V4L.v4l2_ctrl_type` 166 + replace symbol V4L2_CTRL_TYPE_AV1_SEQUENCE :c:type:`V4L.v4l2_ctrl_type` 167 + replace symbol V4L2_CTRL_TYPE_AV1_TILE_GROUP_ENTRY :c:type:`V4L.v4l2_ctrl_type` 168 + replace symbol V4L2_CTRL_TYPE_AV1_FRAME :c:type:`V4L.v4l2_ctrl_type` 169 + replace symbol V4L2_CTRL_TYPE_AV1_FILM_GRAIN :c:type:`V4L.v4l2_ctrl_type` 172 170 173 171 # V4L2 capability defines 174 172 replace define V4L2_CAP_VIDEO_CAPTURE device-capabilities ··· 205 201 replace define V4L2_CAP_EDID device-capabilities 206 202 207 203 # V4L2 pix flags 208 - replace define V4L2_PIX_FMT_PRIV_MAGIC :c:type:`v4l2_pix_format` 204 + replace define V4L2_PIX_FMT_PRIV_MAGIC :c:type:`V4L.v4l2_pix_format` 209 205 replace define V4L2_PIX_FMT_FLAG_PREMUL_ALPHA format-flags 210 - replace define V4L2_PIX_FMT_HM12 :c:type:`v4l2_pix_format` 211 - replace define V4L2_PIX_FMT_SUNXI_TILED_NV12 :c:type:`v4l2_pix_format` 206 + replace define V4L2_PIX_FMT_HM12 :c:type:`V4L.v4l2_pix_format` 207 + replace define V4L2_PIX_FMT_SUNXI_TILED_NV12 :c:type:`V4L.v4l2_pix_format` 212 208 213 209 # V4L2 format flags 214 210 replace define V4L2_FMT_FLAG_COMPRESSED fmtdesc-flags ··· 267 263 # Used on VIDIOC_G_PARM 268 264 269 265 replace define V4L2_MODE_HIGHQUALITY parm-flags 270 - replace define V4L2_CAP_TIMEPERFRAME :c:type:`v4l2_captureparm` 266 + replace define V4L2_CAP_TIMEPERFRAME :c:type:`V4L.v4l2_captureparm` 271 267 272 268 # The V4L2_STD_foo are all defined at v4l2_std_id table 273 269 ··· 320 316 321 317 # V4L2 DT BT timings definitions 322 318 323 - replace define V4L2_DV_PROGRESSIVE :c:type:`v4l2_bt_timings` 324 - replace define V4L2_DV_INTERLACED :c:type:`v4l2_bt_timings` 319 + replace define V4L2_DV_PROGRESSIVE :c:type:`V4L.v4l2_bt_timings` 320 + replace define V4L2_DV_INTERLACED :c:type:`V4L.v4l2_bt_timings` 325 321 326 - replace define V4L2_DV_VSYNC_POS_POL :c:type:`v4l2_bt_timings` 327 - replace define V4L2_DV_HSYNC_POS_POL :c:type:`v4l2_bt_timings` 322 + replace define V4L2_DV_VSYNC_POS_POL :c:type:`V4L.v4l2_bt_timings` 323 + replace define V4L2_DV_HSYNC_POS_POL :c:type:`V4L.v4l2_bt_timings` 328 324 329 325 replace define V4L2_DV_BT_STD_CEA861 dv-bt-standards 330 326 replace define V4L2_DV_BT_STD_DMT dv-bt-standards ··· 460 456 461 457 # MPEG 462 458 463 - replace define V4L2_ENC_IDX_FRAME_I :c:type:`v4l2_enc_idx` 464 - replace define V4L2_ENC_IDX_FRAME_P :c:type:`v4l2_enc_idx` 465 - replace define V4L2_ENC_IDX_FRAME_B :c:type:`v4l2_enc_idx` 466 - replace define V4L2_ENC_IDX_FRAME_MASK :c:type:`v4l2_enc_idx` 467 - replace define V4L2_ENC_IDX_ENTRIES :c:type:`v4l2_enc_idx` 459 + replace define V4L2_ENC_IDX_FRAME_I :c:type:`V4L.v4l2_enc_idx` 460 + replace define V4L2_ENC_IDX_FRAME_P :c:type:`V4L.v4l2_enc_idx` 461 + replace define V4L2_ENC_IDX_FRAME_B :c:type:`V4L.v4l2_enc_idx` 462 + replace define V4L2_ENC_IDX_FRAME_MASK :c:type:`V4L.v4l2_enc_idx` 463 + replace define V4L2_ENC_IDX_ENTRIES :c:type:`V4L.v4l2_enc_idx` 468 464 469 465 replace define V4L2_ENC_CMD_START encoder-cmds 470 466 replace define V4L2_ENC_CMD_STOP encoder-cmds ··· 492 488 replace define V4L2_VBI_UNSYNC vbifmt-flags 493 489 replace define V4L2_VBI_INTERLACED vbifmt-flags 494 490 495 - replace define V4L2_VBI_ITU_525_F1_START :c:type:`v4l2_vbi_format` 496 - replace define V4L2_VBI_ITU_525_F2_START :c:type:`v4l2_vbi_format` 497 - replace define V4L2_VBI_ITU_625_F1_START :c:type:`v4l2_vbi_format` 498 - replace define V4L2_VBI_ITU_625_F2_START :c:type:`v4l2_vbi_format` 491 + replace define V4L2_VBI_ITU_525_F1_START :c:type:`V4L.v4l2_vbi_format` 492 + replace define V4L2_VBI_ITU_525_F2_START :c:type:`V4L.v4l2_vbi_format` 493 + replace define V4L2_VBI_ITU_625_F1_START :c:type:`V4L.v4l2_vbi_format` 494 + replace define V4L2_VBI_ITU_625_F2_START :c:type:`V4L.v4l2_vbi_format` 499 495 500 496 501 497 replace define V4L2_SLICED_TELETEXT_B vbi-services ··· 531 527 532 528 replace define V4L2_EVENT_SRC_CH_RESOLUTION src-changes-flags 533 529 534 - replace define V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ :c:type:`v4l2_event_motion_det` 530 + replace define V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ :c:type:`V4L.v4l2_event_motion_det` 535 531 536 532 replace define V4L2_EVENT_SUB_FL_SEND_INITIAL event-flags 537 533 replace define V4L2_EVENT_SUB_FL_ALLOW_FEEDBACK event-flags
+8
Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst
··· 15 15 Synopsis 16 16 ======== 17 17 18 + .. c:macro:: VIDIOC_QUERY_CTRL 19 + 18 20 ``int ioctl(int fd, int VIDIOC_QUERYCTRL, struct v4l2_queryctrl *argp)`` 19 21 20 22 .. c:macro:: VIDIOC_QUERY_EXT_CTRL ··· 100 98 101 99 .. _v4l2-queryctrl: 102 100 101 + .. c:struct:: v4l2_queryctrl 102 + 103 103 .. cssclass:: longtable 104 104 105 105 .. flat-table:: struct v4l2_queryctrl ··· 181 177 .. _v4l2-query-ext-ctrl: 182 178 183 179 .. cssclass:: longtable 180 + 181 + .. c:struct:: v4l2_query_ext_ctrl 184 182 185 183 .. flat-table:: struct v4l2_query_ext_ctrl 186 184 :header-rows: 0 ··· 281 275 .. tabularcolumns:: |p{1.2cm}|p{3.0cm}|p{13.1cm}| 282 276 283 277 .. _v4l2-querymenu: 278 + 279 + .. c:struct:: v4l2_querymenu 284 280 285 281 .. flat-table:: struct v4l2_querymenu 286 282 :header-rows: 0
+1
Documentation/userspace-api/media/v4l/yuv-formats.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _yuv-formats: 4 5
+130 -100
tools/docs/lib/parse_data_structs.py
··· 53 53 54 54 replace <type> <old_symbol> <new_reference> 55 55 56 - Replaces how old_symbol with a new reference. The new_reference can be: 56 + Replaces how old_symbol with a new reference. The new_reference can be: 57 + 57 58 - A simple symbol name; 58 59 - A full Sphinx reference. 59 60 60 - On both cases, <type> can be: 61 + 3. Namespace rules 62 + 63 + namespace <namespace> 64 + 65 + Sets C namespace to be used during cross-reference generation. Can 66 + be overridden by replace rules. 67 + 68 + On ignore and replace rules, <type> can be: 61 69 - ioctl: for defines that end with _IO*, e.g. ioctl definitions 62 70 - define: for other defines 63 71 - symbol: for symbols defined within enums; ··· 79 71 ignore ioctl VIDIOC_ENUM_FMT 80 72 replace ioctl VIDIOC_DQBUF vidioc_qbuf 81 73 replace define V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ :c:type:`v4l2_event_motion_det` 74 + 75 + namespace MC 82 76 """ 83 77 84 78 # Parser regexes with multiple ways to capture enums and structs ··· 150 140 151 141 self.symbols = {} 152 142 143 + self.namespace = None 144 + self.ignore = [] 145 + self.replace = [] 146 + 153 147 for symbol_type in self.DEF_SYMBOL_TYPES: 154 148 self.symbols[symbol_type] = {} 155 149 156 - def store_type(self, symbol_type: str, symbol: str, 150 + def read_exceptions(self, fname: str): 151 + if not fname: 152 + return 153 + 154 + name = os.path.basename(fname) 155 + 156 + with open(fname, "r", encoding="utf-8", errors="backslashreplace") as f: 157 + for ln, line in enumerate(f): 158 + ln += 1 159 + line = line.strip() 160 + if not line or line.startswith("#"): 161 + continue 162 + 163 + # ignore rules 164 + match = re.match(r"^ignore\s+(\w+)\s+(\S+)", line) 165 + 166 + if match: 167 + self.ignore.append((ln, match.group(1), match.group(2))) 168 + continue 169 + 170 + # replace rules 171 + match = re.match(r"^replace\s+(\S+)\s+(\S+)\s+(\S+)", line) 172 + if match: 173 + self.replace.append((ln, match.group(1), match.group(2), 174 + match.group(3))) 175 + continue 176 + 177 + match = re.match(r"^namespace\s+(\S+)", line) 178 + if match: 179 + self.namespace = match.group(1) 180 + continue 181 + 182 + sys.exit(f"{name}:{ln}: invalid line: {line}") 183 + 184 + def apply_exceptions(self): 185 + """ 186 + Process exceptions file with rules to ignore or replace references. 187 + """ 188 + 189 + # Handle ignore rules 190 + for ln, c_type, symbol in self.ignore: 191 + if c_type not in self.DEF_SYMBOL_TYPES: 192 + sys.exit(f"{name}:{ln}: {c_type} is invalid") 193 + 194 + d = self.symbols[c_type] 195 + if symbol in d: 196 + del d[symbol] 197 + 198 + # Handle replace rules 199 + for ln, c_type, old, new in self.replace: 200 + if c_type not in self.DEF_SYMBOL_TYPES: 201 + sys.exit(f"{name}:{ln}: {c_type} is invalid") 202 + 203 + reftype = None 204 + 205 + # Parse reference type when the type is specified 206 + 207 + match = re.match(r"^\:c\:(\w+)\:\`(.+)\`", new) 208 + if match: 209 + reftype = f":c:{match.group(1)}" 210 + new = match.group(2) 211 + else: 212 + match = re.search(r"(\:ref)\:\`(.+)\`", new) 213 + if match: 214 + reftype = match.group(1) 215 + new = match.group(2) 216 + 217 + # If the replacement rule doesn't have a type, get default 218 + if not reftype: 219 + reftype = self.DEF_SYMBOL_TYPES[c_type].get("ref_type") 220 + if not reftype: 221 + reftype = self.DEF_SYMBOL_TYPES[c_type].get("real_type") 222 + 223 + new_ref = f"{reftype}:`{old} <{new}>`" 224 + 225 + # Change self.symbols to use the replacement rule 226 + if old in self.symbols[c_type]: 227 + (_, ln) = self.symbols[c_type][old] 228 + self.symbols[c_type][old] = (new_ref, ln) 229 + else: 230 + print(f"{name}:{ln}: Warning: can't find {old} {c_type}") 231 + 232 + def store_type(self, ln, symbol_type: str, symbol: str, 157 233 ref_name: str = None, replace_underscores: bool = True): 158 234 """ 159 235 Stores a new symbol at self.symbols under symbol_type. ··· 253 157 ref_type = defs.get("ref_type") 254 158 255 159 # Determine ref_link based on symbol type 256 - if ref_type: 257 - if symbol_type == "enum": 258 - ref_link = f"{ref_type}:`{symbol}`" 259 - else: 260 - if not ref_name: 261 - ref_name = symbol.lower() 160 + if ref_type or self.namespace: 161 + if not ref_name: 162 + ref_name = symbol.lower() 262 163 263 - # c-type references don't support hash 264 - if ref_type == ":ref" and replace_underscores: 265 - ref_name = ref_name.replace("_", "-") 164 + # c-type references don't support hash 165 + if ref_type == ":ref" and replace_underscores: 166 + ref_name = ref_name.replace("_", "-") 266 167 168 + # C domain references may have namespaces 169 + if ref_type.startswith(":c:"): 170 + if self.namespace: 171 + ref_name = f"{self.namespace}.{ref_name}" 172 + 173 + if ref_type: 267 174 ref_link = f"{ref_type}:`{symbol} <{ref_name}>`" 175 + else: 176 + ref_link = f"`{symbol} <{ref_name}>`" 268 177 else: 269 178 ref_link = symbol 270 179 271 - self.symbols[symbol_type][symbol] = f"{prefix}{ref_link}{suffix}" 180 + self.symbols[symbol_type][symbol] = (f"{prefix}{ref_link}{suffix}", ln) 272 181 273 182 def store_line(self, line): 274 183 """Stores a line at self.data, properly indented""" 275 184 line = " " + line.expandtabs() 276 185 self.data += line.rstrip(" ") 277 186 278 - def parse_file(self, file_in: str): 187 + def parse_file(self, file_in: str, exceptions: str = None): 279 188 """Reads a C source file and get identifiers""" 280 189 self.data = "" 281 190 is_enum = False 282 191 is_comment = False 283 192 multiline = "" 193 + 194 + self.read_exceptions(exceptions) 284 195 285 196 with open(file_in, "r", 286 197 encoding="utf-8", errors="backslashreplace") as f: ··· 343 240 if is_enum: 344 241 match = re.match(r"^\s*([_\w][\w\d_]+)\s*[\,=]?", line) 345 242 if match: 346 - self.store_type("symbol", match.group(1)) 243 + self.store_type(line_no, "symbol", match.group(1)) 347 244 if "}" in line: 348 245 is_enum = False 349 246 continue 350 247 351 248 match = re.match(r"^\s*#\s*define\s+([\w_]+)\s+_IO", line) 352 249 if match: 353 - self.store_type("ioctl", match.group(1), 250 + self.store_type(line_no, "ioctl", match.group(1), 354 251 replace_underscores=False) 355 252 continue 356 253 357 254 match = re.match(r"^\s*#\s*define\s+([\w_]+)(\s+|$)", line) 358 255 if match: 359 - self.store_type("define", match.group(1)) 256 + self.store_type(line_no, "define", match.group(1)) 360 257 continue 361 258 362 259 match = re.match(r"^\s*typedef\s+([_\w][\w\d_]+)\s+(.*)\s+([_\w][\w\d_]+);", ··· 364 261 if match: 365 262 name = match.group(2).strip() 366 263 symbol = match.group(3) 367 - self.store_type("typedef", symbol, ref_name=name) 264 + self.store_type(line_no, "typedef", symbol, ref_name=name) 368 265 continue 369 266 370 267 for re_enum in self.RE_ENUMS: 371 268 match = re_enum.match(line) 372 269 if match: 373 - self.store_type("enum", match.group(1)) 270 + self.store_type(line_no, "enum", match.group(1)) 374 271 is_enum = True 375 272 break 376 273 377 274 for re_struct in self.RE_STRUCTS: 378 275 match = re_struct.match(line) 379 276 if match: 380 - self.store_type("struct", match.group(1)) 277 + self.store_type(line_no, "struct", match.group(1)) 381 278 break 382 279 383 - def process_exceptions(self, fname: str): 384 - """ 385 - Process exceptions file with rules to ignore or replace references. 386 - """ 387 - if not fname: 388 - return 389 - 390 - name = os.path.basename(fname) 391 - 392 - with open(fname, "r", encoding="utf-8", errors="backslashreplace") as f: 393 - for ln, line in enumerate(f): 394 - ln += 1 395 - line = line.strip() 396 - if not line or line.startswith("#"): 397 - continue 398 - 399 - # Handle ignore rules 400 - match = re.match(r"^ignore\s+(\w+)\s+(\S+)", line) 401 - if match: 402 - c_type = match.group(1) 403 - symbol = match.group(2) 404 - 405 - if c_type not in self.DEF_SYMBOL_TYPES: 406 - sys.exit(f"{name}:{ln}: {c_type} is invalid") 407 - 408 - d = self.symbols[c_type] 409 - if symbol in d: 410 - del d[symbol] 411 - 412 - continue 413 - 414 - # Handle replace rules 415 - match = re.match(r"^replace\s+(\S+)\s+(\S+)\s+(\S+)", line) 416 - if not match: 417 - sys.exit(f"{name}:{ln}: invalid line: {line}") 418 - 419 - c_type, old, new = match.groups() 420 - 421 - if c_type not in self.DEF_SYMBOL_TYPES: 422 - sys.exit(f"{name}:{ln}: {c_type} is invalid") 423 - 424 - reftype = None 425 - 426 - # Parse reference type when the type is specified 427 - 428 - match = re.match(r"^\:c\:(data|func|macro|type)\:\`(.+)\`", new) 429 - if match: 430 - reftype = f":c:{match.group(1)}" 431 - new = match.group(2) 432 - else: 433 - match = re.search(r"(\:ref)\:\`(.+)\`", new) 434 - if match: 435 - reftype = match.group(1) 436 - new = match.group(2) 437 - 438 - # If the replacement rule doesn't have a type, get default 439 - if not reftype: 440 - reftype = self.DEF_SYMBOL_TYPES[c_type].get("ref_type") 441 - if not reftype: 442 - reftype = self.DEF_SYMBOL_TYPES[c_type].get("real_type") 443 - 444 - new_ref = f"{reftype}:`{old} <{new}>`" 445 - 446 - # Change self.symbols to use the replacement rule 447 - if old in self.symbols[c_type]: 448 - self.symbols[c_type][old] = new_ref 449 - else: 450 - print(f"{name}:{ln}: Warning: can't find {old} {c_type}") 280 + self.apply_exceptions() 451 281 452 282 def debug_print(self): 453 283 """ ··· 396 360 397 361 print(f"{c_type}:") 398 362 399 - for symbol, ref in sorted(refs.items()): 400 - print(f" {symbol} -> {ref}") 363 + for symbol, (ref, ln) in sorted(refs.items()): 364 + print(f" #{ln:<5d} {symbol} -> {ref}") 401 365 402 366 print() 403 367 ··· 420 384 421 385 # Process all reference types 422 386 for ref_dict in self.symbols.values(): 423 - for symbol, replacement in ref_dict.items(): 387 + for symbol, (replacement, _) in ref_dict.items(): 424 388 symbol = re.escape(re.sub(r"([\_\`\*\<\>\&\\\\:\/])", r"\\\1", symbol)) 425 389 text = re.sub(fr'{start_delim}{symbol}{end_delim}', 426 390 fr'\1{replacement}\2', text) ··· 433 397 434 398 def gen_toc(self): 435 399 """ 436 - Create a TOC table pointing to each symbol from the header 400 + Create a list of symbols to be part of a TOC contents table 437 401 """ 438 402 text = [] 439 - 440 - # Add header 441 - text.append(".. contents:: Table of Contents") 442 - text.append(" :depth: 2") 443 - text.append(" :local:") 444 - text.append("") 445 403 446 404 # Sort symbol types per description 447 405 symbol_descriptions = [] ··· 456 426 text.append("") 457 427 458 428 # Sort symbols alphabetically 459 - for symbol, ref in sorted(refs.items()): 460 - text.append(f"* :{ref}:") 429 + for symbol, (ref, ln) in sorted(refs.items()): 430 + text.append(f"- LINENO_{ln}: {ref}") 461 431 462 432 text.append("") # Add empty line between categories 463 433
+1 -4
tools/docs/parse-headers.py
··· 47 47 args = parser.parse_args() 48 48 49 49 parser = ParseDataStructs(debug=args.debug) 50 - parser.parse_file(args.file_in) 51 - 52 - if args.file_rules: 53 - parser.process_exceptions(args.file_rules) 50 + parser.parse_file(args.file_in, args.file_rules) 54 51 55 52 parser.debug_print() 56 53 parser.write_output(args.file_in, args.file_out, args.toc)