# GaplessInfoHolder

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/GaplessInfoHolder.java+class:androidx.media3.extractor.GaplessInfoHolder)

*** ** * ** ***


```
@UnstableApi
public final class GaplessInfoHolder
```

<br />

*** ** * ** ***

Holder for gapless playback information.

## Summary

| ### Public fields |
|---|---|
| `int` | `https://developer.android.com/reference/androidx/media3/extractor/GaplessInfoHolder#encoderDelay()` The number of samples to trim from the start of the decoded audio stream, or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if not set. |
| `int` | `https://developer.android.com/reference/androidx/media3/extractor/GaplessInfoHolder#encoderPadding()` The number of samples to trim from the end of the decoded audio stream, or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if not set. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/media3/extractor/GaplessInfoHolder#GaplessInfoHolder()()` Creates a new holder for gapless playback information. |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/media3/extractor/GaplessInfoHolder#hasGaplessInfo()()` Returns whether `https://developer.android.com/reference/androidx/media3/extractor/GaplessInfoHolder#encoderDelay()` and `https://developer.android.com/reference/androidx/media3/extractor/GaplessInfoHolder#encoderPadding()` have been set. |
| `boolean` | `https://developer.android.com/reference/androidx/media3/extractor/GaplessInfoHolder#setFromMetadata(androidx.media3.common.Metadata)(https://developer.android.com/reference/androidx/media3/common/Metadata metadata)` Populates the holder with data parsed from ID3 `https://developer.android.com/reference/androidx/media3/common/Metadata`. |

## Public fields

### encoderDelay

```
public int encoderDelay
```

The number of samples to trim from the start of the decoded audio stream, or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if not set.

### encoderPadding

```
public int encoderPadding
```

The number of samples to trim from the end of the decoded audio stream, or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if not set.

## Public constructors

### GaplessInfoHolder

```
public GaplessInfoHolder()
```

Creates a new holder for gapless playback information.

## Public methods

### hasGaplessInfo

```
public boolean hasGaplessInfo()
```

Returns whether `https://developer.android.com/reference/androidx/media3/extractor/GaplessInfoHolder#encoderDelay()` and `https://developer.android.com/reference/androidx/media3/extractor/GaplessInfoHolder#encoderPadding()` have been set.

### setFromMetadata

```
public boolean setFromMetadata(Metadata metadata)
```

Populates the holder with data parsed from ID3 `https://developer.android.com/reference/androidx/media3/common/Metadata`.

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Metadata metadata` | The metadata from which to parse the gapless information. |

| Returns |
|---|---|
| `boolean` | Whether the holder was populated. |