|
#ifndef __TOOL__H__
|
#define __TOOL__H__
|
|
#include <string.h>
|
#include <iostream>
|
#include <ctype.h>
|
|
|
using namespace std;
|
|
#ifdef __cplusplus
|
extern "C"
|
{
|
#endif
|
char* base64MyEncode(char const* origSigned, unsigned origLength);
|
|
int GetClockTime();
|
bool IsVideoPayloadType(int type);
|
bool IsPsHeader(unsigned char *data);
|
|
char* strMyDup(char const* str);
|
// Note: strDup(NULL) returns NULL
|
|
char* strMyDupSize(char const* str);
|
// Like "strDup()", except that it *doesn't* copy the original.
|
// (Instead, it just allocates a string of the same size as the original.)
|
|
char* strMyDupSize2(char const* str, size_t& resultBufSize);
|
// An alternative form of "strDupSize()" that also returns the size of the allocated buffer.
|
#ifdef __cplusplus
|
}
|
#endif
|
|
#endif
|