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]);
160 if (scratch[20] == 24) {
215 audio_frame_counter = video_frame_counter = 0;
223 data_offset +
AV_RB32(&scratch[0]);
229 if (
AV_RB32(&scratch[8]) == 0xFFFFFFFF) {
243 video_frame_counter++;
285 while (next_sample ==
NULL) {
307 if (next_sample !=
NULL)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
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.
packed RGB 8:8:8, 24bpp, RGBRGB...
static int film_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
int index
stream index in AVFormatContext
unsigned int sample_count
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
AVIndexEntry * index_entries
Only used if the format does not support seeking natively.
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_WB32 unsigned int_TMPL AV_WB24 unsigned int_TMPL AV_RB16
unsigned int audio_channels
int64_t duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
enum AVStreamParseType need_parsing
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
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
AVStream ** streams
A list of all streams in the file.
#define AVERROR_EOF
End of file.
static av_cold int read_close(AVFormatContext *ctx)
unsigned int audio_samplerate
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
int64_t bit_rate
The average bitrate of the encoded data (in bits per second).
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
AVCodecID
Identify the syntax and semantics of the bitstream.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
int av_index_search_timestamp(AVStream *st, int64_t timestamp, int flags)
Get the index for a specific timestamp.
#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.
unsigned int current_sample
int flags
A combination of AV_PKT_FLAG values.
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
unsigned int nb_streams
Number of elements in AVFormatContext.streams.
int block_align
Audio only.
film_sample * sample_table
enum AVCodecID video_type
static int film_read_header(AVFormatContext *s)
static int read_header(FFV1Context *f)
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
AVIOContext * pb
I/O context.
static int film_probe(AVProbeData *p)
This structure contains the data a format has to probe a file.
AVInputFormat ff_segafilm_demuxer
int64_t duration
Decoding: duration of the stream, in stream time base.
int sample_rate
Audio only.
static int film_read_packet(AVFormatContext *s, AVPacket *pkt)
void * priv_data
Format private data.
int bits_per_coded_sample
The number of bits per sample in the codedwords.
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed...
enum AVCodecID audio_type
AVCodecParameters * codecpar
Codec parameters associated with this stream.
#define av_malloc_array(a, b)
uint32_t codec_tag
Additional information about the codec (corresponds to the AVI FOURCC).
This structure stores compressed data.
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...