|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfi.helsinki.cs.ohtu.mpeg2.video.SequenceHeader
public class SequenceHeader
Represents the first part of the headers in a MPEG-2 video sequence. A video sequence is the highest level syntactic structure in a MPEG-2 video bitstream. A video sequence is described by headers which are written to its immediate beginning. This class represents the "sequence header", the first of those headers. It is the one of the sequence headers MPEG-2 has in common with MPEG-1. In MPEG-2 usage it's always followed by a sequence extension header, which forms an extended sequence header together with the header represented by this class. The extended sequence header is represented by the class ExtendedSequenceHeader.
Nested Class Summary | |
---|---|
static class |
SequenceHeader.AspectRatioInformation
Represents the allowed values for the aspect ratio information field. |
static class |
SequenceHeader.FrameRateCode
Represents the allowed values for the frame rate code field. |
Field Summary | |
---|---|
private SequenceHeader.AspectRatioInformation |
aspectRatioInformation
|
private UnsignedIntegerField |
bitRateValue
|
private SequenceHeader.FrameRateCode |
frameRateCode
|
private UnsignedIntegerField |
horizontalSizeValue
|
private UnsignedIntegerField |
vbvBufferSizeValue
|
private UnsignedIntegerField |
verticalSizeValue
|
Constructor Summary | |
---|---|
SequenceHeader(int horizontalSizeValue,
int verticalSizeValue,
SequenceHeader.AspectRatioInformation ratio,
SequenceHeader.FrameRateCode rate,
int bitRateValue,
int vbvBufferSizeValue)
Constructs a new instance. |
Method Summary | |
---|---|
SequenceHeader.AspectRatioInformation |
getAspectRatioInformation()
Gets the aspect ratio information. |
long |
getBitRateValue()
Gets the bit rate value. |
SequenceHeader.FrameRateCode |
getFrameRateCode()
Gets the frame rate code. |
long |
getHorizontalSizeValue()
Gets the horizontal size value. |
long |
getVBVBufferSizeValue()
Gets the video buffering verifier buffer size value. |
long |
getVerticalSizeValue()
Gets the vertical size value. |
void |
setAspectRatioInformation(SequenceHeader.AspectRatioInformation aspectRatioInformation)
Sets the aspect ratio information. |
void |
setBitRateValue(int bitRateValue)
Sets the bit rate value. |
void |
setFrameRateCode(SequenceHeader.FrameRateCode frameRateCode)
Sets the frame rate code. |
void |
setHorizontalSizeValue(int horizontalSizeValue)
Sets the horizontal size value. |
void |
setVBVBufferSizeValue(int vbvBufferSizeValue)
Sets the video buffering verifier buffer size value. |
void |
setVerticalSizeValue(int verticalSizeValue)
Sets the vertical size value. |
void |
writeTo(BitOutputStream stream)
Writes the header to a bit stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private UnsignedIntegerField horizontalSizeValue
private UnsignedIntegerField verticalSizeValue
private SequenceHeader.AspectRatioInformation aspectRatioInformation
private SequenceHeader.FrameRateCode frameRateCode
private UnsignedIntegerField bitRateValue
private UnsignedIntegerField vbvBufferSizeValue
Constructor Detail |
---|
public SequenceHeader(int horizontalSizeValue, int verticalSizeValue, SequenceHeader.AspectRatioInformation ratio, SequenceHeader.FrameRateCode rate, int bitRateValue, int vbvBufferSizeValue)
horizontalSizeValue
- Initial value for the horizontal size value. Same constraints as in
setHorizontalSizeValue() apply.verticalSizeValue
- Initial value for the vertical size value. Same constraints as in setVerticalSizeValue()
apply.ratio
- Initial value for the aspect ratio information.rate
- Initial value for the frame rate code.bitRateValue
- Initial value for the bit rate value.vbvBufferSizeValue
- Initial value for the VBV buffer size value.Method Detail |
---|
public long getHorizontalSizeValue()
public void setHorizontalSizeValue(int horizontalSizeValue)
horizontalSizeValue
- The new value. Must fit into 12 bits.public long getVerticalSizeValue()
public void setVerticalSizeValue(int verticalSizeValue)
verticalSizeValue
- The new value. Must fit into 12 bits.public SequenceHeader.AspectRatioInformation getAspectRatioInformation()
public void setAspectRatioInformation(SequenceHeader.AspectRatioInformation aspectRatioInformation)
aspectRatioInformation
- The new information.public SequenceHeader.FrameRateCode getFrameRateCode()
public void setFrameRateCode(SequenceHeader.FrameRateCode frameRateCode)
frameRateCode
- The new code.public long getBitRateValue()
public void setBitRateValue(int bitRateValue)
bitRateValue
- The new value. Must fit into 18 bits.public long getVBVBufferSizeValue()
public void setVBVBufferSizeValue(int vbvBufferSizeValue)
vbvBufferSizeValue
- The new value. Must fit into 10 bits.public void writeTo(BitOutputStream stream) throws java.io.IOException
stream
- The stream to write to.
java.io.IOException
- Propagated from the stream write.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |