Libav
Data Structures | Macros | Functions | Variables
avidec.c File Reference
#include <inttypes.h>
#include "libavutil/avstring.h"
#include "libavutil/bswap.h"
#include "libavutil/dict.h"
#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mathematics.h"
#include "avformat.h"
#include "avi.h"
#include "dv.h"
#include "internal.h"
#include "riff.h"
#include <assert.h>

Go to the source code of this file.

Data Structures

struct  AVIStream
 
struct  AVIContext
 

Macros

#define MAX_ODML_DEPTH   1000
 
#define print_tag(str, tag, size)
 

Functions

static int avi_load_index (AVFormatContext *s)
 
static int guess_ni_flag (AVFormatContext *s)
 
static int get_duration (AVIStream *ast, int len)
 
static int get_riff (AVFormatContext *s, AVIOContext *pb)
 
static int read_braindead_odml_indx (AVFormatContext *s, int frame_num)
 
static void clean_index (AVFormatContext *s)
 
static int avi_read_tag (AVFormatContext *s, AVStream *st, uint32_t tag, uint32_t size)
 
static void avi_metadata_creation_time (AVDictionary **metadata, char *date)
 
static void avi_read_nikon (AVFormatContext *s, uint64_t end)
 
static int avi_read_header (AVFormatContext *s)
 
static int read_gab2_sub (AVStream *st, AVPacket *pkt)
 
static AVStreamget_subtitle_pkt (AVFormatContext *s, AVStream *next_st, AVPacket *pkt)
 
static int get_stream_idx (int *d)
 
static int avi_sync (AVFormatContext *s, int exit_early)
 
static int avi_read_packet (AVFormatContext *s, AVPacket *pkt)
 
static int avi_read_idx1 (AVFormatContext *s, int size)
 
static int check_stream_max_drift (AVFormatContext *s)
 
static void seek_subtitle (AVStream *st, AVStream *st2, int64_t timestamp)
 
static int avi_read_seek (AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
 
static int avi_read_close (AVFormatContext *s)
 
static int avi_probe (AVProbeData *p)
 

Variables

static const char avi_headers [][8]
 
static const AVMetadataConv avi_metadata_conv []
 
static const char months [12][4]
 
AVInputFormat ff_avi_demuxer
 

Macro Definition Documentation

§ MAX_ODML_DEPTH

#define MAX_ODML_DEPTH   1000

Definition at line 75 of file avidec.c.

Referenced by read_braindead_odml_indx().

§ print_tag

#define print_tag (   str,
  tag,
  size 
)
Value:
av_dlog(NULL, "%s: tag=%c%c%c%c size=0x%x\n", \
str, tag & 0xff, \
(tag >> 8) & 0xff, \
(tag >> 16) & 0xff, \
(tag >> 24) & 0xff, \
int size
av_dlog(ac->avr, "%d samples - audio_convert: %s to %s (%s)\, len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt), use_generic ? ac->func_descr_generic :ac->func_descr)
uint32_t tag
Definition: movenc.c:844
NULL
Definition: eval.c:55

Definition at line 95 of file avidec.c.

Referenced by avi_read_header().

Function Documentation

§ avi_load_index()

static int avi_load_index ( AVFormatContext s)
static

Definition at line 1428 of file avidec.c.

Referenced by avi_read_header(), and avi_read_seek().

§ guess_ni_flag()

static int guess_ni_flag ( AVFormatContext s)
static

Definition at line 1392 of file avidec.c.

Referenced by avi_read_header().

§ get_duration()

static int get_duration ( AVIStream ast,
int  len 
)
inlinestatic

Definition at line 103 of file avidec.c.

Referenced by avi_read_idx1(), avi_read_packet(), avi_sync(), and read_braindead_odml_indx().

§ get_riff()

static int get_riff ( AVFormatContext s,
AVIOContext pb 
)
static

Definition at line 113 of file avidec.c.

Referenced by avi_read_header().

§ read_braindead_odml_indx()

static int read_braindead_odml_indx ( AVFormatContext s,
int  frame_num 
)
static

Definition at line 138 of file avidec.c.

Referenced by avi_read_header().

§ clean_index()

static void clean_index ( AVFormatContext s)
static

Definition at line 240 of file avidec.c.

Referenced by avi_read_header().

§ avi_read_tag()

static int avi_read_tag ( AVFormatContext s,
AVStream st,
uint32_t  tag,
uint32_t  size 
)
static

Definition at line 268 of file avidec.c.

Referenced by avi_read_header().

§ avi_metadata_creation_time()

static void avi_metadata_creation_time ( AVDictionary **  metadata,
char *  date 
)
static

Definition at line 294 of file avidec.c.

Referenced by avi_read_header().

§ avi_read_nikon()

static void avi_read_nikon ( AVFormatContext s,
uint64_t  end 
)
static

Definition at line 313 of file avidec.c.

Referenced by avi_read_header().

§ avi_read_header()

static int avi_read_header ( AVFormatContext s)
static

Definition at line 355 of file avidec.c.

§ read_gab2_sub()

static int read_gab2_sub ( AVStream st,
AVPacket pkt 
)
static

Definition at line 842 of file avidec.c.

Referenced by avi_read_packet().

§ get_subtitle_pkt()

static AVStream* get_subtitle_pkt ( AVFormatContext s,
AVStream next_st,
AVPacket pkt 
)
static

Definition at line 894 of file avidec.c.

Referenced by avi_read_packet().

§ get_stream_idx()

static int get_stream_idx ( int *  d)
static

Definition at line 928 of file avidec.c.

Referenced by avi_sync().

§ avi_sync()

static int avi_sync ( AVFormatContext s,
int  exit_early 
)
static

Definition at line 938 of file avidec.c.

Referenced by avi_read_idx1(), and avi_read_packet().

§ avi_read_packet()

static int avi_read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 1078 of file avidec.c.

§ avi_read_idx1()

static int avi_read_idx1 ( AVFormatContext s,
int  size 
)
static

Definition at line 1274 of file avidec.c.

Referenced by avi_load_index().

§ check_stream_max_drift()

static int check_stream_max_drift ( AVFormatContext s)
static

Definition at line 1336 of file avidec.c.

Referenced by guess_ni_flag().

§ seek_subtitle()

static void seek_subtitle ( AVStream st,
AVStream st2,
int64_t  timestamp 
)
static

Definition at line 1467 of file avidec.c.

Referenced by avi_read_seek().

§ avi_read_seek()

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

Definition at line 1477 of file avidec.c.

§ avi_read_close()

static int avi_read_close ( AVFormatContext s)
static

Definition at line 1574 of file avidec.c.

§ avi_probe()

static int avi_probe ( AVProbeData p)
static

Definition at line 1597 of file avidec.c.

Variable Documentation

§ avi_headers

const char avi_headers[][8]
static
Initial value:
= {
{ 'R', 'I', 'F', 'F', 'A', 'V', 'I', ' ' },
{ 'R', 'I', 'F', 'F', 'A', 'V', 'I', 'X' },
{ 'R', 'I', 'F', 'F', 'A', 'V', 'I', 0x19 },
{ 'O', 'N', '2', ' ', 'O', 'N', '2', 'f' },
{ 'R', 'I', 'F', 'F', 'A', 'M', 'V', ' ' },
{ 0 }
}

Definition at line 78 of file avidec.c.

Referenced by avi_probe(), and get_riff().

§ avi_metadata_conv

const AVMetadataConv avi_metadata_conv[]
static
Initial value:
= {
{ "strn", "title" },
{ 0 },
}

Definition at line 87 of file avidec.c.

§ months

const char months[12][4]
static
Initial value:
= { "Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }

Definition at line 291 of file avidec.c.

Referenced by avi_metadata_creation_time().

§ ff_avi_demuxer

AVInputFormat ff_avi_demuxer
Initial value:
= {
.name = "avi",
.long_name = NULL_IF_CONFIG_SMALL("AVI (Audio Video Interleaved)"),
.priv_data_size = sizeof(AVIContext),
.extensions = "avi",
}
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
Definition: libcdio.c:153
static int avi_read_close(AVFormatContext *s)
Definition: avidec.c:1574
static av_cold int read_close(AVFormatContext *ctx)
Definition: libcdio.c:145
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:145
static int read_probe(AVProbeData *pd)
Definition: jvdec.c:55
static int avi_read_header(AVFormatContext *s)
Definition: avidec.c:355
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:544
static int avi_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: avidec.c:1078
static int read_packet(AVFormatContext *ctx, AVPacket *pkt)
Definition: libcdio.c:114
static int avi_probe(AVProbeData *p)
Definition: avidec.c:1597
static int avi_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
Definition: avidec.c:1477

Definition at line 1610 of file avidec.c.