23 #include "libavutil/intreadwrite.h"
24 #include "libavutil/avstring.h"
25 #include "libavutil/log.h"
29 #include "libavutil/opt.h"
68 "Could not get frame filename number %d from pattern '%s'\n",
72 for (i = 0; i < 3; i++) {
81 filename[strlen(filename) - 1] =
'U' + i;
111 }
else if (pkt->
size < 8 ||
130 #define OFFSET(x) offsetof(VideoMuxData, x)
131 #define ENC AV_OPT_FLAG_ENCODING_PARAM
133 {
"start_number",
"first number in the sequence",
OFFSET(img_number),
AV_OPT_TYPE_INT, { .i64 = 1 }, 1, INT_MAX,
ENC },
138 #if CONFIG_IMAGE2_MUXER
139 static const AVClass img2mux_class = {
149 .extensions =
"bmp,dpx,jpeg,jpg,ljpg,pam,pbm,pcx,pgm,pgmyuv,png,"
150 "ppm,sgi,tga,tif,tiff,jp2,xwd,sun,ras,rs,im1,im8,im24,"
151 "sunras,webp,xbm,j2c,pix",
157 .priv_class = &img2mux_class,
160 #if CONFIG_IMAGE2PIPE_MUXER
162 .
name =
"image2pipe",
AVIOInterruptCB interrupt_callback
Custom interrupt callbacks for the I/O layer.
AVCodecContext * codec
Codec context associated with this stream.
void av_log(void *avcl, int level, const char *fmt,...) av_printf_format(3
Send the specified message to the log if the level is less than or equal to the current av_log_level...
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
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 const AVOption muxoptions[]
static int write_header(AVFormatContext *s)
static av_always_inline void ffio_wfourcc(AVIOContext *pb, const uint8_t *s)
static int write_packet(AVFormatContext *s, AVPacket *pkt)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
void * priv_data
Format private data.
char filename[1024]
input or output filename
#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 width
picture width / height.
AVStream ** streams
A list of all streams in the file.
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.
main external API structure.
AVIOContext * pb
I/O context.
Describe the class of an AVClass context structure.
#define MKTAG(a, b, c, d)
enum AVCodecID ff_guess_image2_codec(const char *filename)
struct AVOutputFormat * oformat
The output container format.
av_default_item_name
Return the context name.
This structure stores compressed data.