Data Structures | Defines | Functions | Variables

libavformat/wav.c File Reference

#include "avformat.h"
#include "avio_internal.h"
#include "pcm.h"
#include "riff.h"
#include "metadata.h"

Go to the source code of this file.

Data Structures

struct  WAVContext

Defines

#define MAX_SIZE   4096

Functions

static int wav_write_header (AVFormatContext *s)
static int wav_write_packet (AVFormatContext *s, AVPacket *pkt)
static int wav_write_trailer (AVFormatContext *s)
static int64_t next_tag (AVIOContext *pb, unsigned int *tag)
static int64_t find_tag (AVIOContext *pb, uint32_t tag1)
static int wav_probe (AVProbeData *p)
static int wav_parse_fmt_tag (AVFormatContext *s, int64_t size, AVStream **st)
static int wav_parse_bext_string (AVFormatContext *s, const char *key, int length)
static int wav_parse_bext_tag (AVFormatContext *s, int64_t size)
static int wav_read_header (AVFormatContext *s, AVFormatParameters *ap)
static int64_t find_guid (AVIOContext *pb, const uint8_t guid1[16])
 Find chunk with w64 GUID by skipping over other chunks.
static int wav_read_packet (AVFormatContext *s, AVPacket *pkt)
static int wav_read_seek (AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
static int w64_probe (AVProbeData *p)
static int w64_read_header (AVFormatContext *s, AVFormatParameters *ap)

Variables

AVOutputFormat ff_wav_muxer
static const AVMetadataConv wav_metadata_conv []
static const uint8_t guid_data [16]
AVInputFormat ff_wav_demuxer
static const uint8_t guid_riff [16]
static const uint8_t guid_wave [16]
static const uint8_t guid_fmt [16]
AVInputFormat ff_w64_demuxer

Define Documentation

#define MAX_SIZE   4096

Definition at line 435 of file wav.c.


Function Documentation

static int64_t find_guid ( AVIOContext pb,
const uint8_t  guid1[16] 
) [static]

Find chunk with w64 GUID by skipping over other chunks.

Returns:
the size of the found chunk

Definition at line 415 of file wav.c.

Referenced by w64_read_header(), and wav_read_packet().

static int64_t find_tag ( AVIOContext pb,
uint32_t  tag1 
) [static]

Definition at line 152 of file wav.c.

Referenced by wav_read_packet().

static int64_t next_tag ( AVIOContext pb,
unsigned int *  tag 
) [static]

Definition at line 145 of file wav.c.

Referenced by find_tag(), and wav_read_header().

static int w64_probe ( AVProbeData p  )  [static]

Definition at line 517 of file wav.c.

static int w64_read_header ( AVFormatContext s,
AVFormatParameters ap 
) [static]

Definition at line 528 of file wav.c.

static int wav_parse_bext_string ( AVFormatContext s,
const char *  key,
int  length 
) [inline, static]

Definition at line 208 of file wav.c.

Referenced by wav_parse_bext_tag().

static int wav_parse_bext_tag ( AVFormatContext s,
int64_t  size 
) [static]

Definition at line 224 of file wav.c.

Referenced by wav_read_header().

static int wav_parse_fmt_tag ( AVFormatContext s,
int64_t  size,
AVStream **  st 
) [static]

Definition at line 188 of file wav.c.

Referenced by wav_read_header().

static int wav_probe ( AVProbeData p  )  [static]

Definition at line 168 of file wav.c.

static int wav_read_header ( AVFormatContext s,
AVFormatParameters ap 
) [static]

Definition at line 298 of file wav.c.

static int wav_read_packet ( AVFormatContext s,
AVPacket pkt 
) [static]

Definition at line 437 of file wav.c.

static int wav_read_seek ( AVFormatContext s,
int  stream_index,
int64_t  timestamp,
int  flags 
) [static]

Definition at line 473 of file wav.c.

static int wav_write_header ( AVFormatContext s  )  [static]

Definition at line 41 of file wav.c.

static int wav_write_packet ( AVFormatContext s,
AVPacket pkt 
) [static]

Definition at line 79 of file wav.c.

static int wav_write_trailer ( AVFormatContext s  )  [static]

Definition at line 93 of file wav.c.


Variable Documentation

Initial value:
 {
    "w64",
    NULL_IF_CONFIG_SMALL("Sony Wave64 format"),
    sizeof(WAVContext),
    w64_probe,
    w64_read_header,
    wav_read_packet,
    NULL,
    wav_read_seek,
    .flags = AVFMT_GENERIC_INDEX,
    .codec_tag = (const AVCodecTag* const []){ff_codec_wav_tags, 0},
}

Definition at line 581 of file wav.c.

Initial value:

Definition at line 492 of file wav.c.

Initial value:
 {
    "wav",
    NULL_IF_CONFIG_SMALL("WAV format"),
    "audio/x-wav",
    "wav",
    sizeof(WAVContext),
    CODEC_ID_PCM_S16LE,
    CODEC_ID_NONE,
    wav_write_header,
    wav_write_packet,
    wav_write_trailer,
    .codec_tag= (const AVCodecTag* const []){ff_codec_wav_tags, 0},
}

Definition at line 127 of file wav.c.

const uint8_t guid_data[16] [static]
Initial value:
 { 'd', 'a', 't', 'a',
    0xF3, 0xAC, 0xD3, 0x11, 0x8C, 0xD1, 0x00, 0xC0, 0x4F, 0x8E, 0xDB, 0x8A }

Definition at line 432 of file wav.c.

Referenced by w64_read_header(), and wav_read_packet().

const uint8_t guid_fmt[16] [static]
Initial value:
 { 'f', 'm', 't', ' ',
    0xF3, 0xAC, 0xD3, 0x11, 0x8C, 0xD1, 0x00, 0xC0, 0x4F, 0x8E, 0xDB, 0x8A }

Definition at line 514 of file wav.c.

Referenced by w64_read_header().

const uint8_t guid_riff[16] [static]
Initial value:
 { 'r', 'i', 'f', 'f',
    0x2E, 0x91, 0xCF, 0x11, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00 }

Definition at line 508 of file wav.c.

Referenced by w64_probe(), and w64_read_header().

const uint8_t guid_wave[16] [static]
Initial value:
 { 'w', 'a', 'v', 'e',
    0xF3, 0xAC, 0xD3, 0x11, 0x8C, 0xD1, 0x00, 0xC0, 0x4F, 0x8E, 0xDB, 0x8A }

Definition at line 511 of file wav.c.

Referenced by w64_probe(), and w64_read_header().

Initial value:
 {
    {"description",      "comment"      },
    {"originator",       "encoded_by"   },
    {"origination_date", "date"         },
    {"origination_time", "creation_time"},
    {0},
}

Definition at line 289 of file wav.c.