QtlMovie 1.12 (A specialized FFmpeg front-end)
QtsCrc32 Class Reference

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 QtsCrc32operator= (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...
 

Detailed Description

Cyclic Redundancy Check as used in MPEG sections.

Original code, authors & copyright are unclear.

Member Enumeration Documentation

◆ Validation

What to do with a CRC32 in a section.

Enumerator
Ignore 

Ignore CRC32 value.

Check 

Check CRC32 value to detect error.

Compute 

Compute the new CRC32 value.

Constructor & Destructor Documentation

◆ QtsCrc32() [1/3]

QtsCrc32::QtsCrc32 ( )
inline

Default constructor.

◆ QtsCrc32() [2/3]

QtsCrc32::QtsCrc32 ( const QtsCrc32 c)
inline

Copy constructor.

Parameters
[in]cOther instance to copy.

◆ QtsCrc32() [3/3]

QtsCrc32::QtsCrc32 ( const void *  data,
size_t  size 
)
inline

Constructor, compute the QtsCrc32 of a data area.

Parameters
[in]dataAddress of data area.
[in]sizeSize of data area.

Member Function Documentation

◆ add()

void QtsCrc32::add ( const void *  data,
int  size 
)

Continue the computation of a data area, following a previous CRC32.

Parameters
[in]dataAddress of data area.
[in]sizeSize of data area.

◆ value()

quint32 QtsCrc32::value ( ) const
inline

Get the value of a CRC32.

Returns
The 32-bit value of the CRC32.

◆ operator quint32()

QtsCrc32::operator quint32 ( ) const
inline

Convert to a 32-bit integer.

Returns
The 32-bit value of the CRC32.

◆ operator=()

const QtsCrc32& QtsCrc32::operator= ( const QtsCrc32 c)
inline

Assigment operator.

Parameters
[in]cOther instance to copy.
Returns
A reference to this object.

◆ operator==() [1/2]

bool QtsCrc32::operator== ( const QtsCrc32 c) const
inline

Comparison operator.

Parameters
[in]cOther instance to compare.
Returns
True if both CRC32 are identical.

◆ operator!=() [1/2]

bool QtsCrc32::operator!= ( const QtsCrc32 c) const
inline

Difference operator.

Parameters
[in]cOther instance to compare.
Returns
True if CRC32 are different.

◆ operator==() [2/2]

bool QtsCrc32::operator== ( quint32  c) const
inline

Comparison operator.

Parameters
[in]cAn integer CRC32 to compare.
Returns
True if both CRC32 are identical.

◆ operator!=() [2/2]

bool QtsCrc32::operator!= ( quint32  c) const
inline

Difference operator.

Parameters
[in]cAn integer CRC32 to compare.
Returns
True if CRC32 are different.

Member Data Documentation

◆ _fcs

quint32 QtsCrc32::_fcs
private

Current computed value.


The documentation for this class was generated from the following files: