public class AsyncSource extends NetworkSource
Source.SubstreamInfoBUFFER_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 |
|---|
AsyncSource(java.io.InputStream in,
int streamSubType,
java.beans.PropertyChangeListener listener)
Reads mpg, avi, wmv, dv and flv data from java input streams.
|
AsyncSource(java.net.URL url,
java.beans.PropertyChangeListener listener)
Reads mpg, avi, asf, mp4, dv, mkv, wav and flv data from an InputStream opened on the given URL, including jar URLs.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
asyncRead(int numBytes)
Called by async sources on a DSFiltergraph internal dispatch thread.
|
boolean |
canSeek() |
void |
closeSource(boolean terminate)
Closes down the source.
|
DSGraph |
createGraph(int flags)
Creates a DSGraph object with CompressedJavaSource filters that are fed from this source.
|
DSGraph |
createGraph(int flags,
DSFilterInfo videoDecoder,
DSFilterInfo audioDecoder)
Creates a DSGraph object with CompressedJavaSource filters, fed from this source and the given video and audio decoders.
|
int |
getAvailable()
Returns the available number of bytes a pull source can access or 0 if unknown.
|
DSMediaType[] |
getMediaTypes()
Returns the media types created by this source.
|
int |
getSubType() |
boolean |
streamSeek(int toPos)
Instructs the Source implementation to reposition its read pointer in the incoming stream to
the requested byte position.
|
byte[] |
syncRead(int numBytes)
Called by async sources on a native DirectShow thread during stream investigation (the MPEG splitter continues to use this
method also during normal playback).
|
configurePasswordDialog, getDefaultInterfaceAddress, getPasswordDialogOptions, getServerInfo, getTimeConstraint, setConnectionTimeout, setHTTPConnector, setNetworkInterface, setSocketFactory, setTimeConstraint, setUserAgentaddSourceFilter, configureFromSPS, createSourceFilter_async, createSourceFilter, getBuffered, getGraph, getID, getMaxTimeLoaded, getMinBufferTime, getNumChannels, getOffsetTime, getPath, getSourceDuration, getSourceFilter, getSourceFilters, getSourceFlags, getSourceTime, getTransport, getType, isLive, notifyChannelFailure, queryParameter_int, read, sendEvent, setOffsetTime, setSourceRate, setSourceTimepublic AsyncSource(java.io.InputStream in,
int streamSubType,
java.beans.PropertyChangeListener listener)
throws java.lang.Exception
java.lang.Exceptionpublic AsyncSource(java.net.URL url,
java.beans.PropertyChangeListener listener)
throws java.lang.Exception
java.lang.Exceptionpublic DSGraph createGraph(int flags)
SourcecreateGraph in class Sourcepublic DSGraph createGraph(int flags, DSFilterInfo videoDecoder, DSFilterInfo audioDecoder)
SourcecreateGraph in class Sourcepublic void closeSource(boolean terminate)
SourcecloseSource in class Sourcepublic DSMediaType[] getMediaTypes()
SourcegetMediaTypes in class Sourcepublic boolean streamSeek(int toPos)
SourcestreamSeek in class Sourcepublic byte[] syncRead(int numBytes)
Sourcepublic byte[] asyncRead(int numBytes)
Sourcepublic int getAvailable()
SourcegetAvailable in class Sourcepublic int getSubType()