@Test public void testEncodePCMA() throws Exception { Collection<Attribute> attributes = AVProfile.PCMA.encode(); assertEquals(1, attributes.size()); Attribute rtpmap = getAttribute(attributes, 0); assertEquals("rtpmap",rtpmap.getName()); assertEquals("8 pcma/8000",rtpmap.getValue()); }
public Collection<Attribute> encode() { Vector<Attribute> list = new Vector(); list.add(sdpFactory.createAttribute("rtpmap", toSdp())); if (getEncoding().equalsIgnoreCase("telephone-event")) { list.add(sdpFactory.createAttribute("fmtp", payloadType + " 0-15")); } else if (getEncoding().equalsIgnoreCase("g729")) { list.add(sdpFactory.createAttribute("fmtp", payloadType + " annex=b")); } return list; }
RTPAudioFormat extends AudioFormat implements RTPFormat { public Collection<Attribute> encode() { Vector<Attribute> list = new Vector(); list.add(sdpFactory.createAttribute("rtpmap", toSdp())); if (getEncoding().equalsIgnoreCase("telephone-event")) { list.add(sdpFactory.createAttribute("fmtp", payloadType + " 0-15")); } else if (getEncoding().equalsIgnoreCase("g729")) { list.add(sdpFactory.createAttribute("fmtp", payloadType + " annex=b")); } return list; } }
RTPAudioFormat extends AudioFormat implements RTPFormat { public Collection<Attribute> encode() { Vector<Attribute> list = new Vector(); list.add(sdpFactory.createAttribute("rtpmap", toSdp())); if (getEncoding().equalsIgnoreCase("telephone-event")) { list.add(sdpFactory.createAttribute("fmtp", payloadType + " 0-15")); } else if (getEncoding().equalsIgnoreCase("g729")) { list.add(sdpFactory.createAttribute("fmtp", payloadType + " annex=b")); } return list; } RTPAudioFormat(int payload, String encodingName);  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); }
RTPAudioFormat extends AudioFormat implements RTPFormat { public Collection<Attribute> encode() { Vector<Attribute> list = new Vector(); list.add(sdpFactory.createAttribute("rtpmap", toSdp())); if (getEncoding().equalsIgnoreCase("telephone-event")) { list.add(sdpFactory.createAttribute("fmtp", payloadType + " 0-15")); } else if (getEncoding().equalsIgnoreCase("g729")) { list.add(sdpFactory.createAttribute("fmtp", payloadType + " annex=b")); } return list; } RTPAudioFormat(int payload, String encodingName);  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); int getPayloadType(); void setPayloadType(int payload); static RTPAudioFormat parseFormat(String rtpmap); Collection<Attribute> encode(); String toSdp(); }
RTPAudioFormat extends AudioFormat implements RTPFormat { public Collection<Attribute> encode() { Vector<Attribute> list = new Vector(); list.add(sdpFactory.createAttribute("rtpmap", toSdp())); if (getEncoding().equalsIgnoreCase("telephone-event")) { list.add(sdpFactory.createAttribute("fmtp", payloadType + " 0-15")); } else if (getEncoding().equalsIgnoreCase("g729")) { list.add(sdpFactory.createAttribute("fmtp", payloadType + " annex=b")); } return list; } RTPAudioFormat(int payload, String encodingName);  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); int getPayloadType(); void setPayloadType(int payload); static RTPAudioFormat parseFormat(String rtpmap); Collection<Attribute> encode(); String toSdp();  }