123 "More than a single video stream present, "
124 "expect issues decoding it.\n");
246 #define OFFSET(x) offsetof(SegmentContext, x)
247 #define E AV_OPT_FLAG_ENCODING_PARAM
272 .priv_class = &seg_class,
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
AVIOInterruptCB interrupt_callback
Custom interrupt callbacks for the I/O layer.
int avformat_write_header(AVFormatContext *s, AVDictionary **options)
Allocate the stream private data and write the stream header to an output media file.
#define AV_LOG_WARNING
Something somehow does not look correct.
void av_opt_set_defaults(void *s)
Set the values of all AVOption fields to their default values.
int size
Set by a private option.
#define AVIO_FLAG_WRITE
write-only
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
static int seg_write_header(AVFormatContext *s)
void av_freep(void *arg)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc() and set the pointer ...
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
static int seg_write_trailer(struct AVFormatContext *s)
AVFormatContext * avformat_alloc_context(void)
Allocate an AVFormatContext.
char * format
Set by a private option.
struct AVOutputFormat * oformat
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
int avio_close(AVIOContext *s)
Close the resource accessed by the AVIOContext s and free it.
void av_log(void *avcl, int level, const char *fmt,...)
int flags
A combination of AV_PKT_FLAG values.
int av_compare_ts(int64_t ts_a, AVRational tb_a, int64_t ts_b, AVRational tb_b)
Compare 2 timestamps each in its own timebases.
AVCodecContext * codec
codec context
float time
Set by a private option.
unsigned int nb_streams
A list of all streams in the file.
int void avio_flush(AVIOContext *s)
char filename[1024]
input or output filename
AVOutputFormat * av_guess_format(const char *short_name, const char *filename, const char *mime_type)
Return the output format in the list of registered output formats which best matches the provided par...
int av_get_frame_filename(char *buf, int buf_size, const char *path, int number)
Return in 'buf' the path with 'd' replaced by a number.
static int seg_write_packet(AVFormatContext *s, AVPacket *pkt)
char * list
Set by a private option.
enum AVMediaType codec_type
#define AV_TIME_BASE_Q
Internal time base represented as fractional value.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
AVOutputFormat ff_segment_muxer
Describe the class of an AVClass context structure.
int avio_open2(AVIOContext **s, const char *url, int flags, const AVIOInterruptCB *int_cb, AVDictionary **options)
Create and initialize a AVIOContext for accessing the resource indicated by url.
void avformat_free_context(AVFormatContext *s)
Free an AVFormatContext and all its streams.
static const AVClass seg_class
void av_opt_free(void *obj)
Free all string and binary options in obj.
static int segment_start(AVFormatContext *s)
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
static int segment_end(AVFormatContext *oc)
void * priv_data
Format private data.
static const AVOption options[]
#define AVERROR_MUXER_NOT_FOUND
Muxer not found.
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented...
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
int avio_printf(AVIOContext *s, const char *fmt,...) av_printf_format(2