61 if (
s->nb_streams != 1)
209 return (ret < 0) ? ret : 0;
276#define OFFSET(x) offsetof(WebMChunkContext, x)
286 .class_name =
"WebM Chunk Muxer",
293 .p.name =
"webm_chunk",
295 .p.mime_type =
"video/webm",
296 .p.extensions =
"chk",
#define AVIO_FLAG_WRITE
write-only
int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer)
Return the written size and a pointer to the buffer.
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
int avio_open_dyn_buf(AVIOContext **s)
Open a write only memory stream.
void ffio_free_dyn_buf(AVIOContext **s)
Free a dynamic buffer.
void av_bprint_init(AVBPrint *buf, unsigned size_init, unsigned size_max)
#define AV_BPRINT_SIZE_UNLIMITED
static void deinit(AVFormatContext *s)
void(* flush)(AVBSFContext *ctx)
int(* init)(AVBSFContext *ctx)
static int write_packet(Muxer *mux, OutputStream *ost, AVPacket *pkt)
static void write_header(FFV1Context *f)
#define AV_OPT_FLAG_ENCODING_PARAM
A generic parameter which can be set by the user for muxing or encoding.
@ AV_OPT_TYPE_INT
Underlying C type is int.
@ AV_OPT_TYPE_STRING
Underlying C type is a uint8_t* that is either NULL or points to a C string allocated with the av_mal...
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
void avformat_free_context(AVFormatContext *s)
Free an AVFormatContext and all its streams.
av_warn_unused_result int avformat_init_output(AVFormatContext *s, AVDictionary **options)
Allocate the stream private data and initialize the codec, but do not write the header.
av_warn_unused_result int avformat_write_header(AVFormatContext *s, AVDictionary **options)
Allocate the stream private data and write the stream header to an output media file.
int av_write_trailer(AVFormatContext *s)
Write the stream trailer to an output media file and free the file private data.
int av_write_frame(AVFormatContext *s, AVPacket *pkt)
Write a packet to an output media file.
int av_bprint_finalize(AVBPrint *buf, char **ret_str)
Finalize a print buffer.
void av_dict_free(AVDictionary **pm)
Free all the memory allocated for an AVDictionary struct and all keys and values.
int av_dict_copy(AVDictionary **dst, const AVDictionary *src, int flags)
Copy entries from one AVDictionary struct into another.
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
int av_dict_set_int(AVDictionary **pm, const char *key, int64_t value, int flags)
Convenience wrapper for av_dict_set() that converts the value to a string and stores it.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
const char * av_default_item_name(void *ptr)
Return the context name.
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq)
Rescale a 64-bit integer by 2 rational numbers.
#define AV_NOPTS_VALUE
Undefined timestamp value.
#define LIBAVUTIL_VERSION_INT
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Memory handling functions.
Describe the class of an AVClass context structure.
enum AVMediaType codec_type
General type of the encoded data.
int avoid_negative_ts
Avoid negative timestamps during muxing.
AVIOContext * pb
I/O context.
int flush_packets
Flush the I/O context after each packet.
AVDictionary * metadata
Metadata that applies to the whole file.
int flags
Flags modifying the (de)muxer behaviour.
int strict_std_compliance
Allow non-standard and experimental extension.
AVIOInterruptCB interrupt_callback
Custom interrupt callbacks for the I/O layer.
char * url
input or output URL.
AVStream ** streams
A list of all streams in the file.
int seekable
A combination of AVIO_SEEKABLE_ flags or 0 when the stream is not seekable.
This structure stores compressed data.
Rational number (pair of numerator and denominator).
AVCodecParameters * codecpar
Codec parameters associated with this stream.
int pts_wrap_bits
Number of bits in timestamps.
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented.
enum FFFormatContext::@117142222231113272376067204111240071266247245201 avoid_negative_ts_status
Whether the timestamp shift offset has already been determined.
int avoid_negative_ts_use_pts
int64_t lowest_ts_allowed
This is the lowest ts allowed in this track; it may be set by the muxer during init or write_header a...
uint64_t duration_written
static int write_trailer(AVFormatContext *s1)
static int chunk_start(AVFormatContext *s)
static void webm_chunk_deinit(AVFormatContext *s)
static int webm_chunk_write_trailer(AVFormatContext *s)
static const AVClass webm_chunk_class
static int webm_chunk_write_header(AVFormatContext *s)
static int get_chunk_filename(AVFormatContext *s, AVBPrint *filename)
static int webm_chunk_write_packet(AVFormatContext *s, AVPacket *pkt)
static int webm_chunk_init(AVFormatContext *s)
static int chunk_end(AVFormatContext *s, int flush)