![]() |
TSDuck v3.39-3843
MPEG Transport Stream Toolkit
|
Utility routines for memory operations. More...
Namespaces | |
namespace | ts |
TSDuck namespace, containing all TSDuck classes and functions. | |
Macros | |
#define | TS_ZERO(var) ts::MemZero(&(var), sizeof(var)) |
Zeroing an plain memory variable. | |
Functions | |
template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr> | |
INT | ts::GetInt (const void *p) |
Template function getting an integer from serialized data in big endian representation. | |
template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr> | |
void | ts::GetInt (const void *p, INT &i) |
Template function getting an integer from serialized data in big endian representation. | |
int16_t | ts::GetInt16 (const void *p) |
Function getting a 16-bit signed integer from serialized data in big endian representation. | |
void | ts::GetInt16 (const void *p, int16_t &i) |
Function getting a 16-bit signed integer from serialized data in big endian representation. | |
int16_t | ts::GetInt16BE (const void *p) |
Function getting a 16-bit signed integer from serialized data in big endian representation. | |
void | ts::GetInt16BE (const void *p, int16_t &i) |
Function getting a 16-bit signed integer from serialized data in big endian representation. | |
int16_t | ts::GetInt16LE (const void *p) |
Function getting a 16-bit signed integer from serialized data in little endian representation. | |
void | ts::GetInt16LE (const void *p, int16_t &i) |
Function getting a 16-bit signed integer from serialized data in little endian representation. | |
int32_t | ts::GetInt24 (const void *p) |
Function getting a 24-bit signed integer from serialized data in big endian representation. | |
void | ts::GetInt24 (const void *p, int32_t &i) |
Function getting a 24-bit signed integer from serialized data in big endian representation. | |
int32_t | ts::GetInt24BE (const void *p) |
Function getting a 24-bit signed integer from serialized data in big endian representation. | |
void | ts::GetInt24BE (const void *p, int32_t &i) |
Function getting a 24-bit signed integer from serialized data in big endian representation. | |
int32_t | ts::GetInt24LE (const void *p) |
Function getting a 24-bit signed integer from serialized data in little endian representation. | |
void | ts::GetInt24LE (const void *p, int32_t &i) |
Function getting a 24-bit signed integer from serialized data in little endian representation. | |
int32_t | ts::GetInt32 (const void *p) |
Function getting a 32-bit signed integer from serialized data in big endian representation. | |
void | ts::GetInt32 (const void *p, int32_t &i) |
Function getting a 32-bit signed integer from serialized data in big endian representation. | |
int32_t | ts::GetInt32BE (const void *p) |
Function getting a 32-bit signed integer from serialized data in big endian representation. | |
void | ts::GetInt32BE (const void *p, int32_t &i) |
Function getting a 32-bit signed integer from serialized data in big endian representation. | |
int32_t | ts::GetInt32LE (const void *p) |
Function getting a 32-bit signed integer from serialized data in little endian representation. | |
void | ts::GetInt32LE (const void *p, int32_t &i) |
Function getting a 32-bit signed integer from serialized data in little endian representation. | |
int64_t | ts::GetInt40BE (const void *p) |
Function getting a 40-bit signed integer from serialized data in big endian representation. | |
int64_t | ts::GetInt40LE (const void *p) |
Function getting a 40-bit signed integer from serialized data in little endian representation. | |
int64_t | ts::GetInt48BE (const void *p) |
Function getting a 48-bit signed integer from serialized data in big endian representation. | |
int64_t | ts::GetInt48LE (const void *p) |
Function getting a 48-bit signed integer from serialized data in little endian representation. | |
int64_t | ts::GetInt64 (const void *p) |
Function getting a 64-bit signed integer from serialized data in big endian representation. | |
void | ts::GetInt64 (const void *p, int64_t &i) |
Function getting a 64-bit signed integer from serialized data in big endian representation. | |
int64_t | ts::GetInt64BE (const void *p) |
Function getting a 64-bit signed integer from serialized data in big endian representation. | |
void | ts::GetInt64BE (const void *p, int64_t &i) |
Function getting a 64-bit signed integer from serialized data in big endian representation. | |
int64_t | ts::GetInt64LE (const void *p) |
Function getting a 64-bit signed integer from serialized data in little endian representation. | |
void | ts::GetInt64LE (const void *p, int64_t &i) |
Function getting a 64-bit signed integer from serialized data in little endian representation. | |
int8_t | ts::GetInt8 (const void *p) |
Function getting an 8-bit signed integer from serialized data. | |
void | ts::GetInt8 (const void *p, int8_t &i) |
Function getting an 8-bit signed integer from serialized data. | |
template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr> | |
INT | ts::GetIntBE (const void *p) |
Template function getting an integer from serialized data in big endian representation. | |
template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr> | |
void | ts::GetIntBE (const void *p, INT &i) |
Template function getting an integer from serialized data in big endian representation. | |
template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr> | |
INT | ts::GetIntLE (const void *p) |
Template function getting an integer from serialized data in little endian representation. | |
template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr> | |
void | ts::GetIntLE (const void *p, INT &i) |
Template function getting an integer from serialized data in little endian representation. | |
template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr> | |
INT | ts::GetIntVar (const void *p, size_t size) |
Template function getting a variable-length integer from serialized data in big endian representation. | |
template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr> | |
void | ts::GetIntVar (const void *p, size_t size, INT &i) |
Template function getting a variable-length integer from serialized data in big endian representation. | |
template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr> | |
INT | ts::GetIntVarBE (const void *p, size_t size) |
Template function getting a variable-length integer from serialized data in big endian representation. | |
template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr> | |
void | ts::GetIntVarBE (const void *p, size_t size, INT &i) |
Template function getting a variable-length integer from serialized data in big endian representation. | |
template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr> | |
INT | ts::GetIntVarLE (const void *p, size_t size) |
Template function getting a variable-length integer from serialized data in little endian representation. | |
template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr> | |
void | ts::GetIntVarLE (const void *p, size_t size, INT &i) |
Template function getting a variable-length integer from serialized data in little endian representation. | |
uint16_t | ts::GetUInt16 (const void *p) |
Function getting a 16-bit unsigned integer from serialized data in big endian representation. | |
void | ts::GetUInt16 (const void *p, uint16_t &i) |
Function getting a 16-bit unsigned integer from serialized data in big endian representation. | |
uint16_t | ts::GetUInt16BE (const void *p) |
Function getting a 16-bit unsigned integer from serialized data in big endian representation. | |
void | ts::GetUInt16BE (const void *p, uint16_t &i) |
Function getting a 16-bit unsigned integer from serialized data in big endian representation. | |
uint16_t | ts::GetUInt16LE (const void *p) |
Function getting a 16-bit unsigned integer from serialized data in little endian representation. | |
void | ts::GetUInt16LE (const void *p, uint16_t &i) |
Function getting a 16-bit unsigned integer from serialized data in little endian representation. | |
uint32_t | ts::GetUInt24 (const void *p) |
Function getting a 24-bit unsigned integer from serialized data in big endian representation. | |
void | ts::GetUInt24 (const void *p, uint32_t &i) |
Function getting a 24-bit unsigned integer from serialized data in big endian representation. | |
uint32_t | ts::GetUInt24BE (const void *p) |
Function getting a 24-bit unsigned integer from serialized data in big endian representation. | |
void | ts::GetUInt24BE (const void *p, uint32_t &i) |
Function getting a 24-bit unsigned integer from serialized data in big endian representation. | |
uint32_t | ts::GetUInt24LE (const void *p) |
Function getting a 24-bit unsigned integer from serialized data in little endian representation. | |
void | ts::GetUInt24LE (const void *p, uint32_t &i) |
Function getting a 24-bit unsigned integer from serialized data in little endian representation. | |
uint32_t | ts::GetUInt32 (const void *p) |
Function getting a 32-bit unsigned integer from serialized data in big endian representation. | |
void | ts::GetUInt32 (const void *p, uint32_t &i) |
Function getting a 32-bit unsigned integer from serialized data in big endian representation. | |
uint32_t | ts::GetUInt32BE (const void *p) |
Function getting a 32-bit unsigned integer from serialized data in big endian representation. | |
void | ts::GetUInt32BE (const void *p, uint32_t &i) |
Function getting a 32-bit unsigned integer from serialized data in big endian representation. | |
uint32_t | ts::GetUInt32LE (const void *p) |
Function getting a 32-bit unsigned integer from serialized data in little endian representation. | |
void | ts::GetUInt32LE (const void *p, uint32_t &i) |
Function getting a 32-bit unsigned integer from serialized data in little endian representation. | |
uint64_t | ts::GetUInt40 (const void *p) |
Function getting a 40-bit unsigned integer from serialized data in big endian representation. | |
void | ts::GetUInt40 (const void *p, uint64_t &i) |
Function getting a 40-bit unsigned integer from serialized data in big endian representation. | |
uint64_t | ts::GetUInt40BE (const void *p) |
Function getting a 40-bit unsigned integer from serialized data in big endian representation. | |
uint64_t | ts::GetUInt40LE (const void *p) |
Function getting a 40-bit unsigned integer from serialized data in little endian representation. | |
uint64_t | ts::GetUInt48 (const void *p) |
Function getting a 48-bit unsigned integer from serialized data in big endian representation. | |
void | ts::GetUInt48 (const void *p, uint64_t &i) |
Function getting a 48-bit unsigned integer from serialized data in big endian representation. | |
uint64_t | ts::GetUInt48BE (const void *p) |
Function getting a 48-bit unsigned integer from serialized data in big endian representation. | |
uint64_t | ts::GetUInt48LE (const void *p) |
Function getting a 48-bit unsigned integer from serialized data in little endian representation. | |
uint64_t | ts::GetUInt64 (const void *p) |
Function getting a 64-bit unsigned integer from serialized data in big endian representation. | |
void | ts::GetUInt64 (const void *p, uint64_t &i) |
Function getting a 64-bit unsigned integer from serialized data in big endian representation. | |
uint64_t | ts::GetUInt64BE (const void *p) |
Function getting a 64-bit unsigned integer from serialized data in big endian representation. | |
void | ts::GetUInt64BE (const void *p, uint64_t &i) |
Function getting a 64-bit unsigned integer from serialized data in big endian representation. | |
uint64_t | ts::GetUInt64LE (const void *p) |
Function getting a 64-bit unsigned integer from serialized data in little endian representation. | |
void | ts::GetUInt64LE (const void *p, uint64_t &i) |
Function getting a 64-bit unsigned integer from serialized data in little endian representation. | |
uint8_t | ts::GetUInt8 (const void *p) |
Function getting an 8-bit unsigned integer from serialized data. | |
void | ts::GetUInt8 (const void *p, uint8_t &i) |
Function getting an 8-bit unsigned integer from serialized data. | |
bool | ts::IdenticalBytes (const void *area, size_t area_size) |
Check if a memory area contains all identical byte values. | |
const uint8_t * | ts::LocatePattern (const void *area, size_t area_size, const void *pattern, size_t pattern_size) |
Locate a pattern into a memory area. | |
const uint8_t * | ts::LocateZeroZero (const void *area, size_t area_size, uint8_t third) |
Locate a 3-byte pattern 00 00 XY into a memory area. | |
int | ts::MemCompare (const void *addr1, const void *addr2, size_t size) |
Comparing two memory areas. | |
void | ts::MemCopy (void *dest, const void *src, size_t size) |
Copying a memory area. | |
bool | ts::MemEqual (const void *addr1, const void *addr2, size_t size) |
Check if two memory areas are identical. | |
void | ts::MemSet (void *addr, uint8_t value, size_t size) |
Setting a memory area. | |
void | ts::MemXor (void *dest, const void *src1, const void *src2, size_t size) |
Compute an exclusive or over memory areas. | |
void | ts::MemZero (void *addr, size_t size) |
Zeroing a memory area. | |
template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr> | |
void | ts::PutInt (void *p, INT i) |
Template function serializing an integer data in big endian representation. | |
void | ts::PutInt16 (void *p, int16_t i) |
Function serializing a 16-bit signed integer data in big endian representation. | |
void | ts::PutInt16BE (void *p, int16_t i) |
Function serializing a 16-bit signed integer data in big endian representation. | |
void | ts::PutInt16LE (void *p, int16_t i) |
Function serializing a 16-bit signed integer data in little endian representation. | |
void | ts::PutInt24 (void *p, int32_t i) |
Function serializing a 24-bit signed integer data in big endian representation. | |
void | ts::PutInt24BE (void *p, int32_t i) |
Function serializing a 24-bit signed integer data in big endian representation. | |
void | ts::PutInt24LE (void *p, int32_t i) |
Function serializing a 24-bit signed integer data in little endian representation. | |
void | ts::PutInt32 (void *p, int32_t i) |
Function serializing a 32-bit signed integer data in big endian representation. | |
void | ts::PutInt32BE (void *p, int32_t i) |
Function serializing a 32-bit signed integer data in big endian representation. | |
void | ts::PutInt32LE (void *p, int32_t i) |
Function serializing a 32-bit signed integer data in little endian representation. | |
void | ts::PutInt40BE (void *p, int64_t i) |
Function serializing a 40-bit signed integer data in big endian representation. | |
void | ts::PutInt40LE (void *p, int64_t i) |
Function serializing a 40-bit signed integer data in little endian representation. | |
void | ts::PutInt48BE (void *p, int64_t i) |
Function serializing a 48-bit signed integer data in big endian representation. | |
void | ts::PutInt48LE (void *p, int64_t i) |
Function serializing a 48-bit signed integer data in little endian representation. | |
void | ts::PutInt64 (void *p, int64_t i) |
Function serializing a 64-bit signed integer data in big endian representation. | |
void | ts::PutInt64BE (void *p, int64_t i) |
Function serializing a 64-bit signed integer data in big endian representation. | |
void | ts::PutInt64LE (void *p, int64_t i) |
Function serializing a 64-bit signed integer data in little endian representation. | |
void | ts::PutInt8 (void *p, int8_t i) |
Function serializing an 8-bit signed integer data. | |
template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr> | |
void | ts::PutIntBE (void *p, INT i) |
Template function serializing an integer data in big endian representation. | |
template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr> | |
void | ts::PutIntLE (void *p, INT i) |
Template function serializing an integer data in little endian representation. | |
template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr> | |
void | ts::PutIntVar (void *p, size_t size, INT i) |
Template function serializing a variable-length integer data in big endian representation. | |
template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr> | |
void | ts::PutIntVarBE (void *p, size_t size, INT i) |
Template function serializing a variable-length integer data in big endian representation. | |
template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr> | |
void | ts::PutIntVarLE (void *p, size_t size, INT i) |
Template function serializing a variable-length integer data in little endian representation. | |
void | ts::PutUInt16 (void *p, uint16_t i) |
Function serializing a 16-bit unsigned integer data in big endian representation. | |
void | ts::PutUInt16BE (void *p, uint16_t i) |
Function serializing a 16-bit unsigned integer data in big endian representation. | |
void | ts::PutUInt16LE (void *p, uint16_t i) |
Function serializing a 16-bit unsigned integer data in little endian representation. | |
void | ts::PutUInt24 (void *p, uint32_t i) |
Function serializing a 24-bit unsigned integer data in big endian representation. | |
void | ts::PutUInt24BE (void *p, uint32_t i) |
Function serializing a 24-bit unsigned integer data in big endian representation. | |
void | ts::PutUInt24LE (void *p, uint32_t i) |
Function serializing a 24-bit unsigned integer data in little endian representation. | |
void | ts::PutUInt32 (void *p, uint32_t i) |
Function serializing a 32-bit unsigned integer data in big endian representation. | |
void | ts::PutUInt32BE (void *p, uint32_t i) |
Function serializing a 32-bit unsigned integer data in big endian representation. | |
void | ts::PutUInt32LE (void *p, uint32_t i) |
Function serializing a 32-bit unsigned integer data in little endian representation. | |
void | ts::PutUInt40 (void *p, uint64_t i) |
Function serializing a 40-bit unsigned integer data in big endian representation. | |
void | ts::PutUInt40BE (void *p, uint64_t i) |
Function serializing a 40-bit unsigned integer data in big endian representation. | |
void | ts::PutUInt40LE (void *p, uint64_t i) |
Function serializing a 40-bit unsigned integer data in little endian representation. | |
void | ts::PutUInt48 (void *p, uint64_t i) |
Function serializing a 48-bit unsigned integer data in big endian representation. | |
void | ts::PutUInt48BE (void *p, uint64_t i) |
Function serializing a 48-bit unsigned integer data in big endian representation. | |
void | ts::PutUInt48LE (void *p, uint64_t i) |
Function serializing a 48-bit unsigned integer data in little endian representation. | |
void | ts::PutUInt64 (void *p, uint64_t i) |
Function serializing a 64-bit unsigned integer data in big endian representation. | |
void | ts::PutUInt64BE (void *p, uint64_t i) |
Function serializing a 64-bit unsigned integer data in big endian representation. | |
void | ts::PutUInt64LE (void *p, uint64_t i) |
Function serializing a 64-bit unsigned integer data in little endian representation. | |
void | ts::PutUInt8 (void *p, uint8_t i) |
Function serializing an 8-bit unsigned integer data. | |
bool | ts::StartsWith (const void *area, size_t area_size, const void *prefix, size_t prefix_size) |
Check if a memory area starts with the specified prefix. | |
Utility routines for memory operations.
#define TS_ZERO | ( | var | ) | ts::MemZero(&(var), sizeof(var)) |
Zeroing an plain memory variable.
Do not use with instances of C++ classes.
[out] | var | Name of a variable. |