101 av_log(enc,
AV_LOG_ERROR,
"flv does not support that sample rate, choose from (44100, 22050, 11025).\n");
148 size_t len = strlen(str);
157 avio_w8(pb, (ts >> 24) & 0x7F);
181 int i, metadata_count = 0;
182 double framerate = 0.0;
183 int64_t metadata_size_pos, data_size, metadata_count_pos;
249 metadata_count = 5*!!video_enc + 5*!!audio_enc + 2;
305 data_size=
avio_tell(pb) - metadata_size_pos - 10;
307 avio_seek(pb, metadata_count_pos, SEEK_SET);
310 avio_seek(pb, metadata_size_pos, SEEK_SET);
337 avio_seek(pb, -data_size - 10, SEEK_CUR);
386 int flags, flags_size;
437 "8 frames per packet. Adobe Flash "
438 "Player cannot handle this!\n");
475 .mime_type =
"video/x-flv",
void avio_wb64(AVIOContext *s, uint64_t val)
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
int64_t delay
first dts delay (needed for AVC & Speex)
#define AV_LOG_WARNING
Something somehow does not look correct.
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
static av_always_inline uint64_t av_double2int(double f)
Reinterpret a double as a 64-bit integer.
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
AVDictionaryEntry * av_dict_get(AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
Get a dictionary entry with matching key.
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented...
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
static double av_q2d(AVRational a)
Convert rational to double.
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
int bits_per_coded_sample
bits per sample/pixel from the demuxer (needed for huffyuv).
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
int duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
void av_free(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc(). ...
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
void av_log(void *avcl, int level, const char *fmt,...)
int ff_avc_parse_nal_units_buf(const uint8_t *buf_in, uint8_t **buf, int *size)
int flags
A combination of AV_PKT_FLAG values.
AVCodecContext * codec
codec context
unsigned int nb_streams
A list of all streams in the file.
int bit_rate
the average bitrate
int void avio_flush(AVIOContext *s)
#define AV_TIME_BASE
Internal time base represented as integer.
void avio_wb24(AVIOContext *s, unsigned int val)
static av_always_inline int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
enum AVMediaType codec_type
int sample_rate
samples per second
void avio_w8(AVIOContext *s, int b)
main external API structure.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
unsigned int codec_tag
fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
int error
contains the error code or 0 if no error happened
void avio_wb16(AVIOContext *s, unsigned int val)
int channels
number of audio channels
void * priv_data
Format private data.
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed...
void avio_wb32(AVIOContext *s, unsigned int val)
int64_t duration
Decoding: duration of the stream, in AV_TIME_BASE fractional seconds.
#define AV_DICT_IGNORE_SUFFIX
AVRational r_frame_rate
Real base framerate of the stream.
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
int64_t last_ts
last timestamp for each stream
int ff_isom_write_avcc(AVIOContext *pb, const uint8_t *data, int len)
#define AV_NOPTS_VALUE
Undefined timestamp value.
preferred ID for decoding MPEG audio layer 1, 2 or 3