64 *width_ptr =
sizes[i][0];
65 *height_ptr =
sizes[i][1];
75 const char *
path,
int max_start)
78 int range, last_index, range1, first_index;
81 for (first_index = 0; first_index < max_start; first_index++) {
96 last_index = first_index;
105 last_index + range1) < 0)
111 if (range >= (1 << 30))
119 *pfirst_index = first_index;
120 *plast_index = last_index;
141 int first_index, last_index, ret = 0;
163 "Could not parse video size: %s.\n", s->
video_size);
168 "Could not parse framerate: %s.\n", s->
framerate);
200 st->
duration = last_index - first_index + 1;
225 int size[3] = { 0 }, ret[3] = { 0 };
240 for (i = 0; i < 3; i++) {
252 filename[strlen(filename) - 1] =
'U' + i;
259 if (f[0]->eof_reached)
271 for (i = 0; i < 3; i++) {
281 if (ret[0] <= 0 || ret[1] < 0 || ret[2] < 0) {
291 #define OFFSET(x) offsetof(VideoDemuxData, x) 292 #define DEC AV_OPT_FLAG_DECODING_PARAM 302 #if CONFIG_IMAGE2_DEMUXER 303 static const AVClass img2_class = {
317 .priv_class = &img2_class,
320 #if CONFIG_IMAGE2PIPE_DEMUXER 321 static const AVClass img2pipe_class = {
328 .
name =
"image2pipe",
333 .priv_class = &img2pipe_class,
int(* io_open)(struct AVFormatContext *s, AVIOContext **pb, const char *url, int flags, AVDictionary **options)
A callback for opening new IO streams.
int64_t avio_size(AVIOContext *s)
Get the filesize.
int av_parse_video_rate(AVRational *rate, const char *arg)
Parse str and store the detected values in *rate.
int av_parse_video_size(int *width_ptr, int *height_ptr, const char *str)
Parse str and put in width_ptr and height_ptr the detected values.
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_READ
read-only
#define FF_ARRAY_ELEMS(a)
int ctx_flags
Flags signalling stream properties.
This struct describes the properties of an encoded stream.
char * pixel_format
Set by a private option.
int avio_check(const char *url, int flags)
Return AVIO_FLAG_* access flags corresponding to the access permissions of the resource in url...
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
enum AVStreamParseType need_parsing
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
static int img_read_header(AVFormatContext *s1)
AVStream ** streams
A list of all streams in the file.
static int img_read_probe(AVProbeData *p)
#define AVERROR_EOF
End of file.
static const AVOption options[]
enum AVCodecID video_codec_id
Forced video codec_id.
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
char * framerate
Set by a private option.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static const int sizes[][2]
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
enum AVMediaType codec_type
General type of the encoded data.
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 flags
A combination of AV_PKT_FLAG values.
char filename[1024]
input or output filename
enum AVCodecID audio_codec_id
Forced audio codec_id.
char * video_size
Set by a private option.
enum AVPixelFormat pix_fmt
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 read_header(FFV1Context *f)
AVIOContext * pb
I/O context.
static int find_image_range(int *pfirst_index, int *plast_index, const char *path, int max_start)
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
int av_filename_number_test(const char *filename)
Check whether filename actually is a numbered sequence generator.
static int read_packet(AVFormatContext *ctx, AVPacket *pkt)
Describe the class of an AVClass context structure.
rational number numerator/denominator
static int infer_size(int *width_ptr, int *height_ptr, int size)
This structure contains the data a format has to probe a file.
int64_t duration
Decoding: duration of the stream, in stream time base.
int64_t start_time
Decoding: pts of the first frame of the stream, in stream time base.
static int img_read_packet(AVFormatContext *s1, AVPacket *pkt)
struct AVInputFormat * iformat
The input container format.
enum AVCodecID ff_guess_image2_codec(const char *filename)
void * priv_data
Format private data.
AVCodecParameters * codecpar
enum AVPixelFormat av_get_pix_fmt(const char *name)
Return the pixel format corresponding to name.
AVPixelFormat
Pixel format.
This structure stores compressed data.