Package moe.kyokobot.koe.codec
Class CodecInfo
java.lang.Object
moe.kyokobot.koe.codec.CodecInfo
- Direct Known Subclasses:
H264CodecInfo,OpusCodecInfo,VP8CodecInfo,VP9CodecInfo
Immutable codec capabilities and metadata.
Represents what a codec CAN do, not what it IS doing in a session.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbyteintbyte@NotNull StringgetName()@NotNull CodecTypegetType()inthashCode()@NotNull CodecInstanceCreates a codec instance using default payload types (for Discord's simple protocol).@NotNull CodecInstanceinstantiate(byte negotiatedPayloadType, byte negotiatedRtxPayloadType) Creates a codec instance with negotiated payload types.@NotNull JsonObjecttoJson()Converts this codec info to JSON format for gateway protocol.
-
Field Details
-
name
-
type
-
defaultPriority
protected final int defaultPriority -
defaultPayloadType
protected final byte defaultPayloadType -
defaultRtxPayloadType
protected final byte defaultRtxPayloadType
-
-
Constructor Details
-
CodecInfo
-
-
Method Details
-
getName
-
getType
-
getDefaultPayloadType
public byte getDefaultPayloadType() -
getDefaultRtxPayloadType
public byte getDefaultRtxPayloadType() -
getDefaultPriority
public int getDefaultPriority() -
instantiate
@NotNull public @NotNull CodecInstance instantiate(byte negotiatedPayloadType, byte negotiatedRtxPayloadType) Creates a codec instance with negotiated payload types.- Parameters:
negotiatedPayloadType- the negotiated payload type for this sessionnegotiatedRtxPayloadType- the negotiated RTX payload type for this session- Returns:
- a new CodecInstance with the negotiated payload types
-
instantiate
Creates a codec instance using default payload types (for Discord's simple protocol).- Returns:
- a new CodecInstance with default payload types
-
toJson
Converts this codec info to JSON format for gateway protocol.- Returns:
- JSON representation of this codec
-
equals
-
hashCode
public int hashCode()
-