30#define PDV_MAGIC "Playdate VID\x00\x00\x00\x00"
31#define PDV_MAX_FRAMES UINT16_MAX
32#define PDV_MAX_OFFSET ((1U << 30) - 1)
56 if (!rate.
num || !rate.
den)
58 if (!rate.
num || !rate.
den) {
96 "The -max_frames option must be set to a value in [1, %u].\n",
127 const uint32_t max_table_gap = 4U * pdv->
max_frames;
163 if (payload_size < 0)
166 if (payload_size < 0 || payload_size >
PDV_MAX_OFFSET - table_gap)
178 const uint32_t frame_off = (pdv->
entries[
i] >> 2) + table_gap;
191#define OFFSET(x) offsetof(PDVMuxContext, x)
192#define ENC AV_OPT_FLAG_ENCODING_PARAM
194 {
"max_frames",
"maximum number of frames reserved in table (mandatory)",
200 .class_name =
"PDV muxer",
210 .p.extensions =
"pdv",
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
#define AVIO_SEEKABLE_NORMAL
Seeking works like for a local file.
void avio_wl32(AVIOContext *s, unsigned int val)
void avio_wl16(AVIOContext *s, unsigned int val)
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
void ffio_fill(AVIOContext *s, int b, int64_t count)
#define i(width, name, range_min, range_max)
@ AV_OPT_TYPE_INT
Underlying C type is int.
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
const char * av_default_item_name(void *ptr)
Return the context name.
static int av_cmp_q(AVRational a, AVRational b)
Compare two rationals.
static av_always_inline AVRational av_inv_q(AVRational q)
Invert a rational.
uint32_t av_q2intfloat(AVRational q)
Convert an AVRational to a IEEE 32-bit float expressed in fixed-point format.
#define LIBAVUTIL_VERSION_INT
static int zero(InterplayACMContext *s, unsigned ind, unsigned col)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
@ AV_CLASS_CATEGORY_MUXER
Memory handling functions.
#define FF_OFMT_FLAG_MAX_ONE_OF_EACH
If this flag is set, it indicates that for each codec type whose corresponding default codec (i....
#define FF_OFMT_FLAG_ONLY_DEFAULT_CODECS
If this flag is set, then the only permitted audio/video/subtitle codec ids are AVOutputFormat....
Utilities for rational number calculation.
Describe the class of an AVClass context structure.
int height
The height of the video frame in pixels.
int width
The width of the video frame in pixels.
This structure stores compressed data.
Rational number (pair of numerator and denominator).
AVCodecParameters * codecpar
Codec parameters associated with this stream.
AVRational avg_frame_rate
Average framerate.
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented.
#define av_malloc_array(a, b)