CodecManager

interface CodecManager

Manages audio codec implementations.

Functions

Link copied to clipboard
@NotNull
abstract fun <T : AudioDecoder?> createDecoder(@NotNull codecInfo: @NotNull CodecInfo, sampleRate: Int, stereo: Boolean, frameSize: Int): @NotNull T
Creates a new audio decoder with the specified codec information and configuration parameters.
Link copied to clipboard
@NotNull
abstract fun <T : AudioEncoder?> createEncoder(@NotNull codecInfo: @NotNull CodecInfo, sampleRate: Int, stereo: Boolean, mtuSize: Int): @NotNull T
Creates a new audio encoder with the specified codec information and configuration parameters.
Link copied to clipboard
@NotNull
abstract fun getCodecs(): @NotNull Collection<CodecSupplier<out Any, out Any>>
Gets a collection of all registered codec suppliers.
Link copied to clipboard
abstract fun register(@NotNull supplier: @NotNull CodecSupplier<out Any, out Any>)
Registers a codec supplier to provide codec implementations.
Link copied to clipboard
abstract fun unregister(@NotNull name: @NotNull String): Boolean
Unregisters a codec by its name.
abstract fun unregister(@NotNull supplier: @NotNull CodecSupplier<out Any, out Any>): Boolean
Unregisters a codec supplier.