# SpliceInsertCommand

Artifact: [androidx.media3:media3-extractor](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/extractor/metadata/scte35/SpliceInsertCommand.java+class:androidx.media3.extractor.metadata.scte35.SpliceInsertCommand)

*** ** * ** ***


```
@UnstableApi
public final class SpliceInsertCommand extends SpliceCommand
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [androidx.media3.extractor.metadata.scte35.SpliceCommand](https://developer.android.com/reference/androidx/media3/extractor/metadata/scte35/SpliceCommand) ||
|   | ↳ | [androidx.media3.extractor.metadata.scte35.SpliceInsertCommand](https://developer.android.com/reference/androidx/media3/extractor/metadata/scte35/SpliceInsertCommand) |

*** ** * ** ***

Represents a splice insert command defined in SCTE35, Section 9.3.3.

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/media3/extractor/metadata/scte35/SpliceInsertCommand.ComponentSplice` Holds splicing information for specific splice insert command components. |

| ### Public fields |
|---|---|
| `final boolean` | `https://developer.android.com/reference/androidx/media3/extractor/metadata/scte35/SpliceInsertCommand#autoReturn()` If `https://developer.android.com/reference/androidx/media3/extractor/metadata/scte35/SpliceInsertCommand#breakDurationUs()` is not `https://developer.android.com/reference/androidx/media3/common/C#TIME_UNSET()`, defines whether `https://developer.android.com/reference/androidx/media3/extractor/metadata/scte35/SpliceInsertCommand#breakDurationUs()` should be used to know when to return to the network feed. |
| `final int` | `https://developer.android.com/reference/androidx/media3/extractor/metadata/scte35/SpliceInsertCommand#availNum()` Holds the value of `avail_num` as defined in SCTE35, Section 9.3.3. |
| `final int` | `https://developer.android.com/reference/androidx/media3/extractor/metadata/scte35/SpliceInsertCommand#availsExpected()` Holds the value of `avails_expected` as defined in SCTE35, Section 9.3.3. |
| `final long` | `https://developer.android.com/reference/androidx/media3/extractor/metadata/scte35/SpliceInsertCommand#breakDurationUs()` The duration of the splice in microseconds, or `https://developer.android.com/reference/androidx/media3/common/C#TIME_UNSET()` if no duration is present. |
| `final https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/media3/extractor/metadata/scte35/SpliceInsertCommand.ComponentSplice>` | `https://developer.android.com/reference/androidx/media3/extractor/metadata/scte35/SpliceInsertCommand#componentSpliceList()` If `https://developer.android.com/reference/androidx/media3/extractor/metadata/scte35/SpliceInsertCommand#programSpliceFlag()` is false, a non-empty list containing the `https://developer.android.com/reference/androidx/media3/extractor/metadata/scte35/SpliceInsertCommand.ComponentSplice`s. |
| `final boolean` | `https://developer.android.com/reference/androidx/media3/extractor/metadata/scte35/SpliceInsertCommand#outOfNetworkIndicator()` If true, the splice event is an opportunity to exit from the network feed. |
| `final boolean` | `https://developer.android.com/reference/androidx/media3/extractor/metadata/scte35/SpliceInsertCommand#programSpliceFlag()` Whether the splice mode is program splice mode, whereby all PIDs/components are to be spliced. |
| `final long` | `https://developer.android.com/reference/androidx/media3/extractor/metadata/scte35/SpliceInsertCommand#programSplicePlaybackPositionUs()` Equivalent to `https://developer.android.com/reference/androidx/media3/extractor/metadata/scte35/SpliceInsertCommand#programSplicePts()` but in the playback timebase. |
| `final long` | `https://developer.android.com/reference/androidx/media3/extractor/metadata/scte35/SpliceInsertCommand#programSplicePts()` If `https://developer.android.com/reference/androidx/media3/extractor/metadata/scte35/SpliceInsertCommand#programSpliceFlag()` is true, the PTS at which the program splice should occur. |
| `final boolean` | `https://developer.android.com/reference/androidx/media3/extractor/metadata/scte35/SpliceInsertCommand#spliceEventCancelIndicator()` True if the event with id `https://developer.android.com/reference/androidx/media3/extractor/metadata/scte35/SpliceInsertCommand#spliceEventId()` has been canceled. |
| `final long` | `https://developer.android.com/reference/androidx/media3/extractor/metadata/scte35/SpliceInsertCommand#spliceEventId()` The splice event id. |
| `final boolean` | `https://developer.android.com/reference/androidx/media3/extractor/metadata/scte35/SpliceInsertCommand#spliceImmediateFlag()` Whether splicing should be done at the nearest opportunity. |
| `final int` | `https://developer.android.com/reference/androidx/media3/extractor/metadata/scte35/SpliceInsertCommand#uniqueProgramId()` The unique program id as defined in SCTE35, Section 9.3.3. |

| ### Public methods |
|---|---|
| `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/media3/extractor/metadata/scte35/SpliceInsertCommand#toString()()` |

| ### Inherited methods |
|---|
| From [androidx.media3.common.Metadata.Entry](https://developer.android.com/reference/androidx/media3/common/Metadata.Entry) |---|---| | `@https://developer.android.com/reference/androidx/annotation/Nullable byte[]` | `https://developer.android.com/reference/androidx/media3/common/Metadata.Entry#getWrappedMetadataBytes()()` Returns the bytes of the wrapped metadata in this Entry, or null if it doesn't contain wrapped metadata. | | `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/common/Format` | `https://developer.android.com/reference/androidx/media3/common/Metadata.Entry#getWrappedMetadataFormat()()` Returns the `https://developer.android.com/reference/androidx/media3/common/Format` that can be used to decode the wrapped metadata in `https://developer.android.com/reference/androidx/media3/common/Metadata.Entry#getWrappedMetadataBytes()`, or null if this Entry doesn't contain wrapped metadata. | | `void` | `https://developer.android.com/reference/androidx/media3/common/Metadata.Entry#populateMediaMetadata(androidx.media3.common.MediaMetadata.Builder)(https://developer.android.com/reference/androidx/media3/common/MediaMetadata.Builder builder)` Updates the `https://developer.android.com/reference/androidx/media3/common/MediaMetadata.Builder` with the type-specific values stored in this ` Entry`. | |

## Public fields

### autoReturn

```
public final boolean autoReturn
```

If `https://developer.android.com/reference/androidx/media3/extractor/metadata/scte35/SpliceInsertCommand#breakDurationUs()` is not `https://developer.android.com/reference/androidx/media3/common/C#TIME_UNSET()`, defines whether `https://developer.android.com/reference/androidx/media3/extractor/metadata/scte35/SpliceInsertCommand#breakDurationUs()` should be used to know when to return to the network feed. If `https://developer.android.com/reference/androidx/media3/extractor/metadata/scte35/SpliceInsertCommand#breakDurationUs()` is `https://developer.android.com/reference/androidx/media3/common/C#TIME_UNSET()`, the value is undefined.

### availNum

```
public final int availNum
```

Holds the value of `avail_num` as defined in SCTE35, Section 9.3.3.

### availsExpected

```
public final int availsExpected
```

Holds the value of `avails_expected` as defined in SCTE35, Section 9.3.3.

### breakDurationUs

```
public final long breakDurationUs
```

The duration of the splice in microseconds, or `https://developer.android.com/reference/androidx/media3/common/C#TIME_UNSET()` if no duration is present.

### componentSpliceList

```
public final List<SpliceInsertCommand.ComponentSplice> componentSpliceList
```

If `https://developer.android.com/reference/androidx/media3/extractor/metadata/scte35/SpliceInsertCommand#programSpliceFlag()` is false, a non-empty list containing the `https://developer.android.com/reference/androidx/media3/extractor/metadata/scte35/SpliceInsertCommand.ComponentSplice`s. Otherwise, an empty list.

### outOfNetworkIndicator

```
public final boolean outOfNetworkIndicator
```

If true, the splice event is an opportunity to exit from the network feed. If false, indicates an opportunity to return to the network feed.

### programSpliceFlag

```
public final boolean programSpliceFlag
```

Whether the splice mode is program splice mode, whereby all PIDs/components are to be spliced. If false, splicing is done per PID/component.

### programSplicePlaybackPositionUs

```
public final long programSplicePlaybackPositionUs
```

Equivalent to `https://developer.android.com/reference/androidx/media3/extractor/metadata/scte35/SpliceInsertCommand#programSplicePts()` but in the playback timebase.

### programSplicePts

```
public final long programSplicePts
```

If `https://developer.android.com/reference/androidx/media3/extractor/metadata/scte35/SpliceInsertCommand#programSpliceFlag()` is true, the PTS at which the program splice should occur. `https://developer.android.com/reference/androidx/media3/common/C#TIME_UNSET()` otherwise.

### spliceEventCancelIndicator

```
public final boolean spliceEventCancelIndicator
```

True if the event with id `https://developer.android.com/reference/androidx/media3/extractor/metadata/scte35/SpliceInsertCommand#spliceEventId()` has been canceled.

### spliceEventId

```
public final long spliceEventId
```

The splice event id.

### spliceImmediateFlag

```
public final boolean spliceImmediateFlag
```

Whether splicing should be done at the nearest opportunity. If false, splicing should be done at the moment indicated by `https://developer.android.com/reference/androidx/media3/extractor/metadata/scte35/SpliceInsertCommand#programSplicePlaybackPositionUs()` or `https://developer.android.com/reference/androidx/media3/extractor/metadata/scte35/SpliceInsertCommand.ComponentSplice#componentSplicePlaybackPositionUs()`, depending on `https://developer.android.com/reference/androidx/media3/extractor/metadata/scte35/SpliceInsertCommand#programSpliceFlag()`.

### uniqueProgramId

```
public final int uniqueProgramId
```

The unique program id as defined in SCTE35, Section 9.3.3.

## Public methods

### toString

```
public String toString()
```