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 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_BYTEOFFSET_TAG   "filepositions"

Definition at line 42 of file flvdec.c.

Referenced by parse_keyframes_index().

#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 OFFSET (   x)    offsetof(FLVContext, x)

Definition at line 877 of file flvdec.c.

#define VALIDATE_INDEX_TS_THRESH   2500

Definition at line 44 of file flvdec.c.

Referenced by flv_read_packet().

Definition at line 878 of file flvdec.c.

Function Documentation

static int amf_get_string ( AVIOContext ioc,
char *  buffer,
int  buffsize 
)
static
static int amf_parse_object ( AVFormatContext s,
AVStream astream,
AVStream vstream,
const char *  key,
int64_t  max_pos,
int  depth 
)
static

Definition at line 333 of file flvdec.c.

Referenced by flv_read_metabody().

static void clear_index_entries ( AVFormatContext s,
int64_t  pos 
)
static

Definition at line 570 of file flvdec.c.

Referenced by flv_read_packet().

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

Definition at line 73 of file flvdec.c.

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

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

Definition at line 587 of file flvdec.c.

Referenced by flv_read_packet().

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

Definition at line 547 of file flvdec.c.

Referenced by flv_read_packet().

static int flv_probe ( AVProbeData p)
static

Definition at line 62 of file flvdec.c.

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

Definition at line 558 of file flvdec.c.

Referenced by flv_read_packet().

static int flv_read_close ( AVFormatContext s)
static

Definition at line 539 of file flvdec.c.

static int flv_read_header ( AVFormatContext s)
static

Definition at line 506 of file flvdec.c.

static int flv_read_metabody ( AVFormatContext s,
int64_t  next_pos 
)
static

Definition at line 469 of file flvdec.c.

Referenced by flv_read_packet().

static int flv_read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 645 of file flvdec.c.

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

Definition at line 869 of file flvdec.c.

static int flv_same_audio_codec ( AVCodecContext acodec,
int  flags 
)
static

Definition at line 82 of file flvdec.c.

Referenced by flv_read_packet().

static int flv_same_video_codec ( AVCodecContext vcodec,
int  flags 
)
static

Definition at line 177 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 132 of file flvdec.c.

Referenced by amf_parse_object(), and flv_read_packet().

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

Definition at line 204 of file flvdec.c.

Referenced by amf_parse_object(), and flv_read_packet().

static int parse_keyframes_index ( AVFormatContext s,
AVIOContext ioc,
AVStream vstream,
int64_t  max_pos 
)
static

Definition at line 251 of file flvdec.c.

Referenced by amf_parse_object().

Variable Documentation

const { ... }
class_name = "flvdec"

Definition at line 885 of file flvdec.c.

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,
}

Definition at line 891 of file flvdec.c.

item_name = av_default_item_name

Definition at line 886 of file flvdec.c.

option = options

Definition at line 887 of file flvdec.c.

const AVOption options[]
static
Initial value:
{
{ "flv_metadata", "Allocate streams according the onMetaData array", OFFSET(trust_metadata), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VD},
{ NULL }
}

Definition at line 879 of file flvdec.c.

Definition at line 888 of file flvdec.c.