# Google Cloud Video Live Stream V1 Client - Class TextMapping (1.4.0)

1.4.0 (latest) 1.3.2 1.2.1 1.1.3 1.0.0 0.7.5 0.6.2 0.5.0 0.4.2 0.3.2 0.2.6 Reference documentation and code samples for the Google Cloud Video Live Stream V1 Client class TextMapping.

The mapping for the input streams and text tracks.

Generated from protobuf message `google.cloud.video.livestream.v1.TextStream.TextMapping`

## Namespace

Google \\ Cloud \\ Video \\ LiveStream \\ V1 \\ TextStream

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ input_key` | `string` Optional. The `Channel` [InputAttachment.key](https://docs.cloud.google.com/php/docs/reference/cloud-video-live-stream/latest/V1.InputAttachment#_Google_Cloud_Video_LiveStream_V1_InputAttachment__getKey__) that identifies the input that this text mapping applies to. |
| `↳ input_track` | `int` Optional. The zero-based index of the track in the input stream. |
| `↳ input_cea_channel` | `string` Optional. The channel of the closed caption in the input stream. If this field is set, the output [codec](https://docs.cloud.google.com/php/docs/reference/cloud-video-live-stream/latest/V1.TextStream#_Google_Cloud_Video_LiveStream_V1_TextStream__getCodec__) must be `webvtt`. Must be one of `CC1`, `CC2`, `CC3`, and `CC4`, if the codec of the input closed caption is `cea608`; Must be one between `SERVICE1` and `SERVICE64`, if the codec of the input closed caption is `cea708`. |
| `↳ from_language_code` | `string` Optional. The BCP-47 source language code, such as `en-US` or `sr-Latn`. If differ from the textStream's language code, enable translation. For more information on BCP-47 language codes, see <https://www.unicode.org/reports/tr35/#Unicode_locale_identifier>. |

### getInputKey

Optional. The `Channel`
[InputAttachment.key](https://docs.cloud.google.com/php/docs/reference/cloud-video-live-stream/latest/V1.InputAttachment#_Google_Cloud_Video_LiveStream_V1_InputAttachment__getKey__)
that identifies the input that this text mapping applies to.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setInputKey

Optional. The `Channel`
[InputAttachment.key](https://docs.cloud.google.com/php/docs/reference/cloud-video-live-stream/latest/V1.InputAttachment#_Google_Cloud_Video_LiveStream_V1_InputAttachment__getKey__)
that identifies the input that this text mapping applies to.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getInputTrack

Optional. The zero-based index of the track in the input stream.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setInputTrack

Optional. The zero-based index of the track in the input stream.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getInputCeaChannel

Optional. The channel of the closed caption in the input stream.

If this field is set, the output
[codec](https://docs.cloud.google.com/php/docs/reference/cloud-video-live-stream/latest/V1.TextStream#_Google_Cloud_Video_LiveStream_V1_TextStream__getCodec__) must be
`webvtt`. Must be one of `CC1`, `CC2`, `CC3`, and `CC4`, if the codec of
the input closed caption is `cea608`; Must be one between `SERVICE1` and
`SERVICE64`, if the codec of the input closed caption is `cea708`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setInputCeaChannel

Optional. The channel of the closed caption in the input stream.

If this field is set, the output
[codec](https://docs.cloud.google.com/php/docs/reference/cloud-video-live-stream/latest/V1.TextStream#_Google_Cloud_Video_LiveStream_V1_TextStream__getCodec__) must be
`webvtt`. Must be one of `CC1`, `CC2`, `CC3`, and `CC4`, if the codec of
the input closed caption is `cea608`; Must be one between `SERVICE1` and
`SERVICE64`, if the codec of the input closed caption is `cea708`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getFromLanguageCode

Optional. The BCP-47 source language code, such as `en-US` or `sr-Latn`.

If differ from the textStream's language code, enable translation. For
more information on BCP-47 language codes, see
<https://www.unicode.org/reports/tr35/#Unicode_locale_identifier>.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setFromLanguageCode

Optional. The BCP-47 source language code, such as `en-US` or `sr-Latn`.

If differ from the textStream's language code, enable translation. For
more information on BCP-47 language codes, see
<https://www.unicode.org/reports/tr35/#Unicode_locale_identifier>.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |