Home Units Hierarchy Routines All identifiers

Class unaMpegAudio_layer123

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type unaMpegAudio_layer123 = class(unaObject)

Description

MPEG audio frame parser. Supports MPEG1 and MPEG2 layer I, II and III frames.

Hierarchy

Overview

Methods

Public constructor create(reader: unaBitReader_abstract);
Public function nextFrame(var h: unaMpegHeader; out foundAt: int64; out skipOnResynch: int; outBuf: pointer; out frameSize: int; panicOnSmallBuf: bool = false): HRESULT;
Protected procedure ancillary_data(const h: unaMpegHeader); virtual;
Protected procedure audio_data(const h: unaMpegHeader); virtual;

Properties

Public property mpegChannels: int read f_mpgChannels;
Public property mpegID: int read f_mpgID;
Public property mpegLayer: int read f_mpgLayer;
Public property mpegSamplesPerFrame: int read f_mpgSPF;
Public property mpegSamplingRate: int read f_mpgSR;
Public property reader: unaBitReader_abstract read f_reader;

Description

Methods

Public constructor create(reader: unaBitReader_abstract);

Creates MPEG audio parser.

Parameters
reader
Bit-reader which provides audio data for parser.
Public function nextFrame(var h: unaMpegHeader; out foundAt: int64; out skipOnResynch: int; outBuf: pointer; out frameSize: int; panicOnSmallBuf: bool = false): HRESULT;

Tries to locate and read next audio frame from bitstream.

Parameters
h
MPEG audio frame header.
foundAt
[OUT] Offset in bytes from beginning of stream where frame header was found.
skipOnResynch
[OUT] Number of bytes skipped before frame.
outBuf
[OUT] Pointer to buffer to be filled with frame data. Could be nil.
frameSize
[OUT] Size of frame in bytes.
Returns

S_OK if frame was found, -1 otherwise.

Protected procedure ancillary_data(const h: unaMpegHeader); virtual;

Parses ancillary part of a frame.

Protected procedure audio_data(const h: unaMpegHeader); virtual;

Parses audio part of a frame.

Properties

Public property mpegChannels: int read f_mpgChannels;

Number of channels: 1 for mono, 2 for stereo. Not valid unless first frame is found.

Public property mpegID: int read f_mpgID;

MPEG format: 1 for MPEG1, 2 for MPEG2, 3 for MPEG2.5 Not valid unless first frame is found.

Public property mpegLayer: int read f_mpgLayer;

Layer: 1 = Layer I, 2 = Layer II, 3 = Layer III. Not valid unless first frame is found.

Public property mpegSamplesPerFrame: int read f_mpgSPF;

Number of samples per frame. Not valid unless first frame is found.

Public property mpegSamplingRate: int read f_mpgSR;

Number of samples per second. Not valid unless first frame is found.

Public property reader: unaBitReader_abstract read f_reader;

Bit-reader provided to parser.

(c) 2012 Lake of Soft


Generated by PasDoc 0.12.1 on 2012-10-09