# Google Cloud Video Live Stream V1 Client - Class SegmentSettings (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 SegmentSettings.

Segment settings for `fmp4` and `ts`.

Generated from protobuf message `google.cloud.video.livestream.v1.SegmentSettings`

## Namespace

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

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ segment_duration` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` Duration of the segments in seconds. The default is `6s`. Note that `segmentDuration` must be greater than or equal to gop_duration, and `segmentDuration` must be divisible by gop_duration. Valid range is \[2s, 20s\]. All [mux_streams](https://docs.cloud.google.com/php/docs/reference/cloud-video-live-stream/latest/V1.Manifest#_Google_Cloud_Video_LiveStream_V1_Manifest__getMuxStreams__) in the same manifest must have the same segment duration. |

### getSegmentDuration

Duration of the segments in seconds. The default is `6s`. Note that
`segmentDuration` must be greater than or equal to
gop_duration,
and `segmentDuration` must be divisible by
gop_duration.

Valid range is \[2s, 20s\].
All [mux_streams](https://docs.cloud.google.com/php/docs/reference/cloud-video-live-stream/latest/V1.Manifest#_Google_Cloud_Video_LiveStream_V1_Manifest__getMuxStreams__) in
the same manifest must have the same segment duration.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration|null` |   |

### hasSegmentDuration

### clearSegmentDuration

### setSegmentDuration

Duration of the segments in seconds. The default is `6s`. Note that
`segmentDuration` must be greater than or equal to
gop_duration,
and `segmentDuration` must be divisible by
gop_duration.

Valid range is \[2s, 20s\].
All [mux_streams](https://docs.cloud.google.com/php/docs/reference/cloud-video-live-stream/latest/V1.Manifest#_Google_Cloud_Video_LiveStream_V1_Manifest__getMuxStreams__) in
the same manifest must have the same segment duration.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` |

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