107 av_log(s,
AV_LOG_WARNING,
"Stream codec is not found. Codec private options are not stored.\n");
114 if (buf && strlen(buf)) {
131 int ret, need_coma = 0;
133 #define SKIP_DEFAULTS AV_OPT_SERIALIZE_SKIP_DEFAULTS
134 #define OPT_FLAGS_EXACT AV_OPT_SERIALIZE_OPT_FLAGS_EXACT
135 #define ENC AV_OPT_FLAG_ENCODING_PARAM
141 if (buf && strlen(buf)) {
148 if (buf && strlen(buf)) {
163 #undef OPT_FLAGS_EXACT
168 const char *configuration)
228 int bit_rate, i,
ret;
341 if (pkt->
pts != pkt->
dts) {
void avio_wb64(AVIOContext *s, uint64_t val)
const struct AVCodec * codec
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.
#define AV_LOG_WARNING
Something somehow does not look correct.
int av_parse_time(int64_t *timeval, const char *timestr, int duration)
Parse timestr and return in *time a corresponding number of microseconds.
#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.
#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
#define CODEC_FLAG_GLOBAL_HEADER
Place global headers in extradata instead of every keyframe.
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
AVStream ** streams
A list of all streams in the file.
AVDictionaryEntry * av_dict_get(const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
Get a dictionary entry with matching key.
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)
int duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
#define AV_OPT_FLAG_ENCODING_PARAM
a generic parameter which can be set by the user for muxing or encoding
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
static int ffm_write_packet(AVFormatContext *s, AVPacket *pkt)
AVDictionary * metadata
Metadata that applies to the whole file.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static int ffm_write_header_codec_ctx(AVIOContext *pb, AVCodecContext *ctx, unsigned tag, int type)
#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. ...
simple assert() macros that are a bit more flexible than ISO C assert().
static int ffm_write_recommended_config(AVIOContext *pb, AVCodecContext *ctx, unsigned tag, const char *configuration)
int flags
A combination of AV_PKT_FLAG values.
AVCodecContext * codec
Codec context associated with this stream.
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 bit_rate
the average bitrate
int void avio_flush(AVIOContext *s)
Force flushing of buffered data.
#define av_assert1(cond)
assert() equivalent, that does not lie in speed critical code.
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.
enum AVMediaType codec_type
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.
uint8_t packet[FFM_PACKET_SIZE]
#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)
#define AV_OPT_SERIALIZE_SKIP_DEFAULTS
Serialize options that are not set to default values only.
void * priv_data
Format private data.
static void write_header(FFV1Context *f)
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.
static int ffm_write_header_codec_private_ctx(AVFormatContext *s, AVCodecContext *ctx, int type)
#define MKTAG(a, b, c, d)
This structure stores compressed data.
static int write_packet(AVFormatContext *s1, AVPacket *pkt)
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...