public class TSFileSource extends Source implements MPEGSource
Source.SubstreamInfo
ASYNC, 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
NO_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, syncRead
public TSFileSource(java.lang.String path, java.beans.PropertyChangeListener listener) throws java.lang.Exception
java.lang.Exception
public TSFileSource(java.lang.String path, MPEGProgram prg, int srcFlags, java.beans.PropertyChangeListener listener) throws java.lang.Exception
java.lang.Exception
public DSGraph createGraph(int graphFlags)
Source
createGraph
in class Source
public DSGraph createGraph(int graphFlags, DSFilterInfo videoDecoder, DSFilterInfo audioDecoder)
Source
createGraph
in class Source
public void closeSource(boolean terminate)
Source
closeSource
in class Source
public DSMediaType[] getMediaTypes()
Source
getMediaTypes
in class Source
public static void setAudioStreamIndex(int audioStreamIndex)
public int getPMT_PID()
MPEGSource
getPMT_PID
in interface MPEGSource
public int[] getProgramPIDs()
MPEGSource
getProgramPIDs
in interface MPEGSource
public int[] getStreamTypes()
MPEGSource
getStreamTypes
in interface MPEGSource
public MPEGProgram[] getPrograms()
MPEGSource
getPrograms
in interface MPEGSource
public void broadcast(java.lang.String baseIP, MPEGProgram[] prgs, int flags) throws java.lang.Exception
java.lang.Exception
public byte[] read()
Source
public void setSourceTime(int time)
Source
setSourceTime
in class Source
public int getSourceTime()
getSourceTime
in class Source