# fuchsia.mediastreams

<br />

Added: 7

## **STRUCTS**

### AudioFormat

*Defined in [fuchsia.mediastreams/audio_format.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.mediastreams/audio_format.fidl;l=9)*

Describes a format used for audio elementary streams without
reference to compression. Where compression is supported, this
type should be combined with a `Compression` struct.

<br />

| Field | Type | Description | Default |
|---|---|---|---|
| `sample_format` | `https://fuchsia.dev/reference/fidl/fuchsia.mediastreams#AudioSampleFormat` | The type of individual samples. | No default |
| `channel_count` | `uint32` | The number of samples per frame. | No default |
| `frames_per_second` | `uint32` | The number of frames per second. | No default |
| `channel_layout` | `https://fuchsia.dev/reference/fidl/fuchsia.mediastreams#AudioChannelLayout` | The spatial assignment of each channel. | No default |

### Compression

*Defined in [fuchsia.mediastreams/compression.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.mediastreams/compression.fidl;l=12)*

Describes the compression applied to a stream.
Removed: HEAD

<br />

| Field | Type | Description | Default |
|---|---|---|---|
| `type` | `https://fuchsia.dev/reference/fidl/fuchsia.mediastreams#CompressionType` | The type of compression applied to the stream. | No default |
| `parameters` | `vector<uint8>?` | Opaque 'out-of-band' parameters describing the compression of the stream. | No default |

### Encryption

*Defined in [fuchsia.mediastreams/encryption.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.mediastreams/encryption.fidl;l=34)*

| Field | Type | Description | Default |
|---|---|---|---|
| `scheme` | `https://fuchsia.dev/reference/fidl/fuchsia.mediastreams#EncryptionScheme` |   | No default |
| `default_key_id` | `https://fuchsia.dev/reference/fidl/fuchsia.mediastreams#EncryptionKeyId` |   | No default |
| `default_init_vector` | `https://fuchsia.dev/reference/fidl/fuchsia.mediastreams#EncryptionInitVector` |   | No default |
| `default_pattern` | `https://fuchsia.dev/reference/fidl/fuchsia.mediastreams#EncryptionPattern?` |   | No default |

### EncryptionPattern

*Defined in [fuchsia.mediastreams/encryption.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.mediastreams/encryption.fidl;l=29)*

| Field | Type | Description | Default |
|---|---|---|---|
| `clear_blocks` | `uint32` |   | No default |
| `encrypted_blocks` | `uint32` |   | No default |

### EncryptionSubsampleEntry

*Defined in [fuchsia.mediastreams/encryption.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.mediastreams/encryption.fidl;l=24)*

| Field | Type | Description | Default |
|---|---|---|---|
| `clear_bytes` | `uint32` |   | No default |
| `encrypted_bytes` | `uint32` |   | No default |

### VideoFormat

*Defined in [fuchsia.mediastreams/video_format.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.mediastreams/video_format.fidl;l=12)*

Describes a format used for video elementary streams without
reference to compression. Where compression is supported, this
type should be combined with a `Compression` struct.
Removed: HEAD

<br />

| Field | Type | Description | Default |
|---|---|---|---|
| `pixel_format` | `https://fuchsia.dev/reference/fidl/fuchsia.mediastreams#PixelFormat` | Describes the manner in which pixels are encoded. | No default |
| `pixel_format_modifier` | `uint64` | Vendor-specific pixel format modifier. | No default |
| `color_space` | `https://fuchsia.dev/reference/fidl/fuchsia.mediastreams#ColorSpace` | Indicates the color space used to interpret pixel values. | No default |
| `coded_size` | `https://fuchsia.dev/reference/fuchsia.math//https://fuchsia.dev/reference/fuchsia.math#Size` | The size of a frame in terms of the number of pixels that are represented in a frame payload. | No default |
| `display_size` | `https://fuchsia.dev/reference/fuchsia.math//https://fuchsia.dev/reference/fuchsia.math#Size` | The size of a frame in terms of the number of pixels that should be displayed. These values will always be less than or equal to the corresponding `coded_size` values. | No default |
| `aspect_ratio` | `https://fuchsia.dev/reference/fuchsia.math//https://fuchsia.dev/reference/fuchsia.math#Size?` | Aspect ratio of a single pixel as the video is intended to be displayed. | No default |

## **ENUMS**

### AudioSampleFormat [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

Type: `uint32`

*Defined in [fuchsia.mediastreams/audio_format.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.mediastreams/audio_format.fidl;l=28)*

Expresses the format of individual audio samples.

<br />

| Name | Value | Description |
|---|---|---|
| ### UNSIGNED_8 | `1` |   |
| ### SIGNED_16 | `2` |   |
| ### SIGNED_24_IN_32 | `3` |   |
| ### SIGNED_32 | `4` |   |
| ### FLOAT | `5` |   |

### ColorSpace [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

Type: `uint32`

*Defined in [fuchsia.mediastreams/video_format.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.mediastreams/video_format.fidl;l=63)*

Expresses the color space used to interpret video pixel values.
Removed: HEAD

<br />

| Name | Value | Description |
|---|---|---|
| ### INVALID | `0` |   |
| ### SRGB | `1` |   |
| ### REC601_NTSC | `2` |   |
| ### REC601_NTSC_FULL_RANGE | `3` |   |
| ### REC601_PAL | `4` |   |
| ### REC601_PAL_FULL_RANGE | `5` |   |
| ### REC709 | `6` |   |
| ### REC2020 | `7` |   |
| ### REC2100 | `8` |   |

### PixelFormat [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

Type: `uint32`

*Defined in [fuchsia.mediastreams/video_format.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.mediastreams/video_format.fidl;l=42)*

Expresses the manner in which video pixels are encoded.
Removed: HEAD

<br />

| Name | Value | Description |
|---|---|---|
| ### INVALID | `0` |   |
| ### R8G8B8A8 | `1` |   |
| ### BGRA32 | `101` |   |
| ### I420 | `102` |   |
| ### M420 | `103` |   |
| ### NV12 | `104` |   |
| ### YUY2 | `105` |   |
| ### MJPEG | `106` |   |
| ### YV12 | `107` |   |
| ### BGR24 | `108` |   |
| ### RGB565 | `109` |   |
| ### RGB332 | `110` |   |
| ### RGB2220 | `111` |   |
| ### L8 | `112` |   |
| ### R8 | `113` |   |
| ### R8G8 | `114` |   |

## **UNIONS**

### AudioChannelLayout [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.mediastreams/audio_format.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.mediastreams/audio_format.fidl;l=37)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `placeholder` | `uint8` |   |

<br />

### MediaFormat [flexible](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.mediastreams/media_format.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.mediastreams/media_format.fidl;l=9)*

Describes a format used for elementary streams
Removed: HEAD

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `audio` | `https://fuchsia.dev/reference/fidl/fuchsia.mediastreams#AudioFormat` | Format for audio streams. |
| ### 2 | `video` | `https://fuchsia.dev/reference/fidl/fuchsia.mediastreams#VideoFormat` | Format for video streams. |

<br />

## **CONSTANTS**

| Name | Value | Type | Description |
|---|---|---|---|
| [AUDIO_COMPRESSION_AAC](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.mediastreams/compression.fidl;l=23) | `fuchsia.streams.aac` | `String` | Removed: HEAD |
| [AUDIO_COMPRESSION_AACLATM](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.mediastreams/compression.fidl;l=25) | `fuchsia.streams.aaclatm` | `String` | Removed: HEAD |
| [AUDIO_COMPRESSION_AMRNB](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.mediastreams/compression.fidl;l=27) | `fuchsia.streams.amrnb` | `String` | Removed: HEAD |
| [AUDIO_COMPRESSION_AMRWB](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.mediastreams/compression.fidl;l=29) | `fuchsia.streams.amrwb` | `String` | Removed: HEAD |
| [AUDIO_COMPRESSION_APTX](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.mediastreams/compression.fidl;l=31) | `fuchsia.streams.aptx` | `String` | Removed: HEAD |
| [AUDIO_COMPRESSION_FLAC](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.mediastreams/compression.fidl;l=33) | `fuchsia.streams.flac` | `String` | Removed: HEAD |
| [AUDIO_COMPRESSION_GSMMS](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.mediastreams/compression.fidl;l=35) | `fuchsia.streams.gsmms` | `String` | Removed: HEAD |
| [AUDIO_COMPRESSION_MP3](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.mediastreams/compression.fidl;l=37) | `fuchsia.streams.mp3` | `String` | Removed: HEAD |
| [AUDIO_COMPRESSION_OPUS](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.mediastreams/compression.fidl;l=47) | `fuchsia.streams.opus` | `String` | Removed: HEAD |
| [AUDIO_COMPRESSION_PCMALAW](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.mediastreams/compression.fidl;l=39) | `fuchsia.streams.pcmalaw` | `String` | Removed: HEAD |
| [AUDIO_COMPRESSION_PCMMULAW](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.mediastreams/compression.fidl;l=41) | `fuchsia.streams.pcmmulaw` | `String` | Removed: HEAD |
| [AUDIO_COMPRESSION_SBC](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.mediastreams/compression.fidl;l=43) | `fuchsia.streams.sbc` | `String` | Removed: HEAD |
| [AUDIO_COMPRESSION_VORBIS](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.mediastreams/compression.fidl;l=45) | `fuchsia.streams.vorbis` | `String` | Removed: HEAD |
| [ENCRYPTION_SCHEME_CBC1](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.mediastreams/encryption.fidl;l=18) | `cbc1` | `String` |   |
| [ENCRYPTION_SCHEME_CBCS](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.mediastreams/encryption.fidl;l=20) | `cbcs` | `String` |   |
| [ENCRYPTION_SCHEME_CENC](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.mediastreams/encryption.fidl;l=17) | `cenc` | `String` |   |
| [ENCRYPTION_SCHEME_CENS](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.mediastreams/encryption.fidl;l=19) | `cens` | `String` |   |
| [MAX_ENCRYPTION_SCHEME_SIZE](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.mediastreams/encryption.fidl;l=7) | `4` | `int64` | The maximum size of an `EncryptionScheme` string. |
| [MAX_INIT_VECTOR_SIZE](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.mediastreams/encryption.fidl;l=13) | `16` | `int64` | The maximum size of a `EncryptionInitVector` blob. |
| [MAX_KEY_ID_SIZE](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.mediastreams/encryption.fidl;l=10) | `16` | `int64` | The maximum size of a `EncryptionKeyId` blob. |
| [VIDEO_COMPRESSION_H263](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.mediastreams/compression.fidl;l=50) | `fuchsia.streams.h263` | `String` | Removed: HEAD |
| [VIDEO_COMPRESSION_H264](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.mediastreams/compression.fidl;l=52) | `fuchsia.streams.h264` | `String` | Removed: HEAD |
| [VIDEO_COMPRESSION_MPEG4](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.mediastreams/compression.fidl;l=54) | `fuchsia.streams.mpeg4` | `String` | Removed: HEAD |
| [VIDEO_COMPRESSION_THEORA](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.mediastreams/compression.fidl;l=56) | `fuchsia.streams.theora` | `String` | Removed: HEAD |
| [VIDEO_COMPRESSION_VP3](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.mediastreams/compression.fidl;l=58) | `fuchsia.streams.vp3` | `String` | Removed: HEAD |
| [VIDEO_COMPRESSION_VP8](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.mediastreams/compression.fidl;l=60) | `fuchsia.streams.vp8` | `String` | Removed: HEAD |
| [VIDEO_COMPRESSION_VP9](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.mediastreams/compression.fidl;l=62) | `fuchsia.streams.vp9` | `String` | Removed: HEAD |

## **ALIASES**

| Name | Value | Description |
|---|---|---|
| [CompressionType](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.mediastreams/compression.fidl;l=8) | `string`\[`256`\] | An identifier for compression types. Removed: HEAD |
| [EncryptionInitVector](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.mediastreams/encryption.fidl;l=22) | `vector`\[`https://fuchsia.dev/reference/fidl/fuchsia.mediastreams#MAX_INIT_VECTOR_SIZE`\] |   |
| [EncryptionKeyId](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.mediastreams/encryption.fidl;l=21) | `vector`\[`https://fuchsia.dev/reference/fidl/fuchsia.mediastreams#MAX_KEY_ID_SIZE`\] |   |
| [EncryptionScheme](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.mediastreams/encryption.fidl;l=16) | `string`\[`https://fuchsia.dev/reference/fidl/fuchsia.mediastreams#MAX_ENCRYPTION_SCHEME_SIZE`\] | Identifies an encryption scheme. |