public interface Stream
Modifier and Type | Method and Description |
---|---|
void |
configure()
Configures the stream.
|
long |
getBitrate()
Returns an approximation of the bit rate consumed by the stream in bit per seconde.
|
int[] |
getDestinationPorts()
Returns a pair of destination ports, the first one is the
one used for RTP and the second one is used for RTCP.
|
int[] |
getLocalPorts()
Returns a pair of source ports, the first one is the
one used for RTP and the second one is used for RTCP.
|
java.lang.String |
getSessionDescription()
Returns a description of the stream using SDP.
|
int |
getSSRC()
Returns the SSRC of the underlying
RtpSocket . |
boolean |
isStreaming() |
void |
setDestinationAddress(java.net.InetAddress dest)
Sets the destination ip address of the stream.
|
void |
setDestinationPorts(int dport)
Sets the destination ports of the stream.
|
void |
setDestinationPorts(int rtpPort,
int rtcpPort)
Sets the destination ports of the stream.
|
void |
setOutputStream(java.io.OutputStream stream,
byte channelIdentifier)
If a TCP is used as the transport protocol for the RTP session,
the output stream to which RTP packets will be written to must
be specified with this method.
|
void |
setTimeToLive(int ttl)
Sets the Time To Live of packets sent over the network.
|
void |
start()
Starts the stream.
|
void |
stop()
Stops the stream.
|
void configure() throws java.lang.IllegalStateException, java.io.IOException
getSessionDescription()
to apply your configuration of the stream.java.lang.IllegalStateException
java.io.IOException
void start() throws java.lang.IllegalStateException, java.io.IOException
configure()
.java.lang.IllegalStateException
java.io.IOException
void stop()
void setTimeToLive(int ttl) throws java.io.IOException
ttl
- The time to livejava.io.IOException
void setDestinationAddress(java.net.InetAddress dest)
dest
- The destination address of the streamvoid setDestinationPorts(int dport)
dport
- The destination portvoid setDestinationPorts(int rtpPort, int rtcpPort)
rtpPort
- Destination port that will be used for RTPrtcpPort
- Destination port that will be used for RTCPvoid setOutputStream(java.io.OutputStream stream, byte channelIdentifier)
int[] getLocalPorts()
int[] getDestinationPorts()
int getSSRC()
RtpSocket
.long getBitrate()
java.lang.String getSessionDescription() throws java.lang.IllegalStateException
configure()
.java.lang.IllegalStateException
- Thrown when configure()
wa not called.boolean isStreaming()