Yate
FormatRepository Class Reference

A repository for media formats. More...

#include <yatephone.h>

Static Public Member Functions

static const FormatInfogetFormat (const String &name)
 
static const FormatInfoaddFormat (const String &name, int fsize, int ftime, const String &type="audio", int srate=8000, int nchan=1)
 

Detailed Description

A repository for media formats.

This is just a holder for the list of media formats supported by Yate

Member Function Documentation

◆ addFormat()

static const FormatInfo * addFormat ( const String & name,
int fsize,
int ftime,
const String & type = "audio",
int srate = 8000,
int nchan = 1 )
static

Add a new format to the repository

Parameters
nameStandard no-blanks lowercase format name
fsizeData frame size in octets/frame, 0 for non-framed formats
ftimeData frame duration in microseconds, 0 for variable
typeFormat type: "audio", "video", "text"
srateRate in samples/second (audio) or 1e-6 frames/second (video), 0 for unknown
nchanNumber of channels, typically 1
Returns
Pointer to the format info or NULL if another incompatible format with the same name was already registered

◆ getFormat()

static const FormatInfo * getFormat ( const String & name)
static

Retrieve a format by name and type

Parameters
nameStandard name of the format to find
Returns
Pointer to the format info or NULL if not found

The documentation for this class was generated from the following file: