102 int ret, need_coma = 0;
105 #define SKIP_DEFAULTS AV_OPT_SERIALIZE_SKIP_DEFAULTS
106 #define OPT_FLAGS_EXACT AV_OPT_SERIALIZE_OPT_FLAGS_EXACT
107 #define ENC AV_OPT_FLAG_ENCODING_PARAM
123 if (buf && strlen(buf)) {
130 if (buf && strlen(buf)) {
147 #undef OPT_FLAGS_EXACT
152 const char *configuration)
211 int bit_rate, i, ret;
329 if (pkt->
pts != pkt->
dts) {
static void write_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost, int unqueue)
void avio_wb64(AVIOContext *s, uint64_t val)
char * recommended_encoder_configuration
String containing paris of key and values describing recommended encoder configuration.
AVCodec * avcodec_find_encoder(enum AVCodecID id)
Find a registered encoder with a matching codec ID.
int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer)
Return the written size and a pointer to the buffer.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
#define AV_OPT_FLAG_AUDIO_PARAM
int av_dict_get_string(const AVDictionary *m, char **buffer, const char key_val_sep, const char pairs_sep)
Get dictionary entries as a string.
int av_opt_serialize(void *obj, int opt_flags, int flags, char **buffer, const char key_val_sep, const char pairs_sep)
Serialize object's options.
int avio_open_dyn_buf(AVIOContext **s)
Open a write only memory stream.
This struct describes the properties of an encoded stream.
#define av_assert0(cond)
assert() equivalent, that is always enabled.
static void write_header_chunk(AVIOContext *pb, AVIOContext *dpb, unsigned id)
void avio_wl32(AVIOContext *s, unsigned int val)
static void ffm_write_data(AVFormatContext *s, const uint8_t *buf, int size, int64_t dts, int header)
#define FRAME_HEADER_SIZE
int64_t duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
AVStream ** streams
A list of all streams in the file.
int avcodec_parameters_to_context(AVCodecContext *codec, const AVCodecParameters *par)
Fill the codec context based on the values from the supplied codec parameters.
AVDictionaryEntry * av_dict_get(const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
Get a dictionary entry with matching key.
int flags
Flags modifying the (de)muxer behaviour.
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
static const uint8_t header[24]
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
int64_t bit_rate
The average bitrate of the encoded data (in bits per second).
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
static int ffm_write_packet(AVFormatContext *s, AVPacket *pkt)
static int ffm_write_header_codec_ctx(AVIOContext *pb, AVCodecParameters *ctxpar, unsigned tag, int type)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
void av_dict_free(AVDictionary **pm)
Free all the memory allocated for an AVDictionary struct and all keys and values. ...
enum AVMediaType codec_type
General type of the encoded data.
simple assert() macros that are a bit more flexible than ISO C assert().
int flags
A combination of AV_PKT_FLAG values.
int extradata_size
Size of the extradata content in bytes.
static int ffm_write_trailer(AVFormatContext *s)
const AVOption * av_opt_find(void *obj, const char *name, const char *unit, int opt_flags, int search_flags)
Look for an option in an object.
unsigned int nb_streams
Number of elements in AVFormatContext.streams.
static void flush_packet(AVFormatContext *s)
int void avio_flush(AVIOContext *s)
Force flushing of buffered data.
#define AV_CODEC_FLAG_BITEXACT
Use only bitexact stuff (except (I)DCT).
#define av_assert1(cond)
assert() equivalent, that does not lie in speed critical code.
AVCodecContext * avcodec_alloc_context3(const AVCodec *codec)
Allocate an AVCodecContext and set its fields to default values.
static int ffm_write_header(AVFormatContext *s)
static int write_trailer(AVFormatContext *s1)
void ffio_free_dyn_buf(AVIOContext **s)
Free a dynamic buffer.
int avio_put_str(AVIOContext *s, const char *str)
Write a NULL-terminated string.
int av_dict_parse_string(AVDictionary **pm, const char *str, const char *key_val_sep, const char *pairs_sep, int flags)
Parse the key/value pairs list and add the parsed entries to a dictionary.
void avcodec_free_context(AVCodecContext **avctx)
Free the codec context and everything associated with it and write NULL to the provided pointer...
AVIOContext * pb
I/O context.
void avio_w8(AVIOContext *s, int b)
#define AV_OPT_FLAG_VIDEO_PARAM
main external API structure.
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
AVOutputFormat ff_ffm_muxer
void avio_wb16(AVIOContext *s, unsigned int val)
const AVClass * priv_class
AVClass for the private context.
#define AV_CODEC_FLAG_GLOBAL_HEADER
Place global headers in extradata instead of every keyframe.
uint8_t packet[FFM_PACKET_SIZE]
static int ffm_write_recommended_config(AVIOContext *pb, AVCodecParameters *codecpar, unsigned tag, const char *configuration)
#define AV_OPT_SEARCH_FAKE_OBJ
The obj passed to av_opt_find() is fake – only a double pointer to AVClass instead of a required poin...
#define MKBETAG(a, b, c, d)
void * priv_data
Format private data.
static void write_header(FFV1Context *f)
uint8_t * extradata
Extra binary data needed for initializing the decoder, codec-dependent.
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)
#define AV_DICT_IGNORE_SUFFIX
Return first entry in a dictionary whose first part corresponds to the search key, ignoring the suffix of the found key string.
AVCodecParameters * codecpar
#define MKTAG(a, b, c, d)
This structure stores compressed data.
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...