Package com.wowza.wms.transport.mpeg2
Class MPEG2Section
- Object
-
- com.wowza.wms.transport.mpeg2.MPEG2Section
-
public class MPEG2Section extends Object
The Class mpeg2Section.
-
-
Field Summary
Fields Modifier and Type Field Description protected int
continuityCounter
The continuity counter.protected static byte
CURNEXT_MASK
The Constant CURNEXT_MASK.protected static int
CURNEXT_OFFSET
The Constant CURNEXT_OFFSET.protected static int
LAST_SECTION_OFFSET
The Constant LAST_SECTION_OFFSET.protected static byte
LENGHT_HIGH_BYTE_MASK
The Constant LENGHT_HIGH_BYTE_MASK.protected static int
LENGTH_OFFSET
The Constant LENGTH_OFFSET.protected static int
LENGTH_SIZE
The Constant LENGTH_SIZE.protected static int
SECTION_OFFSET
The Constant SECTION_OFFSET.protected static int
TABLE_ID_EXT_LENGHT
The Constant TABLE_ID_EXT_LENGHT.protected static int
TABLE_ID_EXT_OFFSET
The Constant TABLE_ID_EXT_OFFSET.protected static byte
VERSION_MASK
The Constant VERSION_MASK.protected static int
VERSION_OFFSET
The Constant VERSION_OFFSET.
-
Constructor Summary
Constructors Constructor Description MPEG2Section()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
bytesWritten()
Bytes written.boolean
CRCIsValid()
CRC is valid.String
dumpSection(String contextStr)
Dump section.int
getAvailableData()
Gets the available data.int
getLastSectionNo()
Gets the last section no.int
getSectionLength()
Gets the section length.int
getSectionNo()
Gets the section no.int
getTableID()
Gets the table id.int
getTableIDExtension()
Gets the table id extension.int
getVersion()
Gets the version.boolean
isCurrent()
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.String
toString()
int
write(byte[] bytes)
Write.
-
-
-
Field Detail
-
continuityCounter
protected int continuityCounter
The continuity counter.
-
LENGTH_OFFSET
protected static final int LENGTH_OFFSET
The Constant LENGTH_OFFSET.- See Also:
- Constant Field Values
-
LENGTH_SIZE
protected static final int LENGTH_SIZE
The Constant LENGTH_SIZE.- See Also:
- Constant Field Values
-
LENGHT_HIGH_BYTE_MASK
protected static final byte LENGHT_HIGH_BYTE_MASK
The Constant LENGHT_HIGH_BYTE_MASK.- See Also:
- Constant Field Values
-
TABLE_ID_EXT_OFFSET
protected static final int TABLE_ID_EXT_OFFSET
The Constant TABLE_ID_EXT_OFFSET.- See Also:
- Constant Field Values
-
TABLE_ID_EXT_LENGHT
protected static final int TABLE_ID_EXT_LENGHT
The Constant TABLE_ID_EXT_LENGHT.- See Also:
- Constant Field Values
-
VERSION_OFFSET
protected static final int VERSION_OFFSET
The Constant VERSION_OFFSET.- See Also:
- Constant Field Values
-
VERSION_MASK
protected static final byte VERSION_MASK
The Constant VERSION_MASK.- See Also:
- Constant Field Values
-
CURNEXT_OFFSET
protected static final int CURNEXT_OFFSET
The Constant CURNEXT_OFFSET.- See Also:
- Constant Field Values
-
CURNEXT_MASK
protected static final byte CURNEXT_MASK
The Constant CURNEXT_MASK.- See Also:
- Constant Field Values
-
SECTION_OFFSET
protected static final int SECTION_OFFSET
The Constant SECTION_OFFSET.- See Also:
- Constant Field Values
-
LAST_SECTION_OFFSET
protected static final int LAST_SECTION_OFFSET
The Constant LAST_SECTION_OFFSET.- See Also:
- Constant Field Values
-
-
Method Detail
-
write
public int write(byte[] bytes) throws java.io.IOException
Write.- Parameters:
bytes
- the bytes- Returns:
- the int
- Throws:
java.io.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
public String toString()
- Overrides:
toString
in classObject
-
dumpSection
public String dumpSection(String contextStr)
Dump section.
-
-