public class MPEG4Source extends NetworkSource
Source.SubstreamInfo| Modifier and Type | Field and Description |
|---|---|
protected int |
aIndex |
protected int |
aTime |
protected CompressedJavaSource |
audioFilter |
protected int |
audioTrackID |
protected DSMediaType |
audioType |
protected JSampleBuffer |
avcsb |
protected java.util.Vector |
chunkVec |
protected int |
filtersBuilt |
protected DSGraph |
graph |
protected boolean |
graphBuilt |
protected boolean |
mdatRead |
protected boolean |
running |
protected java.util.Vector |
sampleVec |
protected Source |
srcInstance |
protected java.util.Vector |
startupBuffer |
protected java.util.Vector |
tempFilters |
protected CompressedJavaSource |
videoFilter |
protected int |
videoTrackID |
protected DSMediaType |
videoType |
protected int |
vIndex |
protected int |
vTime |
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 |
|---|
MPEG4Source(java.net.URL mp4Url,
int flags,
java.beans.PropertyChangeListener listener)
Opens the stream at the given http:// or file:// URL.
|
| Modifier and Type | Method and Description |
|---|---|
void |
closeSource(boolean terminate)
Closes down the source.
|
DSGraph |
createGraph(int graphFlags)
Creates a DSGraph object with CompressedJavaSource filters that are fed from this source.
|
DSGraph |
createGraph(int graphFlags,
DSFilterInfo videoDecoder,
DSFilterInfo audioDecoder)
Creates a DSGraph object with CompressedJavaSource filters, fed from this source and the given video and audio decoders.
|
protected void |
createSourceFilter(DSMediaType mediaType) |
DSMediaType[] |
getMediaTypes()
Returns the media types created by this source.
|
int |
getMinBufferTime()
Returns this Source's minimum buffer requirements in msec worth of data.
|
int |
getSourceTime() |
protected void |
readSampleDescription(DSMediaType mediaType,
byte[] data,
int pos,
int size) |
protected int |
readSampleTable(int mediaType,
byte[] tableData,
int pos,
int size) |
protected void |
readTrack(byte[] trackData,
int pos,
int size) |
static void |
setMinBufferTime(int time) |
void |
setSourceTime(int time)
Repositions the source, application code should rather not use this method directly, but stick with DSFiltergraph methods.
|
configurePasswordDialog, getDefaultInterfaceAddress, getPasswordDialogOptions, getServerInfo, getTimeConstraint, setConnectionTimeout, setHTTPConnector, setNetworkInterface, setSocketFactory, setTimeConstraint, setUserAgentaddSourceFilter, asyncRead, canSeek, configureFromSPS, createSourceFilter_async, createSourceFilter, getAvailable, getBuffered, getGraph, getID, getMaxTimeLoaded, getNumChannels, getOffsetTime, getPath, getSourceDuration, getSourceFilter, getSourceFilters, getSourceFlags, getTransport, getType, isLive, notifyChannelFailure, queryParameter_int, read, sendEvent, setOffsetTime, setSourceRate, streamSeek, syncReadprotected Source srcInstance
protected DSMediaType videoType
protected DSMediaType audioType
protected JSampleBuffer avcsb
protected int filtersBuilt
protected int videoTrackID
protected int audioTrackID
protected int vIndex
protected int aIndex
protected int vTime
protected int aTime
protected CompressedJavaSource videoFilter
protected CompressedJavaSource audioFilter
protected java.util.Vector tempFilters
protected java.util.Vector startupBuffer
protected java.util.Vector chunkVec
protected java.util.Vector sampleVec
protected DSGraph graph
protected boolean running
protected boolean graphBuilt
protected boolean mdatRead
public MPEG4Source(java.net.URL mp4Url,
int flags,
java.beans.PropertyChangeListener listener)
throws java.lang.Exception
java.lang.Exceptionpublic void closeSource(boolean terminate)
SourcecloseSource in class Sourcepublic static void setMinBufferTime(int time)
public int getMinBufferTime()
SourcegetMinBufferTime in class Sourcepublic void setSourceTime(int time)
SourcesetSourceTime in class Sourcepublic int getSourceTime()
getSourceTime in class Sourcepublic DSGraph createGraph(int graphFlags)
SourcecreateGraph in class Sourcepublic DSGraph createGraph(int graphFlags, DSFilterInfo videoDecoder, DSFilterInfo audioDecoder)
SourcecreateGraph in class Sourceprotected void createSourceFilter(DSMediaType mediaType)
public DSMediaType[] getMediaTypes()
SourcegetMediaTypes in class Sourceprotected void readTrack(byte[] trackData,
int pos,
int size)
protected void readSampleDescription(DSMediaType mediaType, byte[] data, int pos, int size)
protected int readSampleTable(int mediaType,
byte[] tableData,
int pos,
int size)