# Ap4Utils.h File Reference

`#include "Ap4Config.h"`
`#include "Ap4Types.h"`
`#include "Ap4Results.h"`
`#include "Ap4Atom.h"`
`#include <stdio.h>`
`#include <string.h>`

Go to the source code of this file.

## Classes
class | AP4_PrintInspector
## Defines
#define | AP4_FormatString AP4_snprintf
#define | AP4_FormatStringVN(s, c, f, a) AP4_vsnprintf(s,c,f,a)
#define | AP4_StringLength(x) strlen(x)
#define | AP4_CopyMemory(x, y, z) memcpy(x,y,z)
#define | AP4_SetMemory(x, y, z) memset(x,y,z)
#define | AP4_CompareStrings(x, y) strcmp(x,y)
## Functions
double | AP4_BytesToDoubleBE (const unsigned char *bytes)
AP4_UI64 | AP4_BytesToUInt64BE (const unsigned char *bytes)
AP4_UI32 | AP4_BytesToUInt32BE (const unsigned char *bytes)
AP4_UI32 | AP4_BytesToUInt24BE (const unsigned char *bytes)
AP4_UI16 | AP4_BytesToUInt16BE (const unsigned char *bytes)
AP4_SI32 | AP4_BytesToInt32BE (const unsigned char *bytes)
AP4_SI16 | AP4_BytesToInt16BE (const unsigned char *bytes)
void | AP4_BytesFromDoubleBE (unsigned char *bytes, double value)
void | AP4_BytesFromUInt64BE (unsigned char *bytes, AP4_UI64 value)
void | AP4_BytesFromUInt32BE (unsigned char *bytes, AP4_UI32 value)
void | AP4_BytesFromUInt24BE (unsigned char *bytes, AP4_UI32 value)
void | AP4_BytesFromUInt16BE (unsigned char *bytes, AP4_UI16 value)
unsigned long | AP4_DurationMsFromUnits (unsigned long units, unsigned long units_per_second)
unsigned long | AP4_ConvertTime (unsigned long time_value, unsigned long from_time_scale, unsigned long to_time_scale)
void | AP4_FormatFourChars (char *str, AP4_UI32 value)
void | AP4_FormatFourCharsPrintable (char *str, AP4_UI32 value)
AP4_Result | AP4_ParseHex (const char *hex, unsigned char *bytes, unsigned int count)
AP4_Result | AP4_SplitArgs (char *arg, char *&arg0, char *&arg1, char *&arg2)
AP4_Result | AP4_SplitArgs (char *arg, char *&arg0, char *&arg1)

## Define Documentation

#define AP4_CompareStrings | ( | x,
|  | y |  | ) | strcmp(x,y)

Definition at line 86 of file Ap4Utils.h.

#define AP4_CopyMemory | ( | x,
|  | y,
|  | z |  | ) | memcpy(x,y,z)

Definition at line 84 of file Ap4Utils.h.

#define AP4_FormatString AP4_snprintf

Definition at line 71 of file Ap4Utils.h.

#define AP4_FormatStringVN | ( | s,
|  | c,
|  | f,
|  | a |  | ) | AP4_vsnprintf(s,c,f,a)

Definition at line 76 of file Ap4Utils.h.

#define AP4_SetMemory | ( | x,
|  | y,
|  | z |  | ) | memset(x,y,z)

Definition at line 85 of file Ap4Utils.h.

#define AP4_StringLength | ( | x |  | ) | strlen(x)

Definition at line 83 of file Ap4Utils.h.

## Function Documentation

void AP4_BytesFromDoubleBE | ( | unsigned char * | bytes,
|  | double | value |
| ) |  |  |

void AP4_BytesFromUInt16BE | ( | unsigned char * | bytes,
|  | AP4_UI16 | value |
| ) |  |  |

void AP4_BytesFromUInt24BE | ( | unsigned char * | bytes,
|  | AP4_UI32 | value |
| ) |  |  |

void AP4_BytesFromUInt32BE | ( | unsigned char * | bytes,
|  | AP4_UI32 | value |
| ) |  |  |

void AP4_BytesFromUInt64BE | ( | unsigned char * | bytes,
|  | AP4_UI64 | value |
| ) |  |  |

double AP4_BytesToDoubleBE | ( | const unsigned char * | bytes | ) |

AP4_SI16 AP4_BytesToInt16BE | ( | const unsigned char * | bytes | ) |

AP4_SI32 AP4_BytesToInt32BE | ( | const unsigned char * | bytes | ) |

AP4_UI16 AP4_BytesToUInt16BE | ( | const unsigned char * | bytes | ) |

AP4_UI32 AP4_BytesToUInt24BE | ( | const unsigned char * | bytes | ) |

AP4_UI32 AP4_BytesToUInt32BE | ( | const unsigned char * | bytes | ) |

AP4_UI64 AP4_BytesToUInt64BE | ( | const unsigned char * | bytes | ) |

unsigned long AP4_ConvertTime | ( | unsigned long | time_value,
|  | unsigned long | from_time_scale,
|  | unsigned long | to_time_scale |
| ) |  |  |

unsigned long AP4_DurationMsFromUnits | ( | unsigned long | units,
|  | unsigned long | units_per_second |
| ) |  |  |

void AP4_FormatFourChars | ( | char * | str,
|  | AP4_UI32 | value |
| ) |  |  |

void AP4_FormatFourCharsPrintable | ( | char * | str,
|  | AP4_UI32 | value |
| ) |  |  |

AP4_Result AP4_ParseHex | ( | const char * | hex,
|  | unsigned char * | bytes,
|  | unsigned int | count |
| ) |  |  |

AP4_Result AP4_SplitArgs | ( | char * | arg,
|  | char *& | arg0,
|  | char *& | arg1 |
| ) |  |  |

AP4_Result AP4_SplitArgs | ( | char * | arg,
|  | char *& | arg0,
|  | char *& | arg1,
|  | char *& | arg2 |
| ) |  |  |