RTP Audio System  2.0.0
simpleaudiopacket.h File Reference
#include "tdsystem.h"
#include "mediainfo.h"
#include "audioquality.h"

Go to the source code of this file.

Classes

struct  SimpleAudioPacket
 Simple Audio Packet. More...

Enumerations

enum  SimpleAudioFlags { SAF_Data = 0, SAF_MediaInfo = 1 }

Functions

struct SimpleAudioPacket __attribute__ ((packed))
 SimpleAudioPacket ()
void translate ()
void reset ()
static AudioQuality calculateQualityForLimits (const AudioQualityInterface &userSetting, const AudioQualityInterface &inputQuality, const card64 totalByteRateLimit, const cardinal networkQualityDecrement, const cardinal headerSize, const cardinal maxPacketSize)
static cardinal calculateFrameSize (const cardinal inputBytesPerSecond, const cardinal inputFrameSize)

Variables

static const card16 SimpleAudioTypeID = 0x2960
static const char SimpleAudioTypeName []
static const card32 SimpleAudioFormatID = 0x74660000 | SimpleAudioTypeID
static const cardinal SimpleAudioMediaInfoPacketsPerSecond = 1
static const cardinal SimpleAudioFramesPerSecond = 15
static const cardinal SimpleAudioFrameSize = 2352 * 5
static const cardinal SimpleAudioMaxTransferDelay = 1500 * 16
static const cardinal SimpleAudioQualityLevels = AudioQuality::QualityLevels
card32 FormatID
card16 SamplingRate
card8 Channels
card8 Bits
card64 Position
card64 MaxPosition
card8 ErrorCode
card8 Flags
char Data []

Enumeration Type Documentation

Emumeration of Flags.

Enumerator:
SAF_Data 
SAF_MediaInfo 

Function Documentation

struct SimpleAudioPacket __attribute__ ( (packed)  )
static cardinal __attribute__::calculateFrameSize ( const cardinal  inputBytesPerSecond,
const cardinal  inputFrameSize 
) [static]

Calculate output frame size from given input bytes per second and input frame size.

Parameters:
inputBytesPerSecondInput source's bytes per second.
inputFrameSizeInput source's frame size.
Returns:
The calculated frame size.
static AudioQuality __attribute__::calculateQualityForLimits ( const AudioQualityInterface userSetting,
const AudioQualityInterface inputQuality,
const card64  totalByteRateLimit,
const cardinal  networkQualityDecrement,
const cardinal  headerSize,
const cardinal  maxPacketSize 
) [static]

Quality calculation for given user quality limited by input quality, byte rate and network quality decrement with given header size (eg. IP + UDP + RTP) and maximum packet size.

Parameters:
userSettingUser's quality setting.
inputQualityInput source's quality.
byteRateLimitByte rate limit.
networkQualityDecrementNumber of steps for decrement of user's quality.
headerSizeHeader size (eg. IP + UDP + RTP). SimpleAudioPacket size is added automatically.
maxPacketSizeMaximum packet size.
Returns:
The calculated quality.

Reset report.

Translate byte order.


Variable Documentation

Number of audio bits.

Number of audio channels.

char Data[]

Packet data.

Error code.

Flags.

Packet format ID.

Maximum position in nanoseconds.

Current position in nanoseconds.

Audio sampling rate.

const card32 SimpleAudioFormatID = 0x74660000 | SimpleAudioTypeID [static]

Simple Audio Encoding package format ID.

const cardinal SimpleAudioFrameSize = 2352 * 5 [static]

Simple Audio frame size.

const cardinal SimpleAudioFramesPerSecond = 15 [static]

Simple Audio frames per second.

const cardinal SimpleAudioMaxTransferDelay = 1500 * 16 [static]

Simple Audio maximum transfer delay.

Simple Audio MediaInfo packets per second.

Simple Audio number of quality levels.

const card16 SimpleAudioTypeID = 0x2960 [static]

Type ID for Simple Audio Encoding.

const char SimpleAudioTypeName[] [static]

Name for Simple Audio Encoding.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines