Libav
Macros | Functions | Variables
oggdec.c File Reference
#include <stdio.h>
#include "oggdec.h"
#include "avformat.h"
#include "internal.h"
#include "vorbiscomment.h"

Go to the source code of this file.

Macros

#define MAX_PAGE_SIZE   65307
 
#define DECODER_BUFFER_SIZE   MAX_PAGE_SIZE
 

Functions

static int ogg_save (AVFormatContext *s)
 
static int ogg_restore (AVFormatContext *s, int discard)
 
static int ogg_reset (struct ogg *ogg)
 
static const struct ogg_codecogg_find_codec (uint8_t *buf, int size)
 
static int ogg_new_stream (AVFormatContext *s, uint32_t serial, int new_avstream)
 
static int ogg_new_buf (struct ogg *ogg, int idx)
 
static int ogg_read_page (AVFormatContext *s, int *str)
 
static int ogg_packet (AVFormatContext *s, int *str, int *dstart, int *dsize, int64_t *fpos)
 
static int ogg_get_headers (AVFormatContext *s)
 
static int ogg_get_length (AVFormatContext *s)
 
static int ogg_read_close (AVFormatContext *s)
 
static int ogg_read_header (AVFormatContext *s)
 
static int64_t ogg_calc_pts (AVFormatContext *s, int idx, int64_t *dts)
 
static int ogg_read_packet (AVFormatContext *s, AVPacket *pkt)
 
static int64_t ogg_read_timestamp (AVFormatContext *s, int stream_index, int64_t *pos_arg, int64_t pos_limit)
 
static int ogg_read_seek (AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
 
static int ogg_probe (AVProbeData *p)
 

Variables

static const struct ogg_codec
*const 
ogg_codecs []
 
AVInputFormat ff_ogg_demuxer
 

Macro Definition Documentation

#define MAX_PAGE_SIZE   65307

Definition at line 38 of file oggdec.c.

Referenced by ogg_get_length(), and ogg_read_page().

#define DECODER_BUFFER_SIZE   MAX_PAGE_SIZE

Definition at line 39 of file oggdec.c.

Referenced by ogg_new_stream().

Function Documentation

static int ogg_save ( AVFormatContext s)
static

Definition at line 60 of file oggdec.c.

Referenced by ogg_get_length().

static int ogg_restore ( AVFormatContext s,
int  discard 
)
static

Definition at line 83 of file oggdec.c.

Referenced by ogg_get_length().

static int ogg_reset ( struct ogg ogg)
static

Definition at line 117 of file oggdec.c.

Referenced by ogg_read_timestamp().

static const struct ogg_codec* ogg_find_codec ( uint8_t buf,
int  size 
)
static

Definition at line 141 of file oggdec.c.

Referenced by ogg_packet().

static int ogg_new_stream ( AVFormatContext s,
uint32_t  serial,
int  new_avstream 
)
static

Definition at line 153 of file oggdec.c.

Referenced by ogg_read_page().

static int ogg_new_buf ( struct ogg ogg,
int  idx 
)
static

Definition at line 188 of file oggdec.c.

Referenced by ogg_read_page().

static int ogg_read_page ( AVFormatContext s,
int *  str 
)
static

Definition at line 206 of file oggdec.c.

Referenced by ogg_get_length(), and ogg_packet().

static int ogg_packet ( AVFormatContext s,
int *  str,
int *  dstart,
int *  dsize,
int64_t *  fpos 
)
static
static int ogg_get_headers ( AVFormatContext s)
static

Definition at line 465 of file oggdec.c.

Referenced by ogg_read_header().

static int ogg_get_length ( AVFormatContext s)
static

Definition at line 497 of file oggdec.c.

Referenced by ogg_read_header().

static int ogg_read_close ( AVFormatContext s)
static

Definition at line 533 of file oggdec.c.

Referenced by ogg_read_header().

static int ogg_read_header ( AVFormatContext s)
static

Definition at line 550 of file oggdec.c.

static int64_t ogg_calc_pts ( AVFormatContext s,
int  idx,
int64_t *  dts 
)
static

Definition at line 573 of file oggdec.c.

Referenced by ogg_read_packet(), and ogg_read_timestamp().

static int ogg_read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 603 of file oggdec.c.

static int64_t ogg_read_timestamp ( AVFormatContext s,
int  stream_index,
int64_t *  pos_arg,
int64_t  pos_limit 
)
static

Definition at line 645 of file oggdec.c.

static int ogg_read_seek ( AVFormatContext s,
int  stream_index,
int64_t  timestamp,
int  flags 
)
static

Definition at line 670 of file oggdec.c.

static int ogg_probe ( AVProbeData p)
static

Definition at line 690 of file oggdec.c.

Variable Documentation

const struct ogg_codec* const ogg_codecs[]
static
Initial value:
= {
}
const struct ogg_codec ff_celt_codec
Definition: oggparsecelt.c:92
const struct ogg_codec ff_ogm_old_codec
Definition: oggparseogm.c:187
const struct ogg_codec ff_ogm_video_codec
Definition: oggparseogm.c:160
const struct ogg_codec ff_skeleton_codec
const struct ogg_codec ff_opus_codec
Definition: oggparseopus.c:134
const struct ogg_codec ff_vorbis_codec
const struct ogg_codec ff_ogm_audio_codec
Definition: oggparseogm.c:169
const struct ogg_codec ff_theora_codec
NULL
Definition: eval.c:55
const struct ogg_codec ff_flac_codec
Definition: oggparseflac.c:88
const struct ogg_codec ff_old_dirac_codec
const struct ogg_codec ff_old_flac_codec
Definition: oggparseflac.c:95
const struct ogg_codec ff_dirac_codec
const struct ogg_codec ff_speex_codec
const struct ogg_codec ff_ogm_text_codec
Definition: oggparseogm.c:178

Definition at line 41 of file oggdec.c.

AVInputFormat ff_ogg_demuxer
Initial value:
= {
.name = "ogg",
.long_name = NULL_IF_CONFIG_SMALL("Ogg"),
.priv_data_size = sizeof(struct ogg),
.read_header = ogg_read_header,
.read_packet = ogg_read_packet,
.read_close = ogg_read_close,
.read_seek = ogg_read_seek,
.read_timestamp = ogg_read_timestamp,
.extensions = "ogg",
}
#define AVFMT_NOBINSEARCH
Format does not allow to fall back on binary search via read_timestamp.
Definition: avformat.h:413
static int ogg_probe(AVProbeData *p)
Definition: oggdec.c:690
static int ogg_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: oggdec.c:603
static int ogg_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
Definition: oggdec.c:670
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:142
static int ogg_read_close(AVFormatContext *s)
Definition: oggdec.c:533
static int read_probe(AVProbeData *pd)
Definition: jvdec.c:55
#define AVFMT_GENERIC_INDEX
Use generic index building code.
Definition: avformat.h:408
static int ogg_read_header(AVFormatContext *s)
Definition: oggdec.c:550
Definition: oggdec.h:96
static int64_t ogg_read_timestamp(AVFormatContext *s, int stream_index, int64_t *pos_arg, int64_t pos_limit)
Definition: oggdec.c:645

Definition at line 697 of file oggdec.c.