49 av_dlog(s,
"atom %u %.4s offset %#"PRIx64
"\n",
69 av_dlog(s,
"version %d.%d\n", tmp, tmp2);
72 av_dlog(s,
"unknown1 %d\n", tmp);
78 av_dlog(s,
"filenum %d\n", tmp);
86 av_dlog(s,
"unknown2 %d\n", tmp);
90 if (framerate.
num > 0 && framerate.
den > 0) {
91 #if FF_API_R_FRAME_RATE
98 av_dlog(s,
"audio channels %d\n", tmp);
110 filename[
sizeof(filename)-1] = 0;
113 av_dlog(s,
"filename %s\n", filename);
116 av_dlog(s,
"frame rate %d/%d\n",
117 framerate.
num, framerate.
den);
147 av_dlog(s,
"duration %"PRId64
"\n", st->duration);
163 av_dlog(s,
"num video chunks %d\n", tmp);
166 av_dlog(s,
"num audio chunks %d\n", tmp);
181 if (atom.
tag ==
MKTAG(
'R',
'E',
'D',
'1')) {
200 if (atom.
tag !=
MKTAG(
'R',
'E',
'O',
'B') &&
201 atom.
tag !=
MKTAG(
'R',
'E',
'O',
'F') &&
211 if (atom.
tag ==
MKTAG(
'R',
'D',
'V',
'O')) {
234 av_dlog(s,
"frame num %d\n", tmp);
238 av_dlog(s,
"version %d.%d\n", tmp, tmp2);
241 av_dlog(s,
"unknown %d\n", tmp);
245 av_dlog(s,
"unknown %d\n", tmp);
248 av_dlog(s,
"unknown %d\n", tmp);
253 av_dlog(s,
"height %d\n", tmp);
256 av_dlog(s,
"metadata len %d\n", tmp);
297 av_dlog(s,
"packet num %d\n", tmp);
300 av_dlog(s,
"unknown %d\n", tmp);
304 av_dlog(s,
"version %d.%d\n", tmp, tmp2);
307 av_dlog(s,
"unknown %d\n", tmp);
321 av_dlog(s,
"pkt dts %"PRId64
" duration %d samples %d sample rate %d\n",
338 case MKTAG(
'R',
'E',
'D',
'V'):
344 case MKTAG(
'R',
'E',
'D',
'A'):
378 av_dlog(s,
"seek frame num %d timestamp %"PRId64
"\n",
379 frame_num, sample_time);
381 if (frame_num < r3d->video_offsets_count) {
382 if (
avio_seek(s->pb, r3d->video_offsets_count, SEEK_SET) < 0)
void * av_malloc(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
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.
av_dlog(ac->avr,"%d samples - audio_convert: %s to %s (%s)\n", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt), use_generic?ac->func_descr_generic:ac->func_descr)
int64_t data_offset
offset of the first packet
unsigned int avio_rb16(AVIOContext *s)
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 r3d_read_reda(AVFormatContext *s, AVPacket *pkt, Atom *atom)
static av_cold int read_close(AVFormatContext *ctx)
#define MKTAG(a, b, c, d)
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.
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq)
Rescale a 64-bit integer by 2 rational numbers.
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 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.
AVRational avg_frame_rate
Average framerate.
int avio_r8(AVIOContext *s)
AVCodecContext * codec
Codec context associated with this stream.
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_header(FFV1Context *f)
enum AVMediaType codec_type
int sample_rate
samples per second
AVIOContext * pb
I/O context.
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.
static int r3d_probe(AVProbeData *p)
rational number numerator/denominator
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_header(AVFormatContext *s)
static int r3d_read_packet(AVFormatContext *s, AVPacket *pkt)
#define AVERROR_INVALIDDATA
#define AVPROBE_SCORE_MAX
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...
enum AVDiscard discard
Selects which packets can be discarded at will and do not need to be demuxed.
This structure stores compressed data.