|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfi.helsinki.cs.ohtu.mpeg2.video.SequenceExtensionHeader
public class SequenceExtensionHeader
Represents extension part of the mandatory 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 extension header, the second of those headers. It always immediately follows a SequenceHeader in the bitstream. Together, they form a extended video sequence meta-header. The extended sequence header is represented by the class ExtendedSequenceHeader.
Nested Class Summary | |
---|---|
static class |
SequenceExtensionHeader.ChromaFormat
Represents the allowed values for the chroma format field. |
static class |
SequenceExtensionHeader.Level
Represents the allowed values for the level field. |
static class |
SequenceExtensionHeader.Profile
Represents the allowed values for the profile field. |
static class |
SequenceExtensionHeader.SpecialProfileAndLevel
Represents the allowed values for the special profile and level field. |
Field Summary | |
---|---|
(package private) UnsignedIntegerField |
bitRateExtension
|
(package private) SequenceExtensionHeader.ChromaFormat |
chromaFormat
|
(package private) UnsignedIntegerField |
frameRateExtensionDenominator
|
(package private) UnsignedIntegerField |
frameRateExtensionNumerator
|
(package private) boolean |
hasSpecialProfileAndLevel
|
(package private) UnsignedIntegerField |
horizontalSizeExtension
|
(package private) SequenceExtensionHeader.Level |
level
|
(package private) boolean |
lowDelay
|
(package private) SequenceExtensionHeader.Profile |
profile
|
(package private) boolean |
progressiveSequence
|
(package private) SequenceExtensionHeader.SpecialProfileAndLevel |
specialProfileAndLevel
|
(package private) UnsignedIntegerField |
vbvBufferSizeExtension
|
(package private) UnsignedIntegerField |
verticalSizeExtension
|
Constructor Summary | |
---|---|
SequenceExtensionHeader(SequenceExtensionHeader.Profile profile,
SequenceExtensionHeader.Level level,
boolean progressiveSequence,
SequenceExtensionHeader.ChromaFormat chromaFormat,
int horizontalSizeExtension,
int verticalSizeExtension,
int bitRateExtension,
int vbvBufferSizeExtension,
boolean lowDelay,
int frameRateExtensionNumerator,
int frameRateExtensionDenominator)
Constructs a new instance. |
|
SequenceExtensionHeader(SequenceExtensionHeader.SpecialProfileAndLevel profileAndLevel,
boolean progressiveSequence,
SequenceExtensionHeader.ChromaFormat chromaFormat,
int horizontalSizeExtension,
int verticalSizeExtension,
int bitRateExtension,
int vbvBufferSizeExtension,
boolean lowDelay,
int frameRateExtensionNumerator,
int frameRateExtensionDenominator)
Constructs a new instance. |
Method Summary | |
---|---|
private void |
commonInit(boolean progressiveSequence,
SequenceExtensionHeader.ChromaFormat chromaFormat,
int horizontalSizeExtension,
int verticalSizeExtension,
int bitRateExtension,
int vbvBufferSizeExtension,
boolean lowDelay,
int frameRateExtensionNumerator,
int frameRateExtensionDenominator)
|
long |
getBitRateExtension()
Gets the bit rate extension. |
SequenceExtensionHeader.ChromaFormat |
getChromaFormat()
Gets the chroma format. |
long |
getFrameRateExtensionDenominator()
Gets the frame rate extension denominator. |
long |
getFrameRateExtensionNumerator()
Gets the frame rate extension numerator. |
long |
getHorizontalSizeExtension()
Gets the horizontal size extension. |
SequenceExtensionHeader.Level |
getLevel()
Gets the level for this instance. |
SequenceExtensionHeader.Profile |
getProfile()
Gets the profile for this instance. |
SequenceExtensionHeader.SpecialProfileAndLevel |
getSpecialProfileAndLevel()
Gets the special profile and level combination specified by the header. |
long |
getVBVBufferSizeExtension()
Gets the video buffering verifier buffer size extension. |
long |
getVerticalSizeExtension()
Gets the vertical size extension. |
boolean |
hasSpecialProfileAndLevel()
Returns whether the header specifies a special profile and level combination. |
boolean |
isLowDelay()
Determines whether or not the header specifies the video sequence to be low-delay. |
boolean |
isProgressiveSequence()
Determines whether or not the header specifies the video sequence to be entirely progressive. |
void |
setBitRateExtension(int bitRateExtension)
Sets the bit rate extension. |
void |
setChromaFormat(SequenceExtensionHeader.ChromaFormat chromaFormat)
Sets the chroma format for this instance. |
void |
setFrameRateExtensionDenominator(int frameRateExtensionDenominator)
Sets the frame rate extension denominator. |
void |
setFrameRateExtensionNumerator(int frameRateExtensionNumerator)
Sets the frame rate extension numerator. |
void |
setHorizontalSizeExtension(int horizontalSizeExtension)
Sets the horizontal size extension. |
void |
setLowDelay(boolean lowDelay)
Sets the header to specify whether the video sequence is low-delay or not. |
void |
setProfileAndLevel(SequenceExtensionHeader.Profile profile,
SequenceExtensionHeader.Level level)
Sets the the header to specify the given profile and level. |
void |
setProfileAndLevel(SequenceExtensionHeader.SpecialProfileAndLevel specialProfileAndLevel)
Sets the the header to specify the given special profile and level combination. |
void |
setProgressiveSequence(boolean progressiveSequence)
Sets whether or not the video sequence is specified to be entirely progressive. |
void |
setVBVBufferSizeExtension(int vbvBufferSizeExtension)
Sets the video buffering verifier buffer size extension. |
void |
setVerticalSizeExtension(int verticalSizeExtension)
Sets the vertical size extension. |
void |
writeTo(BitOutputStream stream)
Writes the header to a stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
boolean hasSpecialProfileAndLevel
SequenceExtensionHeader.Profile profile
SequenceExtensionHeader.Level level
SequenceExtensionHeader.SpecialProfileAndLevel specialProfileAndLevel
boolean progressiveSequence
SequenceExtensionHeader.ChromaFormat chromaFormat
UnsignedIntegerField horizontalSizeExtension
UnsignedIntegerField verticalSizeExtension
UnsignedIntegerField bitRateExtension
UnsignedIntegerField vbvBufferSizeExtension
boolean lowDelay
UnsignedIntegerField frameRateExtensionNumerator
UnsignedIntegerField frameRateExtensionDenominator
Constructor Detail |
---|
public SequenceExtensionHeader(SequenceExtensionHeader.Profile profile, SequenceExtensionHeader.Level level, boolean progressiveSequence, SequenceExtensionHeader.ChromaFormat chromaFormat, int horizontalSizeExtension, int verticalSizeExtension, int bitRateExtension, int vbvBufferSizeExtension, boolean lowDelay, int frameRateExtensionNumerator, int frameRateExtensionDenominator)
profile
- The initial profile.progressiveSequence
- The initial value for the progressive sequence flag.level
- The initial level.chromaFormat
- The initial chroma format.horizontalSizeExtension
- The initial horizontal size extension.verticalSizeExtension
- The initial vertical size extension.bitRateExtension
- The initial bit rate extension.vbvBufferSizeExtension
- The initial VBV buffer size extension.lowDelay
- The initial value for the low-delay flag.frameRateExtensionNumerator
- The initial frame rate extension numerator.frameRateExtensionDenominator
- The initial frame rate extension denominator.public SequenceExtensionHeader(SequenceExtensionHeader.SpecialProfileAndLevel profileAndLevel, boolean progressiveSequence, SequenceExtensionHeader.ChromaFormat chromaFormat, int horizontalSizeExtension, int verticalSizeExtension, int bitRateExtension, int vbvBufferSizeExtension, boolean lowDelay, int frameRateExtensionNumerator, int frameRateExtensionDenominator)
profileAndLevel
- The initial special profile and level combination.progressiveSequence
- The initial value for the progressive sequence flag.chromaFormat
- The initial chroma format.horizontalSizeExtension
- The initial horizontal size extension.verticalSizeExtension
- The initial vertical size extension.bitRateExtension
- The initial bit rate extension.vbvBufferSizeExtension
- The initial VBV buffer size extension.lowDelay
- The initial value for the low-delay flag.frameRateExtensionNumerator
- The initial frame rate extension numerator.frameRateExtensionDenominator
- The initial frame rate extension denominator.Method Detail |
---|
private void commonInit(boolean progressiveSequence, SequenceExtensionHeader.ChromaFormat chromaFormat, int horizontalSizeExtension, int verticalSizeExtension, int bitRateExtension, int vbvBufferSizeExtension, boolean lowDelay, int frameRateExtensionNumerator, int frameRateExtensionDenominator)
public boolean hasSpecialProfileAndLevel()
public SequenceExtensionHeader.Profile getProfile()
public SequenceExtensionHeader.Level getLevel()
public SequenceExtensionHeader.SpecialProfileAndLevel getSpecialProfileAndLevel()
public void setProfileAndLevel(SequenceExtensionHeader.Profile profile, SequenceExtensionHeader.Level level)
profile
- The profile.level
- The level.public void setProfileAndLevel(SequenceExtensionHeader.SpecialProfileAndLevel specialProfileAndLevel)
specialProfileAndLevel
- The combination.public boolean isProgressiveSequence()
public void setProgressiveSequence(boolean progressiveSequence)
progressiveSequence
- true if the video sequence is entirely progressive, false if it can also contain
interlaced frames and fields.public SequenceExtensionHeader.ChromaFormat getChromaFormat()
public void setChromaFormat(SequenceExtensionHeader.ChromaFormat chromaFormat)
chromaFormat
- The format.public long getHorizontalSizeExtension()
public void setHorizontalSizeExtension(int horizontalSizeExtension)
horizontalSizeExtension
- The extension. The value must fit into 2 bits.public long getVerticalSizeExtension()
public void setVerticalSizeExtension(int verticalSizeExtension)
verticalSizeExtension
- The extension. The value must fit into 2 bits.public long getBitRateExtension()
public void setBitRateExtension(int bitRateExtension)
bitRateExtension
- The extension. The value must fit into 12 bits.public long getVBVBufferSizeExtension()
public void setVBVBufferSizeExtension(int vbvBufferSizeExtension)
vbvBufferSizeExtension
- The extension. The value must fit into 8 bits.public boolean isLowDelay()
public void setLowDelay(boolean lowDelay)
lowDelay
- true if the sequence is low-delay, false if not.public long getFrameRateExtensionNumerator()
public void setFrameRateExtensionNumerator(int frameRateExtensionNumerator)
frameRateExtensionNumerator
- The numerator. The value must fit into 2 bits.public long getFrameRateExtensionDenominator()
public void setFrameRateExtensionDenominator(int frameRateExtensionDenominator)
frameRateExtensionDenominator
- The denominator. The value must fit into 5 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 |