public class TSFileSource extends Source implements MPEGSource
Source.SubstreamInfoASYNC, 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, UNKNOWNNO_AUDIO, RESOLVE| Constructor and Description |
|---|
TSFileSource(java.lang.String path,
MPEGProgram prg,
int srcFlags,
java.beans.PropertyChangeListener listener)
Opens the transportstream file (m2t, ts) at path, playing the given program from a multiprogram stream..
|
TSFileSource(java.lang.String path,
java.beans.PropertyChangeListener listener)
Opens the transportstream file (m2t, ts, mts) at path, playing the first (or only) program found.
|
| Modifier and Type | Method and Description |
|---|---|
void |
broadcast(java.lang.String baseIP,
MPEGProgram[] prgs,
int flags) |
void |
closeSource(boolean terminate)
Closes down the source.
|
DSGraph |
createGraph(DSGraph partialGraph) |
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.
|
DSMediaType[] |
getMediaTypes()
Returns the media types created by this source.
|
int |
getPMT_PID()
Returns the PMT PID of the currently playing program.
|
int[] |
getProgramPIDs()
Returns the elementary stream PIDs of the currently playing program.
|
MPEGProgram[] |
getPrograms()
Returns an array of all programs seen in a stream.
|
int |
getSourceTime() |
int[] |
getStreamTypes()
Returns the elementary streamtypes of the currently playing program.
|
byte[] |
read()
When in PULL mode, the source filter calls this method to pull data from the source.
|
static void |
setAudioStreamIndex(int audioStreamIndex) |
void |
setSourceTime(int time)
Repositions the source, application code should rather not use this method directly, but stick with DSFiltergraph methods.
|
addSourceFilter, asyncRead, canSeek, configureFromSPS, createSourceFilter_async, createSourceFilter, getAvailable, getBuffered, getGraph, getID, getMaxTimeLoaded, getMinBufferTime, getNumChannels, getOffsetTime, getPath, getSourceDuration, getSourceFilter, getSourceFilters, getSourceFlags, getTransport, getType, isLive, notifyChannelFailure, queryParameter_int, sendEvent, setOffsetTime, setSourceRate, streamSeek, syncReadpublic TSFileSource(java.lang.String path,
java.beans.PropertyChangeListener listener)
throws java.lang.Exception
java.lang.Exceptionpublic TSFileSource(java.lang.String path,
MPEGProgram prg,
int srcFlags,
java.beans.PropertyChangeListener listener)
throws java.lang.Exception
java.lang.Exceptionpublic DSGraph createGraph(int graphFlags)
SourcecreateGraph in class Sourcepublic DSGraph createGraph(int graphFlags, DSFilterInfo videoDecoder, DSFilterInfo audioDecoder)
SourcecreateGraph in class Sourcepublic void closeSource(boolean terminate)
SourcecloseSource in class Sourcepublic DSMediaType[] getMediaTypes()
SourcegetMediaTypes in class Sourcepublic static void setAudioStreamIndex(int audioStreamIndex)
public int getPMT_PID()
MPEGSourcegetPMT_PID in interface MPEGSourcepublic int[] getProgramPIDs()
MPEGSourcegetProgramPIDs in interface MPEGSourcepublic int[] getStreamTypes()
MPEGSourcegetStreamTypes in interface MPEGSourcepublic MPEGProgram[] getPrograms()
MPEGSourcegetPrograms in interface MPEGSourcepublic void broadcast(java.lang.String baseIP,
MPEGProgram[] prgs,
int flags)
throws java.lang.Exception
java.lang.Exceptionpublic byte[] read()
Sourcepublic void setSourceTime(int time)
SourcesetSourceTime in class Sourcepublic int getSourceTime()
getSourceTime in class Source