libavformat/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"
Include dependency graph for libavformat/flvdec.c:

Go to the source code of this file.

Data Structures

struct  FLVContext
 

Macros

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

Definition at line 907 of file libavformat/flvdec.c.

#define VALIDATE_INDEX_TS_THRESH   2500

Definition at line 40 of file libavformat/flvdec.c.

Referenced by flv_read_packet().

Definition at line 908 of file libavformat/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 331 of file libavformat/flvdec.c.

Referenced by flv_read_metabody().

static void clear_index_entries ( AVFormatContext s,
int64_t  pos 
)
static

Definition at line 576 of file libavformat/flvdec.c.

Referenced by flv_read_packet().

static AVStream* create_stream ( AVFormatContext s,
int  codec_type 
)
static
static int flv_data_packet ( AVFormatContext s,
AVPacket pkt,
int64_t  dts,
int64_t  next 
)
static

Definition at line 593 of file libavformat/flvdec.c.

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

Definition at line 553 of file libavformat/flvdec.c.

Referenced by flv_read_packet().

static int flv_probe ( AVProbeData p)
static

Definition at line 59 of file libavformat/flvdec.c.

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

Definition at line 564 of file libavformat/flvdec.c.

Referenced by flv_read_packet().

static int flv_read_close ( AVFormatContext s)
static

Definition at line 544 of file libavformat/flvdec.c.

static int flv_read_header ( AVFormatContext s)
static

Definition at line 509 of file libavformat/flvdec.c.

static int flv_read_metabody ( AVFormatContext s,
int64_t  next_pos 
)
static

Definition at line 472 of file libavformat/flvdec.c.

Referenced by flv_read_packet().

static int flv_read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 651 of file libavformat/flvdec.c.

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

Definition at line 899 of file libavformat/flvdec.c.

static int flv_same_audio_codec ( AVCodecContext acodec,
int  flags 
)
static

Definition at line 84 of file libavformat/flvdec.c.

Referenced by flv_read_packet().

static int flv_same_video_codec ( AVCodecContext vcodec,
int  flags 
)
static

Definition at line 177 of file libavformat/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 libavformat/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 202 of file libavformat/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 253 of file libavformat/flvdec.c.

Referenced by amf_parse_object().

Variable Documentation

const { ... }
class_name = "flvdec"
private

Definition at line 915 of file libavformat/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,
}
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)
static int flv_read_seek(AVFormatContext *s, int stream_index, int64_t ts, int flags)
static av_cold int read_close(AVFormatContext *ctx)
Definition: libcdio.c:145
struct FLVContext FLVContext
static int flv_read_close(AVFormatContext *s)
static int flv_read_header(AVFormatContext *s)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static int read_probe(AVProbeData *pd)
static int flv_probe(AVProbeData *p)
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:517
static int read_packet(AVFormatContext *ctx, AVPacket *pkt)
Definition: libcdio.c:114

Definition at line 921 of file libavformat/flvdec.c.

item_name = av_default_item_name
private

Definition at line 916 of file libavformat/flvdec.c.

option = options
private

Definition at line 917 of file libavformat/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 }
}
#define OFFSET(x)
#define VD
NULL
Definition: eval.c:55

Definition at line 909 of file libavformat/flvdec.c.

version = LIBAVUTIL_VERSION_INT
private

Definition at line 918 of file libavformat/flvdec.c.