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', ' ')
94 unsigned char scratch[256];
96 unsigned int data_offset;
97 unsigned int audio_frame_counter;
106 data_offset =
AV_RB32(&scratch[4]);
131 if (scratch[23] == 2)
168 if (scratch[20] == 24) {
218 audio_frame_counter = 0;
226 data_offset +
AV_RB32(&scratch[0]);
232 if (
AV_RB32(&scratch[8]) == 0xFFFFFFFF) {
enum PixelFormat pix_fmt
Pixel format, see PIX_FMT_xxx.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
AV_WL32 AV_WL24 AV_WL16 AV_WB32 AV_WB24 AV_RB16
AV_WL32 AV_WL24 AV_WL16 AV_RB32
int64_t pos
byte position in stream, -1 if unknown
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
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.
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 *arg)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc() and set the pointer ...
unsigned int audio_channels
enum AVStreamParseType need_parsing
static int read_header(FFV1Context *f)
static av_cold int read_close(AVFormatContext *ctx)
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
int bits_per_coded_sample
bits per sample/pixel from the demuxer (needed for huffyuv).
unsigned int audio_samplerate
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
void av_free(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc(). ...
struct FilmDemuxContext FilmDemuxContext
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
unsigned int current_sample
void av_log(void *avcl, int level, const char *fmt,...)
AVStream * avformat_new_stream(AVFormatContext *s, AVCodec *c)
Add a new stream to a media file.
static int film_read_header(AVFormatContext *s, AVFormatParameters *ap)
AVCodecContext * codec
codec context
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
unsigned int nb_streams
A list of all streams in the file.
int bit_rate
the average bitrate
int width
picture width / height.
film_sample * sample_table
static int read_probe(AVProbeData *p)
enum AVMediaType codec_type
int sample_rate
samples per second
unsigned char * stereo_buffer
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
unsigned int codec_tag
fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
static int read_packet(AVFormatContext *ctx, AVPacket *pkt)
void * av_malloc(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
static int film_probe(AVProbeData *p)
This structure contains the data a format has to probe a file.
AVInputFormat ff_segafilm_demuxer
CodecID
Identify the syntax and semantics of the bitstream.
packed RGB 8:8:8, 24bpp, RGBRGB...
int channels
number of audio channels
static int film_read_packet(AVFormatContext *s, AVPacket *pkt)
void * priv_data
Format private data.
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...