Go to the documentation of this file.
35 #define FILM_TAG MKBETAG('F', 'I', 'L', 'M')
36 #define FDSC_TAG MKBETAG('F', 'D', 'S', 'C')
37 #define STAB_TAG MKBETAG('S', 'T', 'A', 'B')
38 #define CVID_TAG MKBETAG('c', 'v', 'i', 'd')
39 #define RAW_TAG MKBETAG('r', 'a', 'w', ' ')
92 unsigned char scratch[256];
94 unsigned int data_offset;
95 unsigned int audio_frame_counter;
96 unsigned int video_frame_counter;
103 data_offset =
AV_RB32(&scratch[4]);
163 if (scratch[20] == 24) {
208 for (
i = 0;
i <
s->nb_streams;
i++) {
216 audio_frame_counter = video_frame_counter = 0;
222 data_offset +
AV_RB32(&scratch[0]);
226 if (
AV_RB32(&scratch[8]) == 0xFFFFFFFF) {
240 video_frame_counter++;
279 while (next_sample ==
NULL) {
301 if (next_sample !=
NULL)
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.
static int film_read_packet(AVFormatContext *s, AVPacket *pkt)
@ AV_CODEC_ID_PCM_S16BE_PLANAR
unsigned int sample_count
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).
unsigned int audio_channels
int nb_channels
Number of channels in this layout.
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
int av_add_index_entry(AVStream *st, int64_t pos, int64_t timestamp, int size, int distance, int flags)
Add an index entry into a sorted list.
static av_cold int read_close(AVFormatContext *ctx)
unsigned int audio_samplerate
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
static int film_read_header(AVFormatContext *s)
enum AVStreamParseType need_parsing
static int film_probe(const AVProbeData *p)
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.
unsigned int current_sample
film_sample * sample_table
AVChannelLayout ch_layout
Audio only.
static int film_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
int sample_rate
Audio only.
AVCodecID
Identify the syntax and semantics of the bitstream.
enum AVCodecID video_type
@ AV_PIX_FMT_RGB24
packed RGB 8:8:8, 24bpp, RGBRGB...
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
static int film_read_close(AVFormatContext *s)
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_RB32
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed.
int flags
A combination of AV_PKT_FLAG values.
const AVInputFormat ff_segafilm_demuxer
#define i(width, name, range_min, range_max)
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
int block_align
Audio only.
#define av_malloc_array(a, b)
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
int index
stream index in AVFormatContext
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
static int read_probe(const AVProbeData *p)
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.
@ AV_CODEC_ID_PCM_S8_PLANAR
#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.
enum AVCodecID audio_type
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_WB32 unsigned int_TMPL AV_WB24 unsigned int_TMPL AV_RB16
int av_index_search_timestamp(AVStream *st, int64_t timestamp, int flags)
Get the index for a specific timestamp.