INNER CODE UNIT · Java
configure
fyhertz/libstreaming · src/net/majorkernelpanic/streaming/MediaStream.java:253
public synchronized void configure() throws IllegalStateException, IOException {
if (mStreaming) throw new IllegalStateException("Can't be called while streaming.");
if (mPacketizer != null) {
mPacketizer.setDestination(mDestination, mRtpPort, mRtcpPort);
mPacketizer.getRtpSocket().setOutputStream(mOutputStream, mChannelIdentifier);
}
mMode = mRequestedMode;
mConfigured = true;
}
/** Starts the stream. */
public synchronized void start() throws IllegalStateException, IOException {
if (mDestination==null)
throw new IllegalStateException("No destination ip address set for the stream !");
if (mRtpPort<=0 || mRtcpPort<=0)
throw new IllegalStateException("No destination ports set for the stream !");