Cyclic Redundancy Check as used in MPEG sections.
More...
#include <tsCRC32.h>
|
| CRC32 () |
| Default constructor.
|
|
| CRC32 (const void *data, size_t size) |
| Constructor, compute the CRC32 of a data area.
|
|
void | add (const void *data, size_t size) |
| Continue the computation of a data area, following a previous CRC32.
|
|
| operator uint32_t () const |
| Convert to a 32-bit integer.
|
|
bool | operator== (const CRC32 &c) const |
| Comparison operator with another CRC32 instance.
|
|
void | reset () |
| Reset the CRC32 computation, restart a new computation.
|
|
uint32_t | value () const |
| Get the value of the CRC32 as computed so far.
|
|
Cyclic Redundancy Check as used in MPEG sections.
◆ Validation
What to do with a CRC32.
Used when building MPEG sections.
Enumerator |
---|
IGNORE | Ignore the section CRC32.
|
CHECK | Check that the value of the CRC32 of the section is correct and fail if it isn't.
|
COMPUTE | Recompute a fresh new CRC32 value based on the content of the section.
|
◆ CRC32()
ts::CRC32::CRC32 |
( |
const void * |
data, |
|
|
size_t |
size |
|
) |
| |
|
inline |
Constructor, compute the CRC32 of a data area.
- Parameters
-
[in] | data | Address of area to analyze. |
[in] | size | Size in bytes of area to analyze. |
◆ add()
void ts::CRC32::add |
( |
const void * |
data, |
|
|
size_t |
size |
|
) |
| |
Continue the computation of a data area, following a previous CRC32.
- Parameters
-
[in] | data | Address of area to analyze. |
[in] | size | Size in bytes of area to analyze. |
◆ value()
uint32_t ts::CRC32::value |
( |
| ) |
const |
Get the value of the CRC32 as computed so far.
- Returns
- The value of the CRC32 as computed so far.
◆ operator uint32_t()
ts::CRC32::operator uint32_t |
( |
| ) |
const |
|
inline |
Convert to a 32-bit integer.
Same as value() method.
- Returns
- The value of the CRC32 as computed so far.
◆ operator==()
bool ts::CRC32::operator== |
( |
const CRC32 & |
c | ) |
const |
|
inline |
Comparison operator with another CRC32 instance.
- Parameters
-
[in] | c | Other instance to compare. |
- Returns
- True if the two CRC32 are identical, false otherwise.
The documentation for this class was generated from the following file: