Interface Codec
public interface Codec
Represents a codec used in media processing, encapsulating its name and parameters.
Implementations of this interface provide access to the codec's name and its associated parameters. The codec's name typically identifies the type of codec (e.g., H.264, Opus), while its parameters contain specific configuration details required for the codec's operation.
Example usage:
Codec codec = new CodecImpl.Builder()
.name(codecName)
.parameters(codecParams)
.build();
Replace codecName and codecParams with your desired values or objects implementing CodecParameters.
- Author:
- Copyright (c) 2025 by Oracle, Inc. All Rights Reserved.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceBuilder interface for creating immutableCodecinstances. -
Method Summary
Modifier and TypeMethodDescriptiongetName()Gets the name of the codec.Gets the parameters associated with the codec.voidSets the name of the codec.voidsetParameters(CodecParameters parameters) Sets the parameters associated with the codec.
-
Method Details
-
getName
String getName()Gets the name of the codec.- Returns:
- the name of the codec.
-
setName
Sets the name of the codec.- Parameters:
name- the name of the codec.
-
getParameters
CodecParameters getParameters()Gets the parameters associated with the codec.- Returns:
- the codec parameters.
-
setParameters
Sets the parameters associated with the codec.- Parameters:
parameters- the codec parameters.
-