Interface NegotiatedSDP


public interface NegotiatedSDP
Represents a negotiated SDP (Session Description Protocol) media description, encapsulating its media type, media direction, connection details, and negotiated codecs.

Implementations of this interface provide access to the negotiated SDP media description's properties, which are used to configure and manage the media stream.

Example usage:


 NegotiatedSDP negotiatedSDP = new NegotiatedSDPImpl.Builder()
     .mediaType(MediaType.AUDIO)
     .mediaDirection(MediaDirection.SENDONLY)
     .connection(connection)
     .negotiatedCodecs(List.of(codec))
     .build();
 

Notes:

  • The value for mediaType must be an instance of the MediaType enumeration.
  • The value for mediaDirection must be an instance of the MediaDirection enumeration.
  • The connection object in a negotiated SDP must include the mediaReceiverIp and mediaReceiverPort.
Replace each variable with the appropriate value or object for your application.

Author:
Copyright (c) 2025 by Oracle, Inc. All Rights Reserved.
  • Method Details

    • getMediaType

      MediaType getMediaType()
      Gets the media type of the negotiated SDP media description.
      Returns:
      the media type.
    • setMediaType

      void setMediaType(MediaType mediaType)
      Sets the media type of the negotiated SDP media description.
      Parameters:
      mediaType - the media type to set.
    • getMediaDirection

      MediaDirection getMediaDirection()
      Gets the media direction of the negotiated SDP media description.
      Returns:
      the media direction.
    • setMediaDirection

      void setMediaDirection(MediaDirection mediaDirection)
      Sets the media direction of the negotiated SDP media description.
      Parameters:
      mediaDirection - the media direction to set.
    • getConnection

      Connection getConnection()
      Gets the connection details for the negotiated SDP media description.
      Returns:
      the connection details.
    • setConnection

      void setConnection(Connection connection)
      Sets the connection details for the negotiated SDP media description.
      Parameters:
      connection - the connection details to set.
    • getNegotiatedCodecs

      List<Codec> getNegotiatedCodecs()
      Gets the list of codecs negotiated by the SDP media description.
      Returns:
      the list of negotiated codecs.
    • setNegotiatedCodecs

      void setNegotiatedCodecs(List<Codec> negotiatedCodecs)
      Sets the list of codecs negotiated by the SDP media description.
      Parameters:
      negotiatedCodecs - the negotiated codecs to set.