Class RTPChannel
java.lang.Object
javaforce.voip.RTPChannel
- Direct Known Subclasses:
SRTPChannel,SRTPChannelJ9
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanstatic booleanintprotected intprotected intprotected shortprotected shortprotected long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbuildHeader(byte[] data, int type) static voidbuildHeader(byte[] data, int id, int seqnum, int timestamp, int ssrc, boolean last) Builds RTP header in first 12 bytes of data[].booleanchange(SDP.Stream new_stream) Changes the SDP.Stream for this RTP session.intintintintintintbooleangetSamples(short[] data) Returns a packet of decoded samples.intstatic intgetseqnum(byte[] data, int off) intgetssrc()static intgetssrc(byte[] data, int off) static intgettimestamp(byte[] data, int off) intgettimestamp(int delta) intgetVP8id()intgetVP9id()protected voidkeepalive(long now) protected voidprocessRTCP(byte[] data, int off, int len) protected voidprocessRTP(byte[] data, int off, int len) voidsetLog(int id) static voidsetSpeexEnhancedMode(boolean mode) Set speex decoder enhanced mode.static voidsetSpeexQuality(int value) Set speex encoder quality (0-10) Default = 5.booleanstart()voidstop()toString()voidwriteDTMF(char digit, boolean end) Writes a RFC 2833 (DTMF) RTP packet.voidwriteRTCP(byte[] data, int off, int len) Writes a packet to the RTCP port.voidwriteRTP(byte[] data, int off, int len) Writes a packet to the RTP port.
-
Field Details
-
ssrc_src
protected int ssrc_src -
ssrc_dst
protected int ssrc_dst -
turn1ch
protected short turn1ch -
turn2ch
protected short turn2ch -
turnBindExpires
protected long turnBindExpires -
active
protected boolean active -
rtp
-
stream
-
coder
-
log
public int log -
debug
public static boolean debug
-
-
Constructor Details
-
RTPChannel
-
-
Method Details
-
setLog
public void setLog(int id) -
getVP8id
public int getVP8id() -
getVP9id
public int getVP9id() -
getH264id
public int getH264id() -
getH265id
public int getH265id() -
getH263_1998id
public int getH263_1998id() -
getH263_2000id
public int getH263_2000id() -
getRFC2833id
public int getRFC2833id() -
writeRTP
public void writeRTP(byte[] data, int off, int len) Writes a packet to the RTP port. -
writeRTCP
public void writeRTCP(byte[] data, int off, int len) Writes a packet to the RTCP port. -
writeDTMF
public void writeDTMF(char digit, boolean end) Writes a RFC 2833 (DTMF) RTP packet. -
buildHeader
public static void buildHeader(byte[] data, int id, int seqnum, int timestamp, int ssrc, boolean last) Builds RTP header in first 12 bytes of data[]. -
buildHeader
public void buildHeader(byte[] data, int type) -
getseqnum
public int getseqnum() -
gettimestamp
public int gettimestamp(int delta) -
getssrc
public int getssrc() -
getseqnum
public static int getseqnum(byte[] data, int off) -
gettimestamp
public static int gettimestamp(byte[] data, int off) -
getssrc
public static int getssrc(byte[] data, int off) -
getremoteip
-
getremoteport
public int getremoteport() -
start
public boolean start() -
stop
public void stop() -
change
Changes the SDP.Stream for this RTP session. Could occur in a SIP reINVITE. -
processRTP
protected void processRTP(byte[] data, int off, int len) -
processRTCP
protected void processRTCP(byte[] data, int off, int len) -
keepalive
protected void keepalive(long now) -
getSamples
public boolean getSamples(short[] data) Returns a packet of decoded samples. -
setSpeexQuality
public static void setSpeexQuality(int value) Set speex encoder quality (0-10) Default = 5. Affects only new speex instances. -
setSpeexEnhancedMode
public static void setSpeexEnhancedMode(boolean mode) Set speex decoder enhanced mode. Default = false Affects only new speex instances. -
toString
-