Interface OfferedSDP
public interface OfferedSDP
Represents an offered SDP (Session Description Protocol) media description, encapsulating its media type, media
direction, connection details, and offered codecs.
Implementations of this interface provide access to the offered SDP media description's properties, which are used to configure and manage the media stream.
Example usage:
OfferedSDP offeredSDP = new OfferedSDPImpl.Builder()
.mediaType(MediaType.AUDIO)
.mediaDirection(MediaDirection.SENDONLY)
.connection(connection)
.offeredCodecs(List.of(codec))
.build();
Notes:
- The value for
mediaTypemust be an instance of theMediaTypeenumeration. - The value for
mediaDirectionmust be an instance of theMediaDirectionenumeration. - The
connectionobject in an offered SDP should include the appropriate source IP and port, typicallymediaSourceIpandmediaSourcePortas used in aCreateMediaRequest.
- Author:
- Copyright (c) 2025 by Oracle, Inc. All Rights Reserved.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceBuilder interface for creating immutableOfferedSDPinstances. -
Method Summary
Modifier and TypeMethodDescriptionGets the connection details for the offered SDP media description.Gets the media direction of the offered SDP media description.Gets the media type of the offered SDP media description.Gets the list of codecs offered by the SDP media description.voidsetConnection(Connection connection) Sets the connection details for the offered SDP media description.voidsetMediaDirection(MediaDirection mediaDirection) Sets the media direction of the offered SDP media description.voidsetMediaType(MediaType mediaType) Sets the media type of the offered SDP media description.voidsetOfferedCodecs(List<Codec> offeredCodecs) Sets the list of codecs offered by the SDP media description.
-
Method Details
-
getMediaType
MediaType getMediaType()Gets the media type of the offered SDP media description.- Returns:
- the media type.
-
setMediaType
Sets the media type of the offered SDP media description.- Parameters:
mediaType- the media type to set.
-
getMediaDirection
MediaDirection getMediaDirection()Gets the media direction of the offered SDP media description.- Returns:
- the media direction.
-
setMediaDirection
Sets the media direction of the offered SDP media description.- Parameters:
mediaDirection- the media direction to set.
-
getConnection
Connection getConnection()Gets the connection details for the offered SDP media description.- Returns:
- the connection details.
-
setConnection
Sets the connection details for the offered SDP media description.- Parameters:
connection- the connection details to set.
-
getOfferedCodecs
Gets the list of codecs offered by the SDP media description.- Returns:
- the list of offered codecs.
-
setOfferedCodecs
Sets the list of codecs offered by the SDP media description.- Parameters:
offeredCodecs- the list of offered codecs to set.
-