49 av_dlog(s,
"atom %u %.4s offset %#"PRIx64
"\n",
68 av_dlog(s,
"version %d.%d\n", tmp, tmp2);
71 av_dlog(s,
"unknown1 %d\n", tmp);
77 av_dlog(s,
"filenum %d\n", tmp);
85 av_dlog(s,
"unknown2 %d\n", tmp);
91 av_dlog(s,
"audio channels %d\n", tmp);
103 filename[
sizeof(filename)-1] = 0;
106 av_dlog(s,
"filename %s\n", filename);
109 av_dlog(s,
"frame rate %d/%d\n",
154 av_dlog(s,
"num video chunks %d\n", tmp);
157 av_dlog(s,
"num audio chunks %d\n", tmp);
172 if (atom.
tag ==
MKTAG(
'R',
'E',
'D',
'1')) {
191 if (atom.
tag !=
MKTAG(
'R',
'E',
'O',
'B') &&
192 atom.
tag !=
MKTAG(
'R',
'E',
'O',
'F') &&
202 if (atom.
tag ==
MKTAG(
'R',
'D',
'V',
'O')) {
225 av_dlog(s,
"frame num %d\n", tmp);
229 av_dlog(s,
"version %d.%d\n", tmp, tmp2);
232 av_dlog(s,
"unknown %d\n", tmp);
236 av_dlog(s,
"unknown %d\n", tmp);
239 av_dlog(s,
"unknown %d\n", tmp);
244 av_dlog(s,
"height %d\n", tmp);
247 av_dlog(s,
"metadata len %d\n", tmp);
288 av_dlog(s,
"packet num %d\n", tmp);
291 av_dlog(s,
"unknown %d\n", tmp);
295 av_dlog(s,
"version %d.%d\n", tmp, tmp2);
298 av_dlog(s,
"unknown %d\n", tmp);
312 av_dlog(s,
"pkt dts %"PRId64
" duration %d samples %d sample rate %d\n",
329 case MKTAG(
'R',
'E',
'D',
'V'):
335 case MKTAG(
'R',
'E',
'D',
'A'):
369 av_dlog(s,
"seek frame num %d timestamp %"PRId64
"\n",
370 frame_num, sample_time);
372 if (frame_num < r3d->video_offsets_count) {
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
int64_t avio_size(AVIOContext *s)
Get the filesize.
unsigned video_offsets_count
static int read_atom(AVFormatContext *s, Atom *atom)
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
static int r3d_close(AVFormatContext *s)
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
int64_t data_offset
offset of the first packet
unsigned int avio_rb16(AVIOContext *s)
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented...
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 avio_rb32(AVIOContext *s)
static int read_header(FFV1Context *f)
static int r3d_read_reda(AVFormatContext *s, AVPacket *pkt, Atom *atom)
static av_cold int read_close(AVFormatContext *ctx)
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
int duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
unsigned int avio_rl32(AVIOContext *s)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static int r3d_read_header(AVFormatContext *s, AVFormatParameters *ap)
static void r3d_read_reos(AVFormatContext *s)
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.
int avio_r8(AVIOContext *s)
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 seekable
A combination of AVIO_SEEKABLE_ flags or 0 when the stream is not seekable.
AVInputFormat ff_r3d_demuxer
int64_t av_rescale(int64_t a, int64_t b, int64_t c)
Rescale a 64-bit integer with rounding to nearest.
int width
picture width / height.
static av_always_inline int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
static int read_probe(AVProbeData *p)
#define av_dlog(pctx,...)
av_dlog macros Useful to print debug messages that shouldn't get compiled in normally.
enum AVMediaType codec_type
int sample_rate
samples per second
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static int read_packet(AVFormatContext *ctx, AVPacket *pkt)
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
void * av_malloc(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
static int r3d_probe(AVProbeData *p)
static int r3d_read_rdvo(AVFormatContext *s, Atom *atom)
This structure contains the data a format has to probe a file.
static int r3d_seek(AVFormatContext *s, int stream_index, int64_t sample_time, int flags)
int64_t duration
Decoding: duration of the stream, in stream time base.
static int r3d_read_packet(AVFormatContext *s, AVPacket *pkt)
int channels
number of audio channels
void * priv_data
Format private data.
static int r3d_read_redv(AVFormatContext *s, AVPacket *pkt, Atom *atom)
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed...
static int r3d_read_red1(AVFormatContext *s)
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented...
#define MKTAG(a, b, c, d)
enum AVDiscard discard
Selects which packets can be discarded at will and do not need to be demuxed.