de.humatic.dsj.util
Class MPEGProgram

java.lang.Object
  extended by de.humatic.dsj.util.MPEGProgram

public class MPEGProgram
extends java.lang.Object

Struct describing a single program within an MPEG stream. This is mainly used with TransportStreams carrying multiple programs. Constructor and setters are public for package design reasons, Application code does not construct instances of this class, but calls MPEGSource.getPrograms() to get an array of programs within an opened stream.


Constructor Summary
MPEGProgram(int pn, int pid)
           
 
Method Summary
 void addIPDestination(java.lang.String ipAndPort)
          Adds an individual target address for the case that this program is retransmitted via IP.
 java.lang.String[] getIPDestinations()
           
 int getPMT_PID()
          Returns the stream ID used for this program's PMT tables.
 int getProgramNr()
           
 int[][] getStreams()
          Returns a two dimensional array holding elementary stream PIDs and the respective streamtypes.
 void setStreams(int[] es_pids, int[] es_stypes)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MPEGProgram

public MPEGProgram(int pn,
                   int pid)
Method Detail

setStreams

public void setStreams(int[] es_pids,
                       int[] es_stypes)

getProgramNr

public int getProgramNr()

getPMT_PID

public int getPMT_PID()
Returns the stream ID used for this program's PMT tables.


getStreams

public int[][] getStreams()
Returns a two dimensional array holding elementary stream PIDs and the respective streamtypes. This information may not be available for all programs in a stream before the corresponding PMT tables have been parsed.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

addIPDestination

public void addIPDestination(java.lang.String ipAndPort)
Adds an individual target address for the case that this program is retransmitted via IP. This is only used in the context of classes that support IP broadcasting of transportstreams (currently DSBDAGraph, TSFile & TSNetworkSource). The string argument should give an IP4 adress in dot decimal format and the wanted port separated by ":" like for example "230.0.0.1:1234".


getIPDestinations

public java.lang.String[] getIPDestinations()