# Types and flags used to represent the media graph elements

## Media entity types

`MEDIA_ENT_F_UNKNOWN` and `MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN` | Unknown entity. That generally indicates that a driver didn't initialize properly the entity, with is a Kernel bug
`MEDIA_ENT_F_IO_V4L` | Data streaming input and/or output entity.
`MEDIA_ENT_F_IO_VBI` | V4L VBI streaming input or output entity
`MEDIA_ENT_F_IO_SWRADIO` | V4L Software Digital Radio (SDR) streaming input or output entity
`MEDIA_ENT_F_IO_DTV` | DVB Digital TV streaming input or output entity
`MEDIA_ENT_F_DTV_DEMOD` | Digital TV demodulator entity.
`MEDIA_ENT_F_TS_DEMUX` | MPEG Transport stream demux entity. Could be implemented on hardware or in Kernelspace by the Linux DVB subsystem.
`MEDIA_ENT_F_DTV_CA` | Digital TV Conditional Access module (CAM) entity
`MEDIA_ENT_F_DTV_NET_DECAP` | Digital TV network ULE/MLE desencapsulation entity. Could be implemented on hardware or in Kernelspace
`MEDIA_ENT_F_CONN_RF` | Connector for a Radio Frequency (RF) signal.
`MEDIA_ENT_F_CONN_SVIDEO` | Connector for a S-Video signal.
`MEDIA_ENT_F_CONN_COMPOSITE` | Connector for a RGB composite signal.
`MEDIA_ENT_F_CONN_TEST` | Connector for a test generator.
`MEDIA_ENT_F_CAM_SENSOR` | Camera video sensor entity.
`MEDIA_ENT_F_FLASH` | Flash controller entity.
`MEDIA_ENT_F_LENS` | Lens controller entity.

`MEDIA_ENT_F_ATV_DECODER`

Analog video decoder, the basic function of the video decoder is to accept analogue video from a wide variety of sources such as broadcast, DVD players, cameras and video cassette recorders, in either NTSC, PAL, SECAM or HD format, separating the stream into its component parts, luminance and chrominance, and output it in some digital video standard, with appropriate timing signals.

`MEDIA_ENT_F_TUNER` | Digital TV, analog TV, radio and/or software radio tuner.

## Media entity flags

`MEDIA_ENT_FL_DEFAULT` | Default entity for its type. Used to discover the default audio, VBI and video devices, the default camera sensor, ...
`MEDIA_ENT_FL_CONNECTOR` | The entity represents a data conector

## Media interface types

`MEDIA_INTF_T_DVB_FE` | Device node interface for the Digital TV frontend | typically, /dev/dvb/adapter?/frontend?
`MEDIA_INTF_T_DVB_DEMUX` | Device node interface for the Digital TV demux | typically, /dev/dvb/adapter?/demux?
`MEDIA_INTF_T_DVB_DVR` | Device node interface for the Digital TV DVR | typically, /dev/dvb/adapter?/dvr?
`MEDIA_INTF_T_DVB_CA` | Device node interface for the Digital TV Conditional Access | typically, /dev/dvb/adapter?/ca?
`MEDIA_INTF_T_DVB_FE` | Device node interface for the Digital TV network control | typically, /dev/dvb/adapter?/net?
`MEDIA_INTF_T_V4L_VIDEO` | Device node interface for video (V4L) | typically, /dev/video?
`MEDIA_INTF_T_V4L_VBI` | Device node interface for VBI (V4L) | typically, /dev/vbi?
`MEDIA_INTF_T_V4L_RADIO` | Device node interface for radio (V4L) | typically, /dev/vbi?
`MEDIA_INTF_T_V4L_SUBDEV` | Device node interface for a V4L subdevice | typically, /dev/v4l-subdev?
`MEDIA_INTF_T_V4L_SWRADIO` | Device node interface for Software Defined Radio (V4L) | typically, /dev/swradio?

## Media pad flags

`MEDIA_PAD_FL_SINK` | Input pad, relative to the entity. Input pads sink data and are targets of links.
`MEDIA_PAD_FL_SOURCE` | Output pad, relative to the entity. Output pads source data and are origins of links.
`MEDIA_PAD_FL_MUST_CONNECT` | If this flag is set and the pad is linked to any other pad, then at least one of those links must be enabled for the entity to be able to stream. There could be temporary reasons (e.g. device configuration dependent) for the pad to need enabled links even when this flag isn't set; the absence of the flag doesn't imply there is none.

One and only one of `MEDIA_PAD_FL_SINK` and `MEDIA_PAD_FL_SOURCE` must be set for every pad.

## Media link flags

`MEDIA_LNK_FL_ENABLED` | The link is enabled and can be used to transfer media data. When two or more links target a sink pad, only one of them can be enabled at a time.
`MEDIA_LNK_FL_IMMUTABLE` | The link enabled state can't be modified at runtime. An immutable link is always enabled.
`MEDIA_LNK_FL_DYNAMIC` | The link enabled state can be modified during streaming. This flag is set by drivers and is read-only for applications.
`MEDIA_LNK_FL_LINK_TYPE` | This is a bitmask that defines the type of the link. Currently, two types of links are supported: `MEDIA_LNK_FL_DATA_LINK` if the link is between two pads `MEDIA_LNK_FL_INTERFACE_LINK` if the link is between an interface and an entity