#include <time.h>
#include <stdlib.h>
#include "config.h"
#include <stdio.h>
#include <string>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <assert.h>
Go to the source code of this file.
Namespaces | |
namespace | mxflib |
Classes | |
struct | full_time |
< Structure for holding accurate time (to nearest 4ms) More... | |
Defines | |
#define | uintptr_t long |
#define | DIR_SEPARATOR '/' |
#define | PATH_SEPARATOR ':' |
#define | DEFAULT_DICT_PATH "/usr/local/share/mxflib/" |
#define | IsCommandLineSwitchPrefix(x) ( x == '-' ) |
Allow command-line switches to be prefixed only with '-'. | |
#define | UINT64_C(c) c##ULL |
#define | INT64_C(c) c##ULL |
#define | ASSERT assert |
Typedefs | |
typedef unsigned int | UInt32 |
Unsigned 32-bit integer. | |
typedef unsigned short int | UInt16 |
Unsigned 16-bit integer. | |
typedef unsigned char | UInt8 |
Unsigned 8-bit integer. | |
typedef int | Int32 |
Signed 32-bit integer. | |
typedef short int | Int16 |
Signed 16-bit integer. | |
typedef signed char | Int8 |
Signed 8-bit integer. | |
typedef long long | Int64 |
Signed 64-bit integer. | |
typedef unsigned long long | UInt64 |
Unsigned 64-bit integer. | |
typedef FILE * | FileHandle |
typedef UInt8 | Uint8 |
typedef UInt16 | Uint16 |
typedef UInt32 | Uint32 |
typedef UInt64 | Uint64 |
Functions | |
static bool | IsLittleEndian () |
UInt16 | Swap (UInt16 Val) |
Int16 | Swap (Int16 Val) |
UInt32 | Swap (UInt32 Val) |
Int32 | Swap (Int32 Val) |
UInt64 | Swap (UInt64 Val) |
Int64 | Swap (Int64 Val) |
Int64 | ato_Int64 (const char *str) |
Int64 | ato_UInt64 (const char *str) |
std::string | Int64toString (Int64 Val) |
std::string | UInt64toString (UInt64 Val) |
std::string | Int64toHexString (Int64 Val, int Digits=0) |
void | PauseForInput (void) |
Pause for user input (with prompt) e.g. for debugging purposes. | |
int | FileSeek (FileHandle file, UInt64 offset) |
int | FileSeekEnd (FileHandle file) |
size_t | FileRead (FileHandle file, unsigned char *dest, size_t size) |
size_t | FileWrite (FileHandle file, const unsigned char *source, size_t size) |
int | FileGetc (FileHandle file) |
FileHandle | FileOpen (const char *filename) |
FileHandle | FileOpenRead (const char *filename) |
FileHandle | FileOpenNew (const char *filename) |
bool | FileValid (FileHandle file) |
bool | FileEof (FileHandle file) |
UInt64 | FileTell (FileHandle file) |
void | FileClose (FileHandle file) |
bool | FileExists (const char *filename) |
full_time | GetTime (void) |
Get the current UTC time including number of milliseconds / 4. | |
void | MakeUUID (UInt8 *Buffer) |
bool | IsAbsolutePath (const char *Filename) |
Determine if the specified filename refers to an absolute path. | |
std::string | OSName (void) |
std::string | Uint64toString (Uint64 Val) |
Variables | |
static bool | littleEndian = IsLittleEndian() |
Items that are required to be defined for each platform/compiler:
#define ASSERT assert |
#define DEFAULT_DICT_PATH "/usr/local/share/mxflib/" |
#define DIR_SEPARATOR '/' |
#define INT64_C | ( | c | ) | c##ULL |
#define IsCommandLineSwitchPrefix | ( | x | ) | ( x == '-' ) |
Allow command-line switches to be prefixed only with '-'.
#define PATH_SEPARATOR ':' |
#define UINT64_C | ( | c | ) | c##ULL |
#define uintptr_t long |