RTP Audio System  2.0.0
SimpleAudioPacket Struct Reference

Simple Audio Packet. More...

#include <simpleaudiopacket.h>

List of all members.

Public Types

enum  SimpleAudioFlags { SAF_Data = 0, SAF_MediaInfo = 1 }

Public Member Functions

 SimpleAudioPacket ()
void translate ()
void reset ()

Static Public Member Functions

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)

Public Attributes

card32 FormatID
card16 SamplingRate
card8 Channels
card8 Bits
card64 Position
card64 MaxPosition
card8 ErrorCode
card8 Flags
enum
SimpleAudioPacket::SimpleAudioFlags 
__attribute__
char Data []

Static Public Attributes

static const card16 SimpleAudioTypeID = 0x2960
static const char SimpleAudioTypeName [] = "Simple Audio Encoding"
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

Detailed Description

Simple Audio Packet.

This struct defines the packet format for the simple audio encoder.

Author:
Thomas Dreibholz
Version:
1.0
See also:
SimpleAudioEncoder
SimpleAudioDecoder

Member Enumeration Documentation

Emumeration of Flags.

Enumerator:
SAF_Data 
SAF_MediaInfo 

Constructor & Destructor Documentation


Member Function Documentation

cardinal SimpleAudioPacket::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.
AudioQuality SimpleAudioPacket::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.


Member Data Documentation

Number of audio bits.

Number of audio channels.

Packet data.

Maximum position in nanoseconds.

Current position in nanoseconds.

const card32 SimpleAudioPacket::SimpleAudioFormatID = 0x74660000 | SimpleAudioTypeID [static]

Simple Audio Encoding package format ID.

Simple Audio frame size.

Simple Audio frames per second.

Simple Audio maximum transfer delay.

Simple Audio MediaInfo packets per second.

Simple Audio number of quality levels.

Type ID for Simple Audio Encoding.

const char SimpleAudioPacket::SimpleAudioTypeName = "Simple Audio Encoding" [static]

Name for Simple Audio Encoding.


The documentation for this struct was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines