public class RTSPSource extends NetworkSource
| ___________ java __________ | RTPChannel - RTPHandler --> | |
__________________ native DS ___________________ | CompressedJavaSource - Demultiplexers / Decoders etc | |
||
| Network ->RTSP | Source | => | |
| | RTPChannel - RTPHandler --> | | | CompressedJavaSource - Demultiplexers / Decoders etc | | ||
|
|
|
Source.SubstreamInfo| Modifier and Type | Field and Description |
|---|---|
static int |
FORCE_MULTICAST
RTSP specific setup flags
|
static int |
FORCE_SDP_FRAMERATE
RTSP specific setup flags
|
static int |
FORCE_SDP_IP
RTSP specific setup flags
|
static int |
FORCE_TCP
RTSP specific setup flags
|
static int |
IGNORE_PKT_SSRC
RTSP specific setup flags
|
static int |
NO_RTCP
RTSP specific setup flags
|
BUFFER_OVERFLOW, CONNECTION_TIMEOUT, FASTSTART, H264_FASTSTART, H264_FORCE_INLINE_SPS, H264_OMMIT_SPS, H264_PASS_INLINE_SPS, HTTP_ERROR, IDLE_TIMEOUT, KF_NOTIFY, LIVE_SRC, MAX_BUFFER_TIME, MAX_DURATION, MAX_FRAME_TIME, MP4V_MP2_VIDEOINFO, MP4V_OMMIT_VOL, MP4V_SKIP_UD, myBufferTime, NO_USER_PROMPT, READ_USER_DATA, RECEIVE_TIMEOUT, RTCP_RECEIVE_ERROR, SEEK_FAILURE, SOCKET_ERROR, STARVING, UDP_UNCONNECTEDASYNC, AUTO_GC, DIRECT, ES, FILTER_SETUP_ERROR, FLV, HTTP, HTTP_AUDIO, JAS, MJPG, MKV, MP4, PES_PRIVATE, PSNET, PULL, PUSH, RAW, RTMP, RTP, RTSP, SHOUTCAST, SS_CLOSED, SS_CONNECT, SS_CONNECTED, SS_DONE, SS_EOS, SS_FORMAT_READ, SS_REDIRECT, SS_RUNNING, SS_SEEKING, SS_SETUP, SS_STREAMS_READ, SS_TCP_ROLLOVER, TIMEOUT, TSFILE, TSNET, UNKNOWN| Constructor and Description |
|---|
RTSPSource(java.lang.String rtspURL,
int flags,
java.beans.PropertyChangeListener listener)
Initialize a rtsp session with the media server at the given url.
|
RTSPSource(java.lang.String rtspURL,
java.beans.PropertyChangeListener listener)
Initialize a rtsp session with the media server at the given url.
|
RTSPSource(java.lang.String rtspURL,
java.lang.String userName,
java.lang.String passWord,
int flags,
java.beans.PropertyChangeListener listener)
Initialize a rtsp session with the media server at the given url passing the given credentials for authorization (if these are null or
invalid a password dialog will be brought up).
The constructor performs some asynchronous connection and setup operations behind the scenes, that will be caught by a subsequent call to RTSPSource.createGraph(..). As an alternative to using a standard rtsp:// url you can pass the path to an .sdp file or use a string like "SAP"+(://optionalNonDefaultSAP_IPandPort). |
| Modifier and Type | Method and Description |
|---|---|
void |
closeSource(boolean terminate)
Closes down the source.
|
DSGraph |
createGraph(int graphFlags)
Use this to create a filtergraph from the source.
|
DSGraph |
createGraph(int graphFlags,
DSFilterInfo videoDecoder,
DSFilterInfo audioDecoder)
Creates a filtergraph with the given decoders from the source.
|
CompressedJavaSource |
createSourceFilter(int sf,
DSMediaType mediaType)
This is called by the various source implementations once they have determined, what kind of media they deal with etc.
It basically calls through to DSGraph.insertCompressedSourceFilter(...). |
int |
getLocalPort() |
DSMediaType[] |
getMediaTypes()
Returns the media types created by this source.
|
int |
getMinBufferTime()
Returns this Source's minimum buffer requirements in msec worth of data.
|
CompressedJavaSource[] |
getSourceFilters()
Returns all the CompressedJavaSource filters, that the Source created.
|
int |
getSourceTime() |
void |
notifyChannelFailure(int severity,
int chNr,
int cause,
java.lang.String desc) |
static java.lang.String |
parseReferenceMovie(java.lang.String myPath)
Reads rtsp URL from a "Quicktime reference movie".
|
static void |
setLocalPort(int lp) |
static void |
setMinBufferTime(int time) |
static void |
setReceiveBufferSize(int socketReceiveBufferSize) |
void |
setSourceRate(float rate)
Starts and pauses the source, application code should rather not use this method directly, but stick with DSFiltergraph methods.
|
void |
setSourceTime(int time)
Repositions the source, application code should rather not use this method directly, but stick with DSFiltergraph methods.
|
static void |
setTCPRolloverTimeout(int msec)
RTP communication in principle prefers UDP connections, however in many usecases this will be blocked by firewalls etc, so that
data needs to be sent via TCP.
|
configurePasswordDialog, getDefaultInterfaceAddress, getPasswordDialogOptions, getServerInfo, getTimeConstraint, setConnectionTimeout, setHTTPConnector, setNetworkInterface, setSocketFactory, setTimeConstraint, setUserAgentaddSourceFilter, asyncRead, canSeek, configureFromSPS, createSourceFilter_async, getAvailable, getBuffered, getGraph, getID, getMaxTimeLoaded, getNumChannels, getOffsetTime, getPath, getSourceDuration, getSourceFilter, getSourceFlags, getTransport, getType, isLive, queryParameter_int, read, sendEvent, setOffsetTime, streamSeek, syncReadpublic static final int FORCE_TCP
public static final int FORCE_MULTICAST
public static final int NO_RTCP
public static final int FORCE_SDP_FRAMERATE
public static final int FORCE_SDP_IP
public static final int IGNORE_PKT_SSRC
public RTSPSource(java.lang.String rtspURL,
java.beans.PropertyChangeListener listener)
throws java.lang.Exception
java.lang.Exceptionpublic RTSPSource(java.lang.String rtspURL,
int flags,
java.beans.PropertyChangeListener listener)
throws java.lang.Exception
java.lang.Exceptionpublic RTSPSource(java.lang.String rtspURL,
java.lang.String userName,
java.lang.String passWord,
int flags,
java.beans.PropertyChangeListener listener)
throws java.lang.Exception
java.lang.Exceptionpublic static void setLocalPort(int lp)
public int getLocalPort()
public static void setMinBufferTime(int time)
public int getMinBufferTime()
SourcegetMinBufferTime in class Sourcepublic static void setReceiveBufferSize(int socketReceiveBufferSize)
public static void setTCPRolloverTimeout(int msec)
public void closeSource(boolean terminate)
SourcecloseSource in class Sourcepublic int getSourceTime()
getSourceTime in class Sourcepublic void setSourceTime(int time)
SourcesetSourceTime in class Sourcepublic void setSourceRate(float rate)
SourcesetSourceRate in class Sourcepublic DSGraph createGraph(int graphFlags) throws DSJException
createGraph in class SourceDSJExceptionpublic DSGraph createGraph(int graphFlags, DSFilterInfo videoDecoder, DSFilterInfo audioDecoder) throws DSJException
createGraph in class SourceDSJExceptionpublic CompressedJavaSource createSourceFilter(int sf, DSMediaType mediaType)
SourcecreateSourceFilter in class Sourcepublic CompressedJavaSource[] getSourceFilters()
SourcegetSourceFilters in class Sourcepublic DSMediaType[] getMediaTypes()
SourcegetMediaTypes in class Sourcepublic void notifyChannelFailure(int severity,
int chNr,
int cause,
java.lang.String desc)
notifyChannelFailure in class Sourcepublic static java.lang.String parseReferenceMovie(java.lang.String myPath)