Go to the documentation of this file.
77 #define HUFFMAN_TABLE_SIZE (64 * 1024)
118 if ((
w == 0) || (
w > 1024))
123 if ((
h == 0) || (
h > 1024))
128 if (
sample_rate && (sample_rate < 8000 || sample_rate > 48000))
168 if (
s->pb->eof_reached) {
176 if (sample_rate < 14 || sample_rate > INT_MAX) {
180 if (bytes_per_sample < 1 || bytes_per_sample > 2) {
228 if (bytes_per_sample == 1)
256 unsigned int chunk_size;
261 unsigned char r,
g,
b;
262 unsigned char palette_buffer[768];
263 uint32_t palette[256];
277 }
else if (
ret != 768) {
283 for (
i = 0;
i < 768;
i++)
284 if (palette_buffer[
i] > 63) {
289 for (
i = 0;
i < 256;
i++) {
290 r = palette_buffer[
i * 3 ] << palette_scale;
291 g = palette_buffer[
i * 3 + 1] << palette_scale;
292 b = palette_buffer[
i * 3 + 2] << palette_scale;
293 palette[
i] = (0xFF
U << 24) | (
r << 16) | (
g << 8) | (
b);
294 if (palette_scale == 2)
295 palette[
i] |= palette[
i] >> 6 & 0x30303;
299 if (
s->pb->eof_reached) {
304 if (chunk_size < 4 || chunk_size > INT_MAX - 4) {
314 else if (
ret != chunk_size) {
353 int64_t timestamp,
int flags)
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.
#define AV_CH_LAYOUT_MONO
@ AV_PKT_DATA_PALETTE
An AV_PKT_DATA_PALETTE side data packet contains exactly AVPALETTE_SIZE bytes worth of palette.
int64_t duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
uint32_t codec_tag
Additional information about the codec (corresponds to the AVI FOURCC).
int buf_size
Size of buf except extra allocated bytes.
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
static int idcin_read_header(AVFormatContext *s)
const AVInputFormat ff_idcin_demuxer
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
#define AV_CH_LAYOUT_STEREO
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
static int command(AVFilterContext *ctx, const char *cmd, const char *arg, char *res, int res_len, int flags)
AVCodecParameters * codecpar
Codec parameters associated with this stream.
static int read_header(FFV1Context *f)
This structure contains the data a format has to probe a file.
int sample_rate
Audio only.
static int idcin_probe(const AVProbeData *p)
unsigned int avio_rl32(AVIOContext *s)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
int flags
A combination of AV_PKT_FLAG values.
#define i(width, name, range_min, range_max)
int block_align
Audio only.
static int idcin_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
static int idcin_read_packet(AVFormatContext *s, AVPacket *pkt)
#define HUFFMAN_TABLE_SIZE
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_RL32
int index
stream index in AVFormatContext
uint8_t * av_packet_new_side_data(AVPacket *pkt, enum AVPacketSideDataType type, size_t size)
Allocate new information of a packet.
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
int bits_per_coded_sample
The number of bits per sample in the codedwords.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
This structure stores compressed data.
uint64_t channel_layout
Audio only.
#define flags(name, subs,...)
int64_t bit_rate
The average bitrate of the encoded data (in bits per second).
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
int64_t start_time
Decoding: pts of the first frame of the stream in presentation order, in stream time base.
int av_image_check_size(unsigned int w, unsigned int h, int log_offset, void *log_ctx)
Check if the given dimension of an image is valid, meaning that all bytes of the image can be address...
int avio_feof(AVIOContext *s)
Similar to feof() but also returns nonzero on read errors.