Libav
Data Structures | Macros | Functions | Variables
flvdec.c File Reference
#include "libavutil/avstring.h"
#include "libavutil/channel_layout.h"
#include "libavutil/dict.h"
#include "libavutil/opt.h"
#include "libavutil/intfloat.h"
#include "libavutil/mathematics.h"
#include "libavcodec/bytestream.h"
#include "libavcodec/mpeg4audio.h"
#include "avformat.h"
#include "internal.h"
#include "avio_internal.h"
#include "flv.h"

Go to the source code of this file.

Data Structures

struct  FLVContext
 

Macros

#define KEYFRAMES_TAG   "keyframes"
 
#define KEYFRAMES_TIMESTAMP_TAG   "times"
 
#define KEYFRAMES_BYTEOFFSET_TAG   "filepositions"
 
#define VALIDATE_INDEX_TS_THRESH   2500
 
#define OFFSET(x)   offsetof(FLVContext, x)
 
#define VD   AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM
 

Functions

static int flv_probe (AVProbeData *p)
 
static AVStreamcreate_stream (AVFormatContext *s, int codec_type)
 
static int flv_same_audio_codec (AVCodecContext *acodec, int flags)
 
static void flv_set_audio_codec (AVFormatContext *s, AVStream *astream, AVCodecContext *acodec, int flv_codecid)
 
static int flv_same_video_codec (AVCodecContext *vcodec, int flags)
 
static int flv_set_video_codec (AVFormatContext *s, AVStream *vstream, int flv_codecid, int read)
 
static int amf_get_string (AVIOContext *ioc, char *buffer, int buffsize)
 
static int parse_keyframes_index (AVFormatContext *s, AVIOContext *ioc, AVStream *vstream, int64_t max_pos)
 
static int amf_parse_object (AVFormatContext *s, AVStream *astream, AVStream *vstream, const char *key, int64_t max_pos, int depth)
 
static int flv_read_metabody (AVFormatContext *s, int64_t next_pos)
 
static int flv_read_header (AVFormatContext *s)
 
static int flv_read_close (AVFormatContext *s)
 
static int flv_get_extradata (AVFormatContext *s, AVStream *st, int size)
 
static int flv_queue_extradata (FLVContext *flv, AVIOContext *pb, int stream, int size)
 
static void clear_index_entries (AVFormatContext *s, int64_t pos)
 
static int amf_skip_tag (AVIOContext *pb, AMFDataType type)
 
static int flv_data_packet (AVFormatContext *s, AVPacket *pkt, int64_t dts, int64_t next)
 
static int flv_read_packet (AVFormatContext *s, AVPacket *pkt)
 
static int flv_read_seek (AVFormatContext *s, int stream_index, int64_t ts, int flags)
 

Variables

static const AVOption options []
 
class {
      class_name = "flvdec"
 
      item_name = av_default_item_name
 
      option = options
 
      version = LIBAVUTIL_VERSION_INT
 
}; 
 
AVInputFormat ff_flv_demuxer
 

Macro Definition Documentation

#define KEYFRAMES_TAG   "keyframes"

Definition at line 40 of file flvdec.c.

Referenced by amf_parse_object().

#define KEYFRAMES_TIMESTAMP_TAG   "times"

Definition at line 41 of file flvdec.c.

Referenced by parse_keyframes_index().

#define KEYFRAMES_BYTEOFFSET_TAG   "filepositions"

Definition at line 42 of file flvdec.c.

Referenced by parse_keyframes_index().

#define VALIDATE_INDEX_TS_THRESH   2500

Definition at line 44 of file flvdec.c.

Referenced by flv_read_packet().

#define OFFSET (   x)    offsetof(FLVContext, x)

Definition at line 989 of file flvdec.c.

Definition at line 990 of file flvdec.c.

Function Documentation

static int flv_probe ( AVProbeData p)
static

Definition at line 62 of file flvdec.c.

static AVStream* create_stream ( AVFormatContext s,
int  codec_type 
)
static

Definition at line 77 of file flvdec.c.

Referenced by amf_parse_object(), flv_data_packet(), flv_read_header(), and flv_read_packet().

static int flv_same_audio_codec ( AVCodecContext acodec,
int  flags 
)
static

Definition at line 87 of file flvdec.c.

Referenced by flv_read_packet().

static void flv_set_audio_codec ( AVFormatContext s,
AVStream astream,
AVCodecContext acodec,
int  flv_codecid 
)
static

Definition at line 138 of file flvdec.c.

Referenced by amf_parse_object(), and flv_read_packet().

static int flv_same_video_codec ( AVCodecContext vcodec,
int  flags 
)
static

Definition at line 198 of file flvdec.c.

Referenced by flv_read_packet().

static int flv_set_video_codec ( AVFormatContext s,
AVStream vstream,
int  flv_codecid,
int  read 
)
static

Definition at line 223 of file flvdec.c.

Referenced by amf_parse_object(), and flv_read_packet().

static int amf_get_string ( AVIOContext ioc,
char *  buffer,
int  buffsize 
)
static
static int parse_keyframes_index ( AVFormatContext s,
AVIOContext ioc,
AVStream vstream,
int64_t  max_pos 
)
static

Definition at line 280 of file flvdec.c.

Referenced by amf_parse_object().

static int amf_parse_object ( AVFormatContext s,
AVStream astream,
AVStream vstream,
const char *  key,
int64_t  max_pos,
int  depth 
)
static

Definition at line 366 of file flvdec.c.

Referenced by flv_read_metabody().

static int flv_read_metabody ( AVFormatContext s,
int64_t  next_pos 
)
static

Definition at line 513 of file flvdec.c.

Referenced by flv_read_packet().

static int flv_read_header ( AVFormatContext s)
static

Definition at line 556 of file flvdec.c.

static int flv_read_close ( AVFormatContext s)
static

Definition at line 589 of file flvdec.c.

static int flv_get_extradata ( AVFormatContext s,
AVStream st,
int  size 
)
static

Definition at line 597 of file flvdec.c.

Referenced by flv_read_packet().

static int flv_queue_extradata ( FLVContext flv,
AVIOContext pb,
int  stream,
int  size 
)
static

Definition at line 608 of file flvdec.c.

Referenced by flv_read_packet().

static void clear_index_entries ( AVFormatContext s,
int64_t  pos 
)
static

Definition at line 621 of file flvdec.c.

Referenced by flv_read_packet().

static int amf_skip_tag ( AVIOContext pb,
AMFDataType  type 
)
static

Definition at line 637 of file flvdec.c.

Referenced by flv_data_packet().

static int flv_data_packet ( AVFormatContext s,
AVPacket pkt,
int64_t  dts,
int64_t  next 
)
static

Definition at line 678 of file flvdec.c.

Referenced by flv_read_packet().

static int flv_read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 742 of file flvdec.c.

static int flv_read_seek ( AVFormatContext s,
int  stream_index,
int64_t  ts,
int  flags 
)
static

Definition at line 981 of file flvdec.c.

Variable Documentation

const AVOption options[]
static
Initial value:
= {
{ "flv_metadata", "Allocate streams according to the onMetaData array", OFFSET(trust_metadata), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VD },
{ NULL }
}
#define OFFSET(x)
Definition: flvdec.c:989
#define VD
Definition: flvdec.c:990
NULL
Definition: eval.c:55

Definition at line 991 of file flvdec.c.

class_name = "flvdec"

Definition at line 997 of file flvdec.c.

item_name = av_default_item_name

Definition at line 998 of file flvdec.c.

option = options

Definition at line 999 of file flvdec.c.

Definition at line 1000 of file flvdec.c.

const { ... }
AVInputFormat ff_flv_demuxer
Initial value:
= {
.name = "flv",
.long_name = NULL_IF_CONFIG_SMALL("FLV (Flash Video)"),
.priv_data_size = sizeof(FLVContext),
.extensions = "flv",
.priv_class = &class,
}
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
Definition: libcdio.c:153
static int flv_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: flvdec.c:742
static int flv_read_seek(AVFormatContext *s, int stream_index, int64_t ts, int flags)
Definition: flvdec.c:981
static av_cold int read_close(AVFormatContext *ctx)
Definition: libcdio.c:145
static int flv_read_close(AVFormatContext *s)
Definition: flvdec.c:589
static int flv_read_header(AVFormatContext *s)
Definition: flvdec.c:556
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:142
static int read_probe(AVProbeData *pd)
Definition: jvdec.c:55
static int flv_probe(AVProbeData *p)
Definition: flvdec.c:62
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:536
static int read_packet(AVFormatContext *ctx, AVPacket *pkt)
Definition: libcdio.c:114

Definition at line 1003 of file flvdec.c.