Media Framework - 2020.2 English - XD336

Versal Base TRD Documentation (XD336)

Document ID
XD336
Release Date
2025-12-01
Version
2020.2 English

The main goal of the media framework is to discover the device topology of a video pipeline and to configure it at run-time. To achieve this, pipelines are modeled as an oriented graph of building blocks called entities connected through pads.

An entity is a basic media hardware building block. It can correspond to a large variety of blocks such as physical hardware devices (e.g. image sensors), logical hardware devices (e.g. soft IP cores inside the PL), DMA channels or physical connectors. Physical or logical devices are modeled as sub-device nodes and DMA channels as video nodes.

A pad is a connection endpoint through which an entity can interact with other entities. Data produced by an entity flows from the entity’s output to one or more entity inputs. A link is a point-to-point oriented connection between two pads, either on the same entity or on different entities. Data flows from a source pad to a sink pad.

A media device node is created that allows the user space application to configure the video pipeline and its sub-devices through the libmediactl and libv4l2subdev libraries. The media controller API provides the following functionality:

  • Enumerate entities, pads and links

  • Configure pads

    • Set media bus format

    • Set dimensions (width/height)

  • Configure links

  • Enable/disable

  • Validate formats

The following figures show the media graphs for MIPI CSI-2 Rx (single-sensor and quad-sensor) as well as the HDMI Rx video capture pipeline as generated by the media-ctl utility. The subdevices are shown in green with their corresponding control interface base address and subdevice node in the center. The numbers on the edges are pads and the solid arrows represent active links. The yellow boxes are video nodes that correspond to DMA channels, in this case write channels (outputs).

Video Capture Media Pipeline: Single MIPI CSI-2 RX

Fig. 3 Video Capture Media Pipeline: Single MIPI CSI-2 RX

Video Capture Media Pipeline: Quad MIPI CSI-2 RX

Fig. 4 Video Capture Media Pipeline: Quad MIPI CSI-2 RX

Video Capture Media Pipeline: HDMI RX

Fig. 5 Video Capture Media Pipeline: HDMI RX