|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfi.helsinki.cs.ohtu.mpeg2.ProgramStream
public class ProgramStream
Represents a MPEG-2 program stream.
Field Summary | |
---|---|
private boolean |
dirtyPack
|
(package private) Pack |
pack
|
private BitOutputStream |
stream
|
Constructor Summary | |
---|---|
ProgramStream(BitOutputStream stream)
Class constructor. |
Method Summary | |
---|---|
void |
close()
Closes the stream. |
Pack |
getActivePack()
Gets the active pack, as previously set by #setActivePack(). |
BitOutputStream |
getStream()
Gets the underlying stream. |
void |
packDirtied(Pack pack)
Used internally to make the stream re-emit the pack headers after changing some of the pack's fields. |
void |
setActivePack(Pack pack)
Sets the active pack. |
void |
setStream(BitOutputStream stream)
Sets the stream to write to. |
void |
writePacket(PESPacket packet)
Writes a packet to the stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
Pack pack
private boolean dirtyPack
private BitOutputStream stream
Constructor Detail |
---|
public ProgramStream(BitOutputStream stream)
stream
- The bit stream to write the program stream data to.Method Detail |
---|
public BitOutputStream getStream()
public void setStream(BitOutputStream stream)
stream
- The new stream.public Pack getActivePack()
public void setActivePack(Pack pack)
public void writePacket(PESPacket packet) throws java.io.IOException
Pack
class accessors.
This must not be called when there is no active pack, eg. when the program stream has just been created but the
active pack not yet set.
packet
- The packet to write.
java.io.IOException
- Propagated from the underlying stream write.public void close() throws java.io.IOException
java.io.IOException
- Propagated from writing the end codes to the underlying stream.public void packDirtied(Pack pack)
packDirtied
in interface PackDirtiedListener
pack
- The pack that has been changed.PackDirtiedListener.packDirtied(Pack)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |