Go to the documentation of this file.
27 #define MAX_STREAMS 4096
52 if (memcmp(p->
buf,
"LIMITLESS", 9))
54 if (memcmp(p->
buf + 9,
"HEAD", 4))
63 unsigned st_count,
mode;
84 for (
int i = 0;
i < st_count;
i++) {
142 if ((int64_t)bpp * st_count * (int64_t)
sample_rate >= INT32_MAX ||
143 (int64_t)bpp * st_count * (int64_t)
sample_rate == 0
150 for (
int st = 0; st < st_count; st++) {
178 const int bpp =
s->bpp;
190 int cur_st = 0, st_count = 0, st_index = 0;
195 for (
int i = 0;
i <
s->header_len;
i++) {
196 uint8_t
val =
s->header[
i];
198 for (
int j = 0; j < 8 && cur_st <
ctx->
nb_streams; j++, cur_st++) {
211 s->index =
s->stored_index = 0;
212 s->nb_stored = st_count;
221 stp = &
s->p[
s->index];
226 stp = &
s->p[
s->index];
237 pkt->
data[n] =
s->data[n *
s->nb_stored +
s->stored_index];
271 int64_t timestamp,
int flags)
275 s->stored_index =
s->index =
s->nb_stored = 0;
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
enum AVMediaType codec_type
General type of the encoded data.
This struct describes the properties of an encoded stream.
AVStream * avformat_new_stream(AVFormatContext *s, const struct AVCodec *c)
Add a new stream to a media file.
#define AVERROR_EOF
End of file.
static int laf_read_header(AVFormatContext *ctx)
static int laf_read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
AVStream ** streams
A list of all streams in the file.
uint8_t header[(MAX_STREAMS+7)/8]
int nb_channels
Number of channels in this layout.
trying all byte sequences megabyte in length and selecting the best looking sequence will yield cases to try But a word about quality
static av_always_inline float av_int2float(uint32_t i)
Reinterpret a 32-bit integer as a float.
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
static av_cold int read_close(AVFormatContext *ctx)
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
static double val(void *priv, double ch)
int64_t duration
Decoding: duration of the stream, in stream time base.
unsigned int avio_rb32(AVIOContext *s)
#define AV_CH_LOW_FREQUENCY
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
const AVInputFormat ff_laf_demuxer
StreamParams p[MAX_STREAMS]
AVCodecParameters * codecpar
Codec parameters associated with this stream.
static int read_header(FFV1Context *f)
AVIOContext * pb
I/O context.
This structure contains the data a format has to probe a file.
#define AV_CH_FRONT_CENTER
AVChannelLayout ch_layout
Audio only.
int sample_rate
Audio only.
unsigned int nb_streams
Number of elements in AVFormatContext.streams.
unsigned int avio_rl32(AVIOContext *s)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
An AVChannelLayout holds information about the channel layout of audio data.
#define MKBETAG(a, b, c, d)
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_RL24
int avio_r8(AVIOContext *s)
#define i(width, name, range_min, range_max)
void * av_calloc(size_t nmemb, size_t size)
static int laf_read_packet(AVFormatContext *ctx, AVPacket *pkt)
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 again
static int laf_probe(const AVProbeData *p)
static int laf_read_close(AVFormatContext *ctx)
int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
#define AV_CH_FRONT_RIGHT
static int read_probe(const AVProbeData *p)
#define AV_CHANNEL_LAYOUT_MONO
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
This structure stores compressed data.
int64_t pos
byte position in stream, -1 if unknown
uint64_t avio_rl64(AVIOContext *s)
#define AV_CHANNEL_LAYOUT_MASK(nb, m)
Macro to define native channel layouts.
#define flags(name, subs,...)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
int ffio_read_size(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
void * priv_data
Format private data.
int avio_feof(AVIOContext *s)
Similar to feof() but also returns nonzero on read errors.