pjsip logo pjsip.org
Open source SIP stack and media stack for presence, im/instant messaging, and multimedia communication

HOME

SIP/media Features
High Performance SIP
Small Footprint SIP
Symbian Port

FAQ

Documentation

Licensing

Download

Development (Trac)

Projects using pjsip

Mailing List

Open Source Links


About: PJLIB, PJLIB-UTIL, PJSIP, and PJMEDIA are created by: Benny Prijono
<bennylp@pjsip.org>


 

Home --> Documentations --> PJMEDIA Reference

WAVE Header
[File Formats]


Detailed Description

This the the low level representation of RIFF/WAVE file format. For higher abstraction, please see WAV File Player and File Writer (Recorder).


Data Structures

struct  pjmedia_wave_hdr
struct  pjmedia_wave_subchunk

Defines

#define PJMEDIA_RIFF_TAG   ('F'<<24|'F'<<16|'I'<<8|'R')
#define PJMEDIA_WAVE_TAG   ('E'<<24|'V'<<16|'A'<<8|'W')
#define PJMEDIA_FMT_TAG   (' '<<24|'t'<<16|'m'<<8|'f')
#define PJMEDIA_DATA_TAG   ('a'<<24|'t'<<16|'a'<<8|'d')
#define PJMEDIA_FACT_TAG   ('t'<<24|'c'<<16|'a'<<8|'f')
#define PJMEDIA_WAVE_NORMALIZE_SUBCHUNK(ch)

Typedefs

typedef struct pjmedia_wave_hdr pjmedia_wave_hdr

Enumerations

enum  pjmedia_wave_fmt_tag {
  PJMEDIA_WAVE_FMT_TAG_PCM = 1,
  PJMEDIA_WAVE_FMT_TAG_ALAW = 6,
  PJMEDIA_WAVE_FMT_TAG_ULAW = 7
}

Functions

void pjmedia_wave_hdr_file_to_host (pjmedia_wave_hdr *hdr)
void pjmedia_wave_hdr_host_to_file (pjmedia_wave_hdr *hdr)


Define Documentation

#define PJMEDIA_RIFF_TAG   ('F'<<24|'F'<<16|'I'<<8|'R')

Standard RIFF tag to identify RIFF file format in the WAVE header.

#define PJMEDIA_WAVE_TAG   ('E'<<24|'V'<<16|'A'<<8|'W')

Standard WAVE tag to identify WAVE header.

#define PJMEDIA_FMT_TAG   (' '<<24|'t'<<16|'m'<<8|'f')

Standard FMT tag to identify format chunks.

#define PJMEDIA_DATA_TAG   ('a'<<24|'t'<<16|'a'<<8|'d')

Standard DATA tag to identify data chunks.

#define PJMEDIA_FACT_TAG   ('t'<<24|'c'<<16|'a'<<8|'f')

Standard FACT tag to identify fact chunks.

#define PJMEDIA_WAVE_NORMALIZE_SUBCHUNK ( ch   ) 

Normalize subchunk header from little endian (the representation of RIFF file) into host's endian.


Typedef Documentation


Enumeration Type Documentation

Enumeration of format compression tag.


Function Documentation

void pjmedia_wave_hdr_file_to_host ( pjmedia_wave_hdr hdr  ) 

On big-endian hosts, this function swaps the byte order of the values in the WAVE header fields. On little-endian hosts, this function does nothing.

Application SHOULD call this function after reading the WAVE header chunks from a file.

Parameters:
hdr The WAVE header.

void pjmedia_wave_hdr_host_to_file ( pjmedia_wave_hdr hdr  ) 

On big-endian hosts, this function swaps the byte order of the values in the WAVE header fields. On little-endian hosts, this function does nothing.

Application SHOULD call this function before writing the WAVE header to a file.

Parameters:
hdr The WAVE header.

 


PJMEDIA small footprint Open Source media stack
(C)2003-2008 Benny Prijono