62 snprintf(out->
tmp,
sizeof(out->
tmp),
"%s.tmp", filename);
92 "Could not get frame filename number %d from pattern '%s'\n",
96 for (i = 0; i < 3; i++) {
102 filename[strlen(filename) - 1] =
'U' + i;
132 }
else if (pkt->
size < 8 ||
151 #define OFFSET(x) offsetof(VideoMuxData, x) 152 #define ENC AV_OPT_FLAG_ENCODING_PARAM 154 {
"start_number",
"first number in the sequence",
OFFSET(img_number),
AV_OPT_TYPE_INT, { .i64 = 1 }, 1, INT_MAX,
ENC },
155 {
"update",
"continuously overwrite one file",
OFFSET(update),
AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, ENC },
159 #if CONFIG_IMAGE2_MUXER 160 static const AVClass img2mux_class = {
170 .extensions =
"bmp,dpx,jpeg,jpg,ljpg,pam,pbm,pcx,pgm,pgmyuv,png," 171 "ppm,sgi,tga,tif,tiff,jp2,xwd,sun,ras,rs,im1,im8,im24," 172 "sunras,webp,xbm,j2c,pix",
178 .priv_class = &img2mux_class,
181 #if CONFIG_IMAGE2PIPE_MUXER 183 .
name =
"image2pipe",
int(* io_open)(struct AVFormatContext *s, AVIOContext **pb, const char *url, int flags, AVDictionary **options)
A callback for opening new IO streams.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
av_log(ac->avr, AV_LOG_TRACE, "%d samples - audio_convert: %s to %s (%s)\, len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt), use_generic ? ac->func_descr_generic :ac->func_descr)
#define AVIO_FLAG_WRITE
write-only
This struct describes the properties of an encoded stream.
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 open_temporary(AVFormatContext *s, RenameIO *out, const char *filename)
AVStream ** streams
A list of all streams in the file.
static const AVOption muxoptions[]
static int write_header(AVFormatContext *s)
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
static av_always_inline void ffio_wfourcc(AVIOContext *pb, const uint8_t *s)
struct AVOutputFormat * oformat
The output container format.
static int write_packet(AVFormatContext *s, AVPacket *pkt)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
size_t av_strlcpy(char *dst, const char *src, size_t size)
Copy the string src to dst, but no more than size - 1 bytes, and null-terminate dst.
int extradata_size
Size of the extradata content in bytes.
int void avio_flush(AVIOContext *s)
char filename[1024]
input or output filename
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 void close_and_rename(AVFormatContext *s, RenameIO *out)
AVIOContext * pb
I/O context.
Describe the class of an AVClass context structure.
enum AVCodecID ff_guess_image2_codec(const char *filename)
void * priv_data
Format private data.
uint8_t * extradata
Extra binary data needed for initializing the decoder, codec-dependent.
void avio_wb32(AVIOContext *s, unsigned int val)
AVCodecParameters * codecpar
#define MKTAG(a, b, c, d)
This structure stores compressed data.