# AnnexBToAvccConverter

# AnnexBToAvccConverter

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

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/media3/muxer/AnnexBToAvccConverter "View this page in Java")

<br />

```
@UnstableApi
interface AnnexBToAvccConverter
```

<br />

*** ** * ** ***

Converts a buffer containing H.264/H.265 NAL units from the Annex-B format (ISO/IEC 14496-14 Annex B, which uses start codes to delineate NAL units) to the avcC format (ISO/IEC 14496-15, which uses length prefixes).

## Summary

|                                                         ### Constants                                                          |
|--------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `const `[AnnexBToAvccConverter](https://developer.android.com/reference/kotlin/androidx/media3/muxer/AnnexBToAvccConverter)`!` | [DEFAULT](https://developer.android.com/reference/kotlin/androidx/media3/muxer/AnnexBToAvccConverter#DEFAULT()) Default implementation for[AnnexBToAvccConverter](https://developer.android.com/reference/kotlin/androidx/media3/muxer/AnnexBToAvccConverter). |

|                               ### Public functions                                |
|-----------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [ByteBuffer](https://developer.android.com/reference/java/nio/ByteBuffer.html)`!` | [process](https://developer.android.com/reference/kotlin/androidx/media3/muxer/AnnexBToAvccConverter#process(java.nio.ByteBuffer))`(inputBuffer: `[ByteBuffer](https://developer.android.com/reference/java/nio/ByteBuffer.html)`!)` Returns the processed[ByteBuffer](https://developer.android.com/reference/java/nio/ByteBuffer.html).                                                                                                                                                                          |
| [ByteBuffer](https://developer.android.com/reference/java/nio/ByteBuffer.html)`!` | [process](https://developer.android.com/reference/kotlin/androidx/media3/muxer/AnnexBToAvccConverter#process(java.nio.ByteBuffer,androidx.media3.muxer.ByteBufferAllocator))`(inputBuffer: `[ByteBuffer](https://developer.android.com/reference/java/nio/ByteBuffer.html)`!, allocator: `[ByteBufferAllocator](https://developer.android.com/reference/kotlin/androidx/media3/muxer/ByteBufferAllocator)`!)` Returns the processed[ByteBuffer](https://developer.android.com/reference/java/nio/ByteBuffer.html). |

## Constants

### DEFAULT

```
const val DEFAULT: AnnexBToAvccConverter!
```

Default implementation for[AnnexBToAvccConverter](https://developer.android.com/reference/kotlin/androidx/media3/muxer/AnnexBToAvccConverter).  

## Public functions

### process

```
fun process(inputBuffer: ByteBuffer!): ByteBuffer!
```

Returns the processed[ByteBuffer](https://developer.android.com/reference/java/nio/ByteBuffer.html).

Expects a[ByteBuffer](https://developer.android.com/reference/java/nio/ByteBuffer.html)input with a zero offset.  

|                                            Parameters                                            |
|--------------------------------------------------------------------------------------------------|-----------------------------|
| `inputBuffer: `[ByteBuffer](https://developer.android.com/reference/java/nio/ByteBuffer.html)`!` | The buffer to be converted. |

### process

```
fun process(inputBuffer: ByteBuffer!, allocator: ByteBufferAllocator!): ByteBuffer!
```

Returns the processed[ByteBuffer](https://developer.android.com/reference/java/nio/ByteBuffer.html).

Expects a[ByteBuffer](https://developer.android.com/reference/java/nio/ByteBuffer.html)input with a zero offset.  

|                                                           Parameters                                                            |
|---------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------|
| `inputBuffer: `[ByteBuffer](https://developer.android.com/reference/java/nio/ByteBuffer.html)`!`                                | The buffer to be converted.                                                                                                        |
| `allocator: `[ByteBufferAllocator](https://developer.android.com/reference/kotlin/androidx/media3/muxer/ByteBufferAllocator)`!` | An allocator for[ByteBuffer](https://developer.android.com/reference/java/nio/ByteBuffer.html)instances that enables memory reuse. |