org.mobicents.sdp
Class RTPAudioFormat

java.lang.Object
  extended by org.mobicents.sdp.Format
      extended by org.mobicents.sdp.AudioFormat
          extended by org.mobicents.sdp.RTPAudioFormat
All Implemented Interfaces:
Serializable, Cloneable, RTPFormat

public class RTPAudioFormat
extends AudioFormat
implements RTPFormat

This represents the RTP Audio Format. The difference being RTPAudioFormat also carries the pay-load. For example look at SDP

 m=audio 8010 RTP/AVP 0 8 97 
 a=rtpmap:0 PCMU/8000 
 a=rtpmap:8 PCMA/8000
 a=ptime:20     
 


here pay-load is 0 for PCMU, 8 for PCMA

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.mobicents.sdp.AudioFormat
ALAW, BIG_ENDIAN, channels, DOLBYAC3, DVI4, endian, frameRate, frameSizeInBits, G722, G723, G728, G729, G729A, GSM, GSM_MS, IMA4, IMA4_MS, LINEAR, LITTLE_ENDIAN, LPC, MAC3, MAC6, MPEG, MPEGLAYER3, MSADPCM, MSNAUDIO, MSRT24, sampleRate, sampleSizeInBits, signed, SIGNED, TRUESPEECH, ULAW, ULAW_RTP, UNSIGNED, VOXWAREAC10, VOXWAREAC16, VOXWAREAC20, VOXWAREAC8, VOXWAREMETASOUND, VOXWAREMETAVOICE, VOXWARERT29H, VOXWARETQ40, VOXWARETQ60, VOXWAREVR12, VOXWAREVR18
 
Fields inherited from class org.mobicents.sdp.Format
ANY, encoding, FALSE, FORMAT_HASHMAP_DEFAULT_INITIAL_CAPACITY, FORMAT_HASHMAP_DEFAULT_LOAD_FACTOR, NOT_SPECIFIED, TRUE
 
Constructor Summary
RTPAudioFormat(int payload, String encodingName)
          Creates a new instance of RTPAudioFormat
RTPAudioFormat(int payload, String encodingName, double sampleRate, int bits, int chans)
           
RTPAudioFormat(int payload, String encodingName, double sampleRate, int bits, int chans, int endian, int signed)
           
 
Method Summary
 Collection<javax.sdp.Attribute> encode()
          Encodes format objects to SDP attributes.
 int getPayloadType()
          Defines the RTP payload type.
static RTPAudioFormat parseFormat(String encodingName)
           
static RTPAudioFormat parseRtpmapFormat(String rtpmap)
           
 void setPayloadType(int payload)
           
 String toSdp()
           
 
Methods inherited from class org.mobicents.sdp.AudioFormat
clone, equals, getChannels, getEndian, getFrameRate, getFrameSizeInBits, getSampleRate, getSampleSizeInBits, getSigned, hashCode, matches, toString, toString
 
Methods inherited from class org.mobicents.sdp.Format
getEncoding, isSameEncoding, isSameEncoding
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RTPAudioFormat

public RTPAudioFormat(int payload,
                      String encodingName)
Creates a new instance of RTPAudioFormat


RTPAudioFormat

public RTPAudioFormat(int payload,
                      String encodingName,
                      double sampleRate,
                      int bits,
                      int chans)

RTPAudioFormat

public RTPAudioFormat(int payload,
                      String encodingName,
                      double sampleRate,
                      int bits,
                      int chans,
                      int endian,
                      int signed)
Method Detail

getPayloadType

public int getPayloadType()
Description copied from interface: RTPFormat
Defines the RTP payload type.

Specified by:
getPayloadType in interface RTPFormat
Returns:
and integer payload type number.

setPayloadType

public void setPayloadType(int payload)

parseFormat

public static RTPAudioFormat parseFormat(String encodingName)

parseRtpmapFormat

public static RTPAudioFormat parseRtpmapFormat(String rtpmap)

encode

public Collection<javax.sdp.Attribute> encode()
Description copied from interface: RTPFormat
Encodes format objects to SDP attributes.

Specified by:
encode in interface RTPFormat
Returns:
a collection of attributes which represents this format object

toSdp

public String toSdp()


Copyright © 2013 TeleStax, Inc.. All Rights Reserved.