public class PayloadType extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
PayloadType.Audio
Audio payload type.
|
Modifier and Type | Field and Description |
---|---|
static int |
INVALID_PT |
static int |
MAX_FIXED_PT |
static java.lang.String |
NODENAME |
Constructor and Description |
---|
PayloadType()
Default constructor.
|
PayloadType(int id,
java.lang.String name)
Constructor with Id and name.
|
PayloadType(int id,
java.lang.String name,
int channels)
Constructor with Id, name and number of channels.
|
PayloadType(PayloadType pt)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
int |
getChannels()
Get the number of channels used by this payload type.
|
protected java.lang.String |
getChildAttributes() |
static java.lang.String |
getElementName()
Returns the XML element name of the element.
|
int |
getId()
Get the ID.
|
java.lang.String |
getName()
Get the printable name.
|
int |
hashCode() |
boolean |
isNull()
Return true if the Payload type is not valid.
|
void |
setChannels(int channels)
Set the number of channels for a payload type.
|
void |
setId(int id)
Set the ID.
|
void |
setName(java.lang.String name)
Set the printable name.
|
java.lang.String |
toXML() |
public static final java.lang.String NODENAME
public static int MAX_FIXED_PT
public static int INVALID_PT
public PayloadType(int id, java.lang.String name, int channels)
id
- The identifiername
- A namechannels
- The number of channelspublic PayloadType()
public PayloadType(int id, java.lang.String name)
id
- The identificationname
- A namepublic PayloadType(PayloadType pt)
pt
- The other payload type.public int getId()
public void setId(int id)
id
- IDpublic java.lang.String getName()
public void setName(java.lang.String name)
name
- the printable namepublic int getChannels()
public void setChannels(int channels)
channels
- The number of channelspublic boolean isNull()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public static java.lang.String getElementName()
public java.lang.String toXML()
protected java.lang.String getChildAttributes()