Go to the documentation of this file.
39 return x == 0x1B || x == 0x0A || x == 0x0D || (x >= 0x20 && x < 0x7f);
59 return (cnt * 100LL / p->
buf_size) * (cnt > 400) *
77 #define GET_EFI_META(name,size) \
79 if (len < 1 || len > size) \
81 if (avio_read(pb, buf, size) == size) { \
83 av_dict_set(&avctx->metadata, name, buf, 0); \
117 st->
duration = (
s->fsize +
s->chars_per_frame - 1) /
s->chars_per_frame;
137 n =
s->chars_per_frame;
143 if (p +
s->chars_per_frame >
s->fsize)
154 #define OFFSET(x) offsetof(TtyDemuxContext, x)
155 #define DEC AV_OPT_FLAG_DECODING_PARAM
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
enum AVMediaType codec_type
General type of the encoded data.
#define AVERROR_EOF
End of file.
@ AV_OPT_TYPE_VIDEO_RATE
offset must point to AVRational
uint64_t fsize
file size less metadata buffer
AVRational avg_frame_rate
Average framerate.
uint32_t codec_tag
Additional information about the codec (corresponds to the AVI FOURCC).
int buf_size
Size of buf except extra allocated bytes.
int64_t avio_size(AVIOContext *s)
Get the filesize.
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
AVRational framerate
Set by a private option.
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
int64_t duration
Decoding: duration of the stream, in stream time base.
static int read_packet(AVFormatContext *avctx, AVPacket *pkt)
int height
Set by a private option.
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
static double av_q2d(AVRational a)
Convert an AVRational to a double.
int av_match_ext(const char *filename, const char *extensions)
Return a positive value if the given filename has one of the given extensions, 0 otherwise.
AVCodecParameters * codecpar
Codec parameters associated with this stream.
#define LIBAVUTIL_VERSION_INT
Describe the class of an AVClass context structure.
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented.
static int efi_read(AVFormatContext *avctx, uint64_t start_pos)
Parse EFI header.
Rational number (pair of numerator and denominator).
@ AV_OPT_TYPE_IMAGE_SIZE
offset must point to two consecutive integers
const char * av_default_item_name(void *ptr)
Return the context name.
static const AVOption options[]
AVIOContext * pb
I/O context.
This structure contains the data a format has to probe a file.
AVInputFormat ff_tty_demuxer
#define GET_EFI_META(name, size)
static const char tty_extensions[31]
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
int seekable
A combination of AVIO_SEEKABLE_ flags or 0 when the stream is not seekable.
static int read_probe(const AVProbeData *p)
int ff_sauce_read(AVFormatContext *avctx, uint64_t *fsize, int *got_width, int get_height)
int avio_r8(AVIOContext *s)
int flags
A combination of AV_PKT_FLAG values.
#define i(width, name, range_min, range_max)
static const AVClass tty_demuxer_class
#define AV_OPT_FLAG_DECODING_PARAM
a generic parameter which can be set by the user for demuxing or decoding
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
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 read_header(AVFormatContext *avctx)
#define AVIO_SEEKABLE_NORMAL
Seeking works like for a local file.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
This structure stores compressed data.
static int isansicode(int x)
void * priv_data
Format private data.
int avio_feof(AVIOContext *s)
Similar to feof() but also returns nonzero on read errors.