Package com.wowza.wms.transport.mpeg2
Class MPEG2Section
Object
com.wowza.wms.transport.mpeg2.MPEG2Section
The Class mpeg2Section.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
The continuity counter.protected static final byte
The Constant CURNEXT_MASK.protected static final int
The Constant CURNEXT_OFFSET.protected static final int
The Constant LAST_SECTION_OFFSET.protected static final byte
The Constant LENGHT_HIGH_BYTE_MASK.protected static final int
The Constant LENGTH_OFFSET.protected static final int
The Constant LENGTH_SIZE.protected static final int
The Constant SECTION_OFFSET.protected static final int
The Constant TABLE_ID_EXT_LENGHT.protected static final int
The Constant TABLE_ID_EXT_OFFSET.protected static final byte
The Constant VERSION_MASK.protected static final int
The Constant VERSION_OFFSET. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Bytes written.boolean
CRC is valid.dumpSection
(String contextStr) Dump section.int
Gets the available data.int
Gets the last section no.int
Gets the section length.int
Gets the section no.int
Gets the table id.int
Gets the table id extension.int
Gets the version.boolean
Checks if is current.int
read()
Read.int
readBytes
(byte[] buf, int offset, int count) Read bytes.int
readInt()
int
readInt
(int count, int mask) Read int.void
rewind()
Rewind.void
skip
(int count) Skip.toString()
int
write
(byte[] bytes) Write.
-
Field Details
-
continuityCounter
protected int continuityCounterThe continuity counter. -
LENGTH_OFFSET
protected static final int LENGTH_OFFSETThe Constant LENGTH_OFFSET.- See Also:
-
LENGTH_SIZE
protected static final int LENGTH_SIZEThe Constant LENGTH_SIZE.- See Also:
-
LENGHT_HIGH_BYTE_MASK
protected static final byte LENGHT_HIGH_BYTE_MASKThe Constant LENGHT_HIGH_BYTE_MASK.- See Also:
-
TABLE_ID_EXT_OFFSET
protected static final int TABLE_ID_EXT_OFFSETThe Constant TABLE_ID_EXT_OFFSET.- See Also:
-
TABLE_ID_EXT_LENGHT
protected static final int TABLE_ID_EXT_LENGHTThe Constant TABLE_ID_EXT_LENGHT.- See Also:
-
VERSION_OFFSET
protected static final int VERSION_OFFSETThe Constant VERSION_OFFSET.- See Also:
-
VERSION_MASK
protected static final byte VERSION_MASKThe Constant VERSION_MASK.- See Also:
-
CURNEXT_OFFSET
protected static final int CURNEXT_OFFSETThe Constant CURNEXT_OFFSET.- See Also:
-
CURNEXT_MASK
protected static final byte CURNEXT_MASKThe Constant CURNEXT_MASK.- See Also:
-
SECTION_OFFSET
protected static final int SECTION_OFFSETThe Constant SECTION_OFFSET.- See Also:
-
LAST_SECTION_OFFSET
protected static final int LAST_SECTION_OFFSETThe Constant LAST_SECTION_OFFSET.- See Also:
-
-
Constructor Details
-
MPEG2Section
public MPEG2Section()
-
-
Method Details
-
write
Write.- Parameters:
bytes
- the bytes- Returns:
- the int
- Throws:
IOException
- Signals that an I/O exception has occurred.
-
bytesWritten
public int bytesWritten()Bytes written.- Returns:
- the int
-
getTableID
public int getTableID()Gets the table id.- Returns:
- the table id
-
getSectionLength
public int getSectionLength()Gets the section length.- Returns:
- the section length
-
getTableIDExtension
public int getTableIDExtension()Gets the table id extension.- Returns:
- the table id extension
-
getVersion
public int getVersion()Gets the version.- Returns:
- the version
-
isCurrent
public boolean isCurrent()Checks if is current.- Returns:
- true, if is current
-
getSectionNo
public int getSectionNo()Gets the section no.- Returns:
- the section no
-
getLastSectionNo
public int getLastSectionNo()Gets the last section no.- Returns:
- the last section no
-
getAvailableData
public int getAvailableData()Gets the available data.- Returns:
- the available data
-
CRCIsValid
public boolean CRCIsValid()CRC is valid.- Returns:
- true, if successful
-
rewind
public void rewind()Rewind. -
read
public int read()Read.- Returns:
- the int
-
readBytes
public int readBytes(byte[] buf, int offset, int count) Read bytes.- Parameters:
buf
- the bufoffset
- the offsetcount
- the count- Returns:
- the int
-
readInt
public int readInt(int count, int mask) Read int.- Parameters:
count
- the countmask
- the mask- Returns:
- the int
-
readInt
public int readInt() -
skip
public void skip(int count) Skip.- Parameters:
count
- the count
-
toString
-
dumpSection
Dump section.
-