Cyclic Redundancy Check as used in MPEG sections. More...
Public Types | |
enum | Validation { Ignore, Check, Compute } |
What to do with a CRC32 in a section. More... | |
Public Member Functions | |
QtsCrc32 () | |
Default constructor. More... | |
QtsCrc32 (const QtsCrc32 &c) | |
Copy constructor. More... | |
QtsCrc32 (const void *data, size_t size) | |
Constructor, compute the QtsCrc32 of a data area. More... | |
void | add (const void *data, int size) |
Continue the computation of a data area, following a previous CRC32. More... | |
operator quint32 () const | |
Convert to a 32-bit integer. More... | |
bool | operator!= (const QtsCrc32 &c) const |
Difference operator. More... | |
bool | operator!= (quint32 c) const |
Difference operator. More... | |
const QtsCrc32 & | operator= (const QtsCrc32 &c) |
Assigment operator. More... | |
bool | operator== (const QtsCrc32 &c) const |
Comparison operator. More... | |
bool | operator== (quint32 c) const |
Comparison operator. More... | |
quint32 | value () const |
Get the value of a CRC32. More... | |
Private Attributes | |
quint32 | _fcs |
Current computed value. More... | |
Cyclic Redundancy Check as used in MPEG sections.
Original code, authors & copyright are unclear.
enum QtsCrc32::Validation |
|
inline |
Default constructor.
|
inline |
Copy constructor.
[in] | c | Other instance to copy. |
|
inline |
Constructor, compute the QtsCrc32 of a data area.
[in] | data | Address of data area. |
[in] | size | Size of data area. |
void QtsCrc32::add | ( | const void * | data, |
int | size | ||
) |
Continue the computation of a data area, following a previous CRC32.
[in] | data | Address of data area. |
[in] | size | Size of data area. |
|
inline |
Get the value of a CRC32.
|
inline |
Convert to a 32-bit integer.
Assigment operator.
[in] | c | Other instance to copy. |
|
inline |
Comparison operator.
[in] | c | Other instance to compare. |
|
inline |
Difference operator.
[in] | c | Other instance to compare. |
|
inline |
Comparison operator.
[in] | c | An integer CRC32 to compare. |
|
inline |
Difference operator.
[in] | c | An integer CRC32 to compare. |
|
private |
Current computed value.