libavformat/flvenc.c File Reference
#include "libavutil/intreadwrite.h"
#include "libavutil/dict.h"
#include "libavutil/intfloat.h"
#include "libavutil/avassert.h"
#include "avc.h"
#include "avformat.h"
#include "flv.h"
#include "internal.h"
#include "metadata.h"
Include dependency graph for libavformat/flvenc.c:

Go to the source code of this file.

Data Structures

struct  FLVContext
 
struct  FLVStreamContext
 

Typedefs

typedef struct FLVContext FLVContext
 
typedef struct FLVStreamContext FLVStreamContext
 

Functions

static int get_audio_flags (AVFormatContext *s, AVCodecContext *enc)
 
static void put_amf_string (AVIOContext *pb, const char *str)
 
static void put_avc_eos_tag (AVIOContext *pb, unsigned ts)
 
static void put_amf_double (AVIOContext *pb, double d)
 
static void put_amf_bool (AVIOContext *pb, int b)
 
static int flv_write_header (AVFormatContext *s)
 
static int flv_write_trailer (AVFormatContext *s)
 
static int flv_write_packet (AVFormatContext *s, AVPacket *pkt)
 

Variables

static const AVCodecTag flv_video_codec_ids []
 
static const AVCodecTag flv_audio_codec_ids []
 
AVOutputFormat ff_flv_muxer
 

Typedef Documentation

typedef struct FLVContext FLVContext

Function Documentation

static int flv_write_header ( AVFormatContext s)
static

Definition at line 194 of file libavformat/flvenc.c.

static int flv_write_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 452 of file libavformat/flvenc.c.

static int flv_write_trailer ( AVFormatContext s)
static

Definition at line 419 of file libavformat/flvenc.c.

static int get_audio_flags ( AVFormatContext s,
AVCodecContext enc 
)
static

Definition at line 72 of file libavformat/flvenc.c.

Referenced by flv_write_header(), and flv_write_packet().

static void put_amf_bool ( AVIOContext pb,
int  b 
)
static

Definition at line 188 of file libavformat/flvenc.c.

Referenced by flv_write_header().

static void put_amf_double ( AVIOContext pb,
double  d 
)
static

Definition at line 182 of file libavformat/flvenc.c.

Referenced by flv_write_header(), and flv_write_trailer().

static void put_amf_string ( AVIOContext pb,
const char *  str 
)
static

Definition at line 162 of file libavformat/flvenc.c.

Referenced by flv_write_header(), and flv_write_packet().

static void put_avc_eos_tag ( AVIOContext pb,
unsigned  ts 
)
static

Definition at line 169 of file libavformat/flvenc.c.

Referenced by flv_write_trailer().

Variable Documentation

AVOutputFormat ff_flv_muxer
Initial value:
= {
.name = "flv",
.long_name = NULL_IF_CONFIG_SMALL("FLV (Flash Video)"),
.mime_type = "video/x-flv",
.extensions = "flv",
.priv_data_size = sizeof(FLVContext),
.video_codec = AV_CODEC_ID_FLV1,
.codec_tag = (const AVCodecTag* const []) {
},
}
static const AVCodecTag flv_audio_codec_ids[]
#define CONFIG_LIBMP3LAME
Definition: config.h:321
static int write_packet(AVFormatContext *s, AVPacket *pkt)
#define AVFMT_TS_NONSTRICT
Format does not require strictly increasing timestamps, but they must still be monotonic.
Definition: avformat.h:363
static const AVCodecTag flv_video_codec_ids[]
struct FLVContext FLVContext
static int write_trailer(AVFormatContext *s)
static int flv_write_trailer(AVFormatContext *s)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
preferred ID for decoding MPEG audio layer 1, 2 or 3
static int flv_write_packet(AVFormatContext *s, AVPacket *pkt)
#define AVFMT_GLOBALHEADER
Format wants global header.
Definition: avformat.h:351
static int flv_write_header(AVFormatContext *s)
#define AVFMT_VARIABLE_FPS
Format allows variable fps.
Definition: avformat.h:355
static void write_header(FFV1Context *f)
Definition: ffv1enc.c:470

Definition at line 587 of file libavformat/flvenc.c.

const AVCodecTag flv_audio_codec_ids[]
static
Initial value:
= {
{ AV_CODEC_ID_PCM_U8, FLV_CODECID_PCM >> FLV_AUDIO_CODECID_OFFSET },
{ AV_CODEC_ID_PCM_S16BE, FLV_CODECID_PCM >> FLV_AUDIO_CODECID_OFFSET },
{ AV_CODEC_ID_PCM_S16LE, FLV_CODECID_PCM_LE >> FLV_AUDIO_CODECID_OFFSET },
{ AV_CODEC_ID_ADPCM_SWF, FLV_CODECID_ADPCM >> FLV_AUDIO_CODECID_OFFSET },
{ AV_CODEC_ID_AAC, FLV_CODECID_AAC >> FLV_AUDIO_CODECID_OFFSET },
{ AV_CODEC_ID_NELLYMOSER, FLV_CODECID_NELLYMOSER >> FLV_AUDIO_CODECID_OFFSET },
{ AV_CODEC_ID_PCM_MULAW, FLV_CODECID_PCM_MULAW >> FLV_AUDIO_CODECID_OFFSET },
{ AV_CODEC_ID_PCM_ALAW, FLV_CODECID_PCM_ALAW >> FLV_AUDIO_CODECID_OFFSET },
{ AV_CODEC_ID_SPEEX, FLV_CODECID_SPEEX >> FLV_AUDIO_CODECID_OFFSET },
}
preferred ID for decoding MPEG audio layer 1, 2 or 3
#define FLV_AUDIO_CODECID_OFFSET

Definition at line 46 of file libavformat/flvenc.c.