RTP Audio System  2.0.0
AdvancedAudioPacket Struct Reference

Advanced Audio Packet. More...

#include <advancedaudiopacket.h>

List of all members.

Public Types

enum  AdvancedAudioFlags {
  AAF_ChannelLeft = (1 << 0), AAF_ChannelRight = (1 << 1), AAF_ByteUpper = (1 << 2), AAF_ByteLower = (1 << 3),
  AAF_MediaInfo = (1 << 4)
}

Public Member Functions

 AdvancedAudioPacket ()
void translate ()
void reset ()

Static Public Member Functions

static AudioQuality calculateQualityForLimits (const AudioQualityInterface &userSetting, const AudioQualityInterface &inputQuality, const card64 totalByteRateLimit, const card64 byteRateLimitL1, const card64 byteRateLimitL2, const card64 byteRateLimitL3, const cardinal networkQualityDecrement, const cardinal headerSize, const cardinal maxPacketSize)
static cardinal calculateFrameSize (const cardinal inputBytesPerSecond, const cardinal inputFrameSize)
static cardinal calculateLayers (const AudioQualityInterface &quality)

Public Attributes

card32 FormatID
card16 SamplingRate
card8 Channels
card8 Bits
card64 Position
card64 MaxPosition
card8 ErrorCode
card8 Flags
enum
AdvancedAudioPacket::AdvancedAudioFlags 
__attribute__
card16 Fragment
char Data [0]

Static Public Attributes

static const card16 AdvancedAudioTypeID = 0x2961
static const char AdvancedAudioTypeName [] = "Advanced Audio Encoding"
static const card32 AdvancedAudioFormatID = 0x74660000 | AdvancedAudioTypeID
static const cardinal AdvancedAudioMediaInfoPacketsPerSecond = 2
static const cardinal AdvancedAudioFramesPerSecond = 35
static const cardinal AdvancedAudioFrameSize
static const cardinal AdvancedAudioMaxTransferDelay = 100 * 16
static const cardinal AdvancedAudioMaxQualityLayers = 3
static const cardinal AdvancedAudioQualityLevels = AudioQuality::QualityLevels

Detailed Description

Advanced Audio Packet.

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

Author:
Thomas Dreibholz
Version:
1.0
See also:
AdvancedAudioEncoder
AdvancedAudioDecoder

Member Enumeration Documentation

Emumeration of Flags.

Enumerator:
AAF_ChannelLeft 
AAF_ChannelRight 
AAF_ByteUpper 
AAF_ByteLower 
AAF_MediaInfo 

Constructor & Destructor Documentation


Member Function Documentation

cardinal AdvancedAudioPacket::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.

Calculate number of layers for given quality.

Parameters:
qualityQuality.
Returns:
Number of layers.
AudioQuality AdvancedAudioPacket::calculateQualityForLimits ( const AudioQualityInterface userSetting,
const AudioQualityInterface inputQuality,
const card64  totalByteRateLimit,
const card64  byteRateLimitL1,
const card64  byteRateLimitL2,
const card64  byteRateLimitL3,
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.
byteRateLimitL1Layer #0 byte rate limit.
byteRateLimitL2Layer #1 byte rate limit.
byteRateLimitL3Layer #2 byte rate limit.
networkQualityDecrementNumber of steps for decrement of user's quality.
headerSizeHeader size (eg. IP + UDP + RTP). AdvancedAudioPacket size is added automatically.
maxPacketSizeMaximum packet size.
Returns:
The calculated quality.

Reset report.

Translate byte order.


Member Data Documentation

const card32 AdvancedAudioPacket::AdvancedAudioFormatID = 0x74660000 | AdvancedAudioTypeID [static]

Advanced Audio Encoding package format ID.

Initial value:

Advanced Audio frame size.

Advanced Audio frames per second.

Advanced Audio maximum quality layers.

Advanced Audio maximum transfer delay.

Advanced Audio MediaInfo packets per second.

Type ID for Advanced Audio Encoding.

const char AdvancedAudioPacket::AdvancedAudioTypeName = "Advanced Audio Encoding" [static]

Name for Advanced Audio Encoding.

Number of audio bits.

Number of audio channels.

Packet data.

Advanced Audio Encoding Flags.

Maximum position in nanoseconds.

Current position in nanoseconds.


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