FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions | Variables
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"

Go to the source code of this file.

Data Structures

struct  FLVContext
 
struct  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 void write_metadata (AVFormatContext *s, unsigned int ts)
 
static int unsupported_codec (AVFormatContext *s, const char *type, int codec_id)
 
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
 

Function Documentation

static int get_audio_flags ( AVFormatContext s,
AVCodecContext enc 
)
static

Definition at line 77 of file flvenc.c.

Referenced by flv_write_header(), and flv_write_packet().

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

Definition at line 167 of file flvenc.c.

Referenced by flv_write_packet(), and write_metadata().

static void put_avc_eos_tag ( AVIOContext pb,
unsigned  ts 
)
static

Definition at line 174 of file flvenc.c.

Referenced by flv_write_trailer().

static void put_amf_double ( AVIOContext pb,
double  d 
)
static

Definition at line 187 of file flvenc.c.

Referenced by flv_write_trailer(), and write_metadata().

static void put_amf_bool ( AVIOContext pb,
int  b 
)
static

Definition at line 193 of file flvenc.c.

Referenced by write_metadata().

static void write_metadata ( AVFormatContext s,
unsigned int  ts 
)
static

Definition at line 199 of file flvenc.c.

Referenced by flv_write_header(), and flv_write_packet().

static int unsupported_codec ( AVFormatContext s,
const char *  type,
int  codec_id 
)
static

Definition at line 328 of file flvenc.c.

Referenced by flv_write_header().

static int flv_write_header ( AVFormatContext s)
static

Definition at line 339 of file flvenc.c.

static int flv_write_trailer ( AVFormatContext s)
static

Definition at line 473 of file flvenc.c.

static int flv_write_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 506 of file flvenc.c.

Variable Documentation

const AVCodecTag flv_video_codec_ids[]
static
const AVCodecTag flv_audio_codec_ids[]
static
Initial value:
= {
}
preferred ID for decoding MPEG audio layer 1, 2 or 3
Definition: avcodec.h:421
#define FLV_AUDIO_CODECID_OFFSET
Definition: flv.h:34

Definition at line 46 of file flvenc.c.

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),
.audio_codec = CONFIG_LIBMP3LAME ? AV_CODEC_ID_MP3 : AV_CODEC_ID_ADPCM_SWF,
.video_codec = AV_CODEC_ID_FLV1,
.codec_tag = (const AVCodecTag* const []) {
},
}
static const AVCodecTag flv_audio_codec_ids[]
Definition: flvenc.c:46
#define AVFMT_TS_NONSTRICT
Format does not require strictly increasing timestamps, but they must still be monotonic.
Definition: avformat.h:483
static const AVCodecTag flv_video_codec_ids[]
Definition: flvenc.c:33
static int flv_write_trailer(AVFormatContext *s)
Definition: flvenc.c:473
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:175
preferred ID for decoding MPEG audio layer 1, 2 or 3
Definition: avcodec.h:421
static int flv_write_packet(AVFormatContext *s, AVPacket *pkt)
Definition: flvenc.c:506
static int write_trailer(AVFormatContext *s1)
Definition: v4l2enc.c:94
#define AVFMT_GLOBALHEADER
Format wants global header.
Definition: avformat.h:471
static int flv_write_header(AVFormatContext *s)
Definition: flvenc.c:339
#define AVFMT_VARIABLE_FPS
Format allows variable fps.
Definition: avformat.h:475
static void write_header(FFV1Context *f)
Definition: ffv1enc.c:493
static int write_packet(AVFormatContext *s1, AVPacket *pkt)
Definition: v4l2enc.c:86

Definition at line 658 of file flvenc.c.