|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfi.helsinki.cs.ohtu.mpeg2.DecoderBuffer
public class DecoderBuffer
Implements a simple model of decoder buffering.
| Nested Class Summary | |
|---|---|
private static class |
DecoderBuffer.DecoderBufferEntry
|
| Field Summary | |
|---|---|
private java.util.Queue<DecoderBuffer.DecoderBufferEntry> |
buffer
|
private int |
length
|
private int |
size
|
| Constructor Summary | |
|---|---|
DecoderBuffer(int size)
Creates a new decoder buffer with the given buffer size. |
|
| Method Summary | |
|---|---|
void |
add(long dts,
int length)
Adds a new decoding entry to the buffer. |
int |
getLength()
Returns the length of the buffer, that is, the sum of the lengths of all the entries. |
int |
getSize()
Returns the size of the buffer. |
int |
getSpace()
Returns the space available in the buffer. |
void |
removeDecoded(long pcr)
Removes all the decoding entries to be decoded by the given PCR. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final java.util.Queue<DecoderBuffer.DecoderBufferEntry> buffer
private final int size
private int length
| Constructor Detail |
|---|
public DecoderBuffer(int size)
size - the size of the buffer| Method Detail |
|---|
public void add(long dts,
int length)
dts - the DTS for the entry, i.e. when the entry is removedlength - the length of the entrypublic void removeDecoded(long pcr)
pcr - the program clock referencepublic int getLength()
public int getSize()
public int getSpace()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||