public class RTPURLConnection extends java.net.URLConnection implements RTPAppIntf, RTCPAppIntf
Title: RTPURLConnection
Description: Handler to protocol rtp://
Copyright: Copyright (c) 2007-2008
Company: VoiceInteraction
| Constructor and Description |
|---|
RTPURLConnection(java.net.URL url)
Object constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
APPPktReceived(Participant part,
int subtype,
byte[] name,
byte[] data)
This function is called whenever an Application (APP) packet is received.
|
void |
BYEPktReceived(Participant[] relevantParticipants,
java.lang.String reason)
This function is called whenever a Bye (BYE) packet is received.
|
void |
connect()
Opens a communications link to the resource referenced by this URL,
if such a connection has not already been established.
|
int |
frameSize(int payloadType)
The callback method through which the application can specify
the number of packets that make up a frame for a given payload type.
|
java.io.InputStream |
getInputStream() |
java.io.OutputStream |
getOutputStream()
Returns an output stream that writes to this connection.
|
void |
receiveData(DataFrame frame,
Participant p)
TODO PipeOutputStream.write blocks until data is written! work around it
|
void |
RRPktReceived(long reporterSsrc,
long[] reporteeSsrc,
int[] lossFraction,
int[] cumulPacketsLost,
long[] extHighSeq,
long[] interArrivalJitter,
long[] lastSRTimeStamp,
long[] delayLastSR)
This function is called whenever a Receiver Report (SR) packet is received
and returns unmodified values.
|
void |
SDESPktReceived(Participant[] relevantParticipants)
This function is called whenever a Source Description (SDES) packet is received.
|
void |
SRPktReceived(long ssrc,
long ntpHighOrder,
long ntpLowOrder,
long rtpTimestamp,
long packetCount,
long octetCount,
long[] reporteeSsrc,
int[] lossFraction,
int[] cumulPacketsLost,
long[] extHighSeq,
long[] interArrivalJitter,
long[] lastSRTimeStamp,
long[] delayLastSR)
This function is called whenever a Sender Report (SR) packet is received
and returns unmodified values.
|
void |
userEvent(int type,
Participant[] participant)
The callback method through which the application will receive
notifications about user updates, additions and byes.
|
addRequestProperty, getAllowUserInteraction, getConnectTimeout, getContent, getContent, getContentEncoding, getContentLength, getContentLengthLong, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderField, getHeaderField, getHeaderFieldDate, getHeaderFieldInt, getHeaderFieldKey, getHeaderFieldLong, getHeaderFields, getIfModifiedSince, getLastModified, getPermission, getReadTimeout, getRequestProperties, getRequestProperty, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setConnectTimeout, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setReadTimeout, setRequestProperty, setUseCaches, toStringpublic RTPURLConnection(java.net.URL url)
throws java.lang.UnsupportedOperationException,
java.net.URISyntaxException
url - URLjava.lang.UnsupportedOperationExceptionjava.net.URISyntaxExceptionpublic void connect()
throws java.io.IOException
connect in class java.net.URLConnectionjava.io.IOException - if an I/O error occurs while opening the connection.public java.io.InputStream getInputStream()
throws java.io.IOException
getInputStream in class java.net.URLConnectionjava.io.IOExceptionpublic java.io.OutputStream getOutputStream()
throws java.io.IOException
getOutputStream in class java.net.URLConnectionjava.io.IOExceptionpublic void receiveData(DataFrame frame, Participant p)
receiveData in interface RTPAppIntfframe - DataFramep - Participantpublic void userEvent(int type,
Participant[] participant)
RTPAppIntfuserEvent in interface RTPAppIntftype - the type of eventparticipant - the participants in questionpublic int frameSize(int payloadType)
RTPAppIntfframeSize in interface RTPAppIntfpayloadType - the payload type specified in the RTP packetpublic void SRPktReceived(long ssrc,
long ntpHighOrder,
long ntpLowOrder,
long rtpTimestamp,
long packetCount,
long octetCount,
long[] reporteeSsrc,
int[] lossFraction,
int[] cumulPacketsLost,
long[] extHighSeq,
long[] interArrivalJitter,
long[] lastSRTimeStamp,
long[] delayLastSR)
RTCPAppIntfSRPktReceived in interface RTCPAppIntfssrc - the (SR) SSRC of the senderntpHighOrder - (SR) NTP high orderntpLowOrder - (SR) NTP low orderrtpTimestamp - (SR) RTP timestamp corresponding to the NTP timestamppacketCount - (SR) Packets sent since start of sessionoctetCount - (SR) Octets sent since start of sessionreporteeSsrc - (RR) SSRC of sender the receiver is reporting inlossFraction - (RR) Loss fraction, see RFC 3550cumulPacketsLost - (RR) Cumulative number of packets lostextHighSeq - (RR) Extended highest sequence RTP packet receivedinterArrivalJitter - (RR) Interarrival jitter, see RFC 3550lastSRTimeStamp - (RR) RTP timestamp when last SR was receiveddelayLastSR - (RR) Delay, in RTP, since last SR was receivedpublic void RRPktReceived(long reporterSsrc,
long[] reporteeSsrc,
int[] lossFraction,
int[] cumulPacketsLost,
long[] extHighSeq,
long[] interArrivalJitter,
long[] lastSRTimeStamp,
long[] delayLastSR)
RTCPAppIntfRRPktReceived in interface RTCPAppIntfreporterSsrc - SSRC of the receiver reportingreporteeSsrc - (RR) SSRC of sender the receiver is reporting inlossFraction - (RR) Loss fraction, see RFC 3550cumulPacketsLost - (RR) Cumulative number of packets lostextHighSeq - (RR) Extended highest sequence RTP packet receivedinterArrivalJitter - (RR) Interarrival jitter, see RFC 3550lastSRTimeStamp - (RR) RTP timestamp when last SR was receiveddelayLastSR - (RR) Delay, in RTP, since last SR was receivedpublic void SDESPktReceived(Participant[] relevantParticipants)
RTCPAppIntfSDESPktReceived in interface RTCPAppIntfrelevantParticipants - participants mentioned in the SDES packetpublic void BYEPktReceived(Participant[] relevantParticipants, java.lang.String reason)
RTCPAppIntfBYEPktReceived in interface RTCPAppIntfrelevantParticipants - participants whose SSRC was in the packetreason - the reason provided in the packetpublic void APPPktReceived(Participant part, int subtype, byte[] name, byte[] data)
RTCPAppIntfAPPPktReceived in interface RTCPAppIntfpart - the participant associated with the SSRCsubtype - specified in the packetname - ASCII description of packetdata - in the packet