30 #include "libavutil/intreadwrite.h"
34 #define FILM_TAG MKBETAG('F', 'I', 'L', 'M')
35 #define FDSC_TAG MKBETAG('F', 'D', 'S', 'C')
36 #define STAB_TAG MKBETAG('S', 'T', 'A', 'B')
37 #define CVID_TAG MKBETAG('c', 'v', 'i', 'd')
38 #define RAW_TAG MKBETAG('r', 'a', 'w', ' ')
93 unsigned char scratch[256];
95 unsigned int data_offset;
96 unsigned int audio_frame_counter;
105 data_offset =
AV_RB32(&scratch[4]);
130 if (scratch[23] == 2)
167 if (scratch[20] == 24) {
222 audio_frame_counter = 0;
230 data_offset +
AV_RB32(&scratch[0]);
236 if (
AV_RB32(&scratch[8]) == 0xFFFFFFFF) {
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
packed RGB 8:8:8, 24bpp, RGBRGB...
int64_t pos
byte position in stream, -1 if unknown
AVCodecContext * codec
Codec context associated with this stream.
int index
stream index in AVFormatContext
unsigned int sample_count
void av_log(void *avcl, int level, const char *fmt,...) av_printf_format(3
Send the specified message to the log if the level is less than or equal to the current av_log_level...
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
static int film_read_close(AVFormatContext *s)
int block_align
number of bytes per packet if constant and known or 0 Used by some WAV based audio codecs...
void av_freep(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc() and set the pointer ...
unsigned int audio_channels
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
enum AVStreamParseType need_parsing
static av_cold int read_close(AVFormatContext *ctx)
int bits_per_coded_sample
bits per sample/pixel from the demuxer (needed for huffyuv).
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
unsigned int audio_samplerate
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
AVCodecID
Identify the syntax and semantics of the bitstream.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
void av_free(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc(). ...
void * priv_data
Format private data.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
unsigned int current_sample
unsigned int nb_streams
Number of elements in AVFormatContext.streams.
int bit_rate
the average bitrate
int width
picture width / height.
AVStream ** streams
A list of all streams in the file.
void * av_malloc(size_t size) av_malloc_attrib 1(1)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
film_sample * sample_table
enum AVCodecID video_type
static int film_read_header(AVFormatContext *s)
static int read_header(FFV1Context *f)
enum AVMediaType codec_type
int sample_rate
samples per second
unsigned char * stereo_buffer
unsigned int codec_tag
fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
AVIOContext * pb
I/O context.
static int read_packet(AVFormatContext *ctx, AVPacket *pkt)
static int film_probe(AVProbeData *p)
This structure contains the data a format has to probe a file.
AVInputFormat ff_segafilm_demuxer
int channels
number of audio channels
static int film_read_packet(AVFormatContext *s, AVPacket *pkt)
enum AVCodecID audio_type
This structure stores compressed data.
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...