|
RTP Audio System
2.0.0
|
#include "tdsystem.h"#include "tdstrings.h"#include "tools.h"#include <pwd.h>#include <time.h>#include <sys/utsname.h>Defines | |
| #define | PRINT_ALLOCATIONS |
Functions | |
| cardinal | calculatePacketsPerSecond (const cardinal payloadBytesPerSecond, const cardinal framesPerSecond, const cardinal maxPacketSize, const cardinal headerLength) |
| cardinal | calculateBytesPerSecond (const cardinal payloadBytesPerSecond, const cardinal framesPerSecond, const cardinal maxPacketSize, const cardinal headerLength) |
| bool | scanURL (const String &location, String &protocol, String &host, String &path) |
| void | printTimeStamp (std::ostream &os) |
| bool | getUserName (char *str, const size_t size, const bool realName, uid_t uid) |
| #define PRINT_ALLOCATIONS |
| cardinal calculateBytesPerSecond | ( | const cardinal | payloadBytesPerSecond, |
| const cardinal | framesPerSecond, | ||
| const cardinal | maxPacketSize, | ||
| const cardinal | headerLength | ||
| ) |
Calculate frames per second.
Asumption: Every frame has it's own packets.
| payloadBytesPerSecond | Byte rate of payload data. |
| framesPerSecond | Frame rate. |
| maxPacketSize | Maximum size of a packet. |
| headerLength | Length of header for each frame. |
| cardinal calculatePacketsPerSecond | ( | const cardinal | payloadBytesPerSecond, |
| const cardinal | framesPerSecond, | ||
| const cardinal | maxPacketSize, | ||
| const cardinal | headerLength | ||
| ) |
Calculate packets per second.
Asumption: Every frame has it's own packets.
| payloadBytesPerSecond | Byte rate of payload data. |
| framesPerSecond | Frame rate. |
| maxPacketSize | Maximum size of a packet. |
| headerLength | Length of header for each frame. |
| bool getUserName | ( | char * | str, |
| const size_t | size, | ||
| const bool | realName = false, |
||
| const uid_t | uid = getuid() |
||
| ) |
Get user name for given user ID.
| str | Buffer to store name to. |
| size | Size of buffer. |
| realName | true to get real name (e.g. John Miller); false to get user name (e.g. jmiller). |
| uid | User ID. |
| void printTimeStamp | ( | std::ostream & | os = std::cout | ) |
Print time stamp (date and time) to given output stream.
| os | Output stream. |
Scan protocol, host and path from an URL string. The protocol my be missing, if the String "protocol" is initialized with a default.
| location | String with URL. |
| protocol | Place to store the protocol name. |
| host | Place to store the host name. |
| path | Place to store the path. |