org.davic.mpeg
Class Service

java.lang.Object
  extended byorg.davic.mpeg.Service
Direct Known Subclasses:
DvbService

public class Service
extends java.lang.Object

This class is used to represent a Service within an MPEG Transport Stream.


Constructor Summary
protected Service()
           
 
Method Summary
 int getServiceId()
           
 TransportStream getTransportStream()
           
 ElementaryStream retrieveElementaryStream(int pid)
           
 ElementaryStream[] retrieveElementaryStreams()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Service

protected Service()
Method Detail

getTransportStream

public TransportStream getTransportStream()
Returns:
a reference to the TransportStream object to which this Service belongs.

getServiceId

public int getServiceId()
Returns:
the service_id (or equivalently the program_number) of this service.

retrieveElementaryStream

public ElementaryStream retrieveElementaryStream(int pid)
Parameters:
pid - the value of MPEG-2 Transport Stream packets that carry the elementary stream.
Returns:
a reference to the ElementaryStream object that represents the Elementary Stream carried by packets with the specified PID. Null is returned if the specified PID is not present within this service or if no Elementary Stream is carried by the specified PID or if the required information is not available.

retrieveElementaryStreams

public ElementaryStream[] retrieveElementaryStreams()
Returns:
the array of all ElementaryStream objects present within this service. When the required information is not available null is returned.