FFmpeg
r3d.c
Go to the documentation of this file.
1 /*
2  * R3D REDCODE demuxer
3  * Copyright (c) 2008 Baptiste Coudurier <baptiste dot coudurier at gmail dot com>
4  *
5  * This file is part of FFmpeg.
6  *
7  * FFmpeg is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * FFmpeg is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with FFmpeg; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 
22 #include "libavutil/intreadwrite.h"
23 #include "libavutil/dict.h"
24 #include "libavutil/mathematics.h"
25 #include "avformat.h"
26 #include "internal.h"
27 
28 typedef struct R3DContext {
30  unsigned *video_offsets;
31  unsigned rdvo_offset;
32 
34 } R3DContext;
35 
36 typedef struct Atom {
37  unsigned size;
38  uint32_t tag;
39  uint64_t offset;
40 } Atom;
41 
42 static int read_atom(AVFormatContext *s, Atom *atom)
43 {
44  atom->offset = avio_tell(s->pb);
45  atom->size = avio_rb32(s->pb);
46  if (atom->size < 8)
47  return -1;
48  atom->tag = avio_rl32(s->pb);
49  av_log(s, AV_LOG_TRACE, "atom %u %.4s offset %#"PRIx64"\n",
50  atom->size, (char*)&atom->tag, atom->offset);
51  return atom->size;
52 }
53 
55 {
57  R3DContext *r3d = s->priv_data;
58  char filename[258];
59  int tmp;
60  int av_unused tmp2;
62 
63  if (!st)
64  return AVERROR(ENOMEM);
67 
68  tmp = avio_r8(s->pb); // major version
69  tmp2 = avio_r8(s->pb); // minor version
70  av_log(s, AV_LOG_TRACE, "version %d.%d\n", tmp, tmp2);
71 
72  tmp = avio_rb16(s->pb); // unknown
73  av_log(s, AV_LOG_TRACE, "unknown1 %d\n", tmp);
74 
75  tmp = avio_rb32(s->pb);
76  avpriv_set_pts_info(st, 32, 1, tmp);
77 
78  tmp = avio_rb32(s->pb); // filenum
79  av_log(s, AV_LOG_TRACE, "filenum %d\n", tmp);
80 
81  avio_skip(s->pb, 32); // unknown
82 
83  st->codecpar->width = avio_rb32(s->pb);
84  st->codecpar->height = avio_rb32(s->pb);
85 
86  tmp = avio_rb16(s->pb); // unknown
87  av_log(s, AV_LOG_TRACE, "unknown2 %d\n", tmp);
88 
89  framerate.num = avio_rb16(s->pb);
90  framerate.den = avio_rb16(s->pb);
91  if (framerate.num > 0 && framerate.den > 0) {
92 #if FF_API_R_FRAME_RATE
93  st->r_frame_rate =
94 #endif
96  }
97 
98  r3d->audio_channels = avio_r8(s->pb); // audio channels
99  av_log(s, AV_LOG_TRACE, "audio channels %d\n", tmp);
100 
101  avio_read(s->pb, filename, 257);
102  filename[sizeof(filename)-1] = 0;
103  av_dict_set(&st->metadata, "filename", filename, 0);
104 
105  av_log(s, AV_LOG_TRACE, "filename %s\n", filename);
106  av_log(s, AV_LOG_TRACE, "resolution %dx%d\n", st->codecpar->width, st->codecpar->height);
107  av_log(s, AV_LOG_TRACE, "timescale %d\n", st->time_base.den);
108  av_log(s, AV_LOG_TRACE, "frame rate %d/%d\n",
109  framerate.num, framerate.den);
110 
111  return 0;
112 }
113 
114 static int r3d_read_rdvo(AVFormatContext *s, Atom *atom)
115 {
116  R3DContext *r3d = s->priv_data;
117  AVStream *st = s->streams[0];
118  int i;
119 
120  r3d->video_offsets_count = (atom->size - 8) / 4;
121  r3d->video_offsets = av_malloc(atom->size);
122  if (!r3d->video_offsets)
123  return AVERROR(ENOMEM);
124 
125  for (i = 0; i < r3d->video_offsets_count; i++) {
126  r3d->video_offsets[i] = avio_rb32(s->pb);
127  if (!r3d->video_offsets[i]) {
128  r3d->video_offsets_count = i;
129  break;
130  }
131  av_log(s, AV_LOG_TRACE, "video offset %d: %#x\n", i, r3d->video_offsets[i]);
132  }
133 
134  if (st->avg_frame_rate.num)
137  st->time_base);
138  av_log(s, AV_LOG_TRACE, "duration %"PRId64"\n", st->duration);
139 
140  return 0;
141 }
142 
144 {
145  R3DContext *r3d = s->priv_data;
146  int av_unused tmp;
147 
148  r3d->rdvo_offset = avio_rb32(s->pb);
149  avio_rb32(s->pb); // rdvs offset
150  avio_rb32(s->pb); // rdao offset
151  avio_rb32(s->pb); // rdas offset
152 
153  tmp = avio_rb32(s->pb);
154  av_log(s, AV_LOG_TRACE, "num video chunks %d\n", tmp);
155 
156  tmp = avio_rb32(s->pb);
157  av_log(s, AV_LOG_TRACE, "num audio chunks %d\n", tmp);
158 
159  avio_skip(s->pb, 6*4);
160 }
161 
163 {
164  R3DContext *r3d = s->priv_data;
165  Atom atom;
166  int ret;
167 
168  if (read_atom(s, &atom) < 0) {
169  av_log(s, AV_LOG_ERROR, "error reading atom\n");
170  return -1;
171  }
172  if (atom.tag == MKTAG('R','E','D','1')) {
173  if ((ret = r3d_read_red1(s)) < 0) {
174  av_log(s, AV_LOG_ERROR, "error parsing 'red1' atom\n");
175  return ret;
176  }
177  } else {
178  av_log(s, AV_LOG_ERROR, "could not find 'red1' atom\n");
179  return -1;
180  }
181 
182  /* we cannot create the audio stream now because we do not know the
183  * sample rate */
184  if (r3d->audio_channels)
185  s->ctx_flags |= AVFMTCTX_NOHEADER;
186 
187  s->internal->data_offset = avio_tell(s->pb);
188  av_log(s, AV_LOG_TRACE, "data offset %#"PRIx64"\n", s->internal->data_offset);
189  if (!(s->pb->seekable & AVIO_SEEKABLE_NORMAL))
190  return 0;
191  // find REOB/REOF/REOS to load index
192  avio_seek(s->pb, avio_size(s->pb)-48-8, SEEK_SET);
193  if (read_atom(s, &atom) < 0)
194  av_log(s, AV_LOG_ERROR, "error reading end atom\n");
195 
196  if (atom.tag != MKTAG('R','E','O','B') &&
197  atom.tag != MKTAG('R','E','O','F') &&
198  atom.tag != MKTAG('R','E','O','S'))
199  goto out;
200 
201  r3d_read_reos(s);
202 
203  if (r3d->rdvo_offset) {
204  avio_seek(s->pb, r3d->rdvo_offset, SEEK_SET);
205  if (read_atom(s, &atom) < 0)
206  av_log(s, AV_LOG_ERROR, "error reading 'rdvo' atom\n");
207  if (atom.tag == MKTAG('R','D','V','O')) {
208  if (r3d_read_rdvo(s, &atom) < 0)
209  av_log(s, AV_LOG_ERROR, "error parsing 'rdvo' atom\n");
210  }
211  }
212 
213  out:
214  avio_seek(s->pb, s->internal->data_offset, SEEK_SET);
215  return 0;
216 }
217 
219 {
220  AVStream *st = s->streams[0];
221  int tmp;
222  int av_unused tmp2;
223  int64_t pos = avio_tell(s->pb);
224  unsigned dts;
225  int ret;
226 
227  dts = avio_rb32(s->pb);
228 
229  tmp = avio_rb32(s->pb);
230  av_log(s, AV_LOG_TRACE, "frame num %d\n", tmp);
231 
232  tmp = avio_r8(s->pb); // major version
233  tmp2 = avio_r8(s->pb); // minor version
234  av_log(s, AV_LOG_TRACE, "version %d.%d\n", tmp, tmp2);
235 
236  tmp = avio_rb16(s->pb); // unknown
237  av_log(s, AV_LOG_TRACE, "unknown %d\n", tmp);
238 
239  if (tmp > 4) {
240  tmp = avio_rb16(s->pb); // unknown
241  av_log(s, AV_LOG_TRACE, "unknown %d\n", tmp);
242 
243  tmp = avio_rb16(s->pb); // unknown
244  av_log(s, AV_LOG_TRACE, "unknown %d\n", tmp);
245 
246  tmp = avio_rb32(s->pb);
247  av_log(s, AV_LOG_TRACE, "width %d\n", tmp);
248  tmp = avio_rb32(s->pb);
249  av_log(s, AV_LOG_TRACE, "height %d\n", tmp);
250 
251  tmp = avio_rb32(s->pb);
252  av_log(s, AV_LOG_TRACE, "metadata len %d\n", tmp);
253  }
254  tmp = atom->size - 8 - (avio_tell(s->pb) - pos);
255  if (tmp < 0)
256  return -1;
257  ret = av_get_packet(s->pb, pkt, tmp);
258  if (ret < 0) {
259  av_log(s, AV_LOG_ERROR, "error reading video packet\n");
260  return -1;
261  }
262 
263  pkt->stream_index = 0;
264  pkt->dts = dts;
265  if (st->avg_frame_rate.num)
266  pkt->duration = (uint64_t)st->time_base.den*
268  av_log(s, AV_LOG_TRACE, "pkt dts %"PRId64" duration %"PRId64"\n", pkt->dts, pkt->duration);
269 
270  return 0;
271 }
272 
274 {
275  R3DContext *r3d = s->priv_data;
276  AVStream *st;
277  int av_unused tmp, tmp2;
278  int samples, size;
279  int64_t pos = avio_tell(s->pb);
280  unsigned dts;
281  int ret;
282 
283  if (s->nb_streams < 2) {
284  st = avformat_new_stream(s, NULL);
285  if (!st)
286  return AVERROR(ENOMEM);
289  st->codecpar->channels = r3d->audio_channels;
290  avpriv_set_pts_info(st, 32, 1, s->streams[0]->time_base.den);
291  } else {
292  st = s->streams[1];
293  }
294 
295  dts = avio_rb32(s->pb);
296 
297  st->codecpar->sample_rate = avio_rb32(s->pb);
298  if (st->codecpar->sample_rate <= 0) {
299  av_log(s, AV_LOG_ERROR, "Bad sample rate\n");
300  return AVERROR_INVALIDDATA;
301  }
302 
303  samples = avio_rb32(s->pb);
304 
305  tmp = avio_rb32(s->pb);
306  av_log(s, AV_LOG_TRACE, "packet num %d\n", tmp);
307 
308  tmp = avio_rb16(s->pb); // unknown
309  av_log(s, AV_LOG_TRACE, "unknown %d\n", tmp);
310 
311  tmp = avio_r8(s->pb); // major version
312  tmp2 = avio_r8(s->pb); // minor version
313  av_log(s, AV_LOG_TRACE, "version %d.%d\n", tmp, tmp2);
314 
315  tmp = avio_rb32(s->pb); // unknown
316  av_log(s, AV_LOG_TRACE, "unknown %d\n", tmp);
317 
318  size = atom->size - 8 - (avio_tell(s->pb) - pos);
319  if (size < 0)
320  return -1;
321  ret = av_get_packet(s->pb, pkt, size);
322  if (ret < 0) {
323  av_log(s, AV_LOG_ERROR, "error reading audio packet\n");
324  return ret;
325  }
326 
327  pkt->stream_index = 1;
328  pkt->dts = dts;
329 
330  if (st->codecpar->sample_rate && samples > 0)
332  av_log(s, AV_LOG_TRACE, "pkt dts %"PRId64" duration %"PRId64" samples %d sample rate %d\n",
334 
335  return 0;
336 }
337 
339 {
340  R3DContext *r3d = s->priv_data;
341  Atom atom;
342  int err = 0;
343 
344  while (!err) {
345  if (read_atom(s, &atom) < 0) {
346  err = -1;
347  break;
348  }
349  switch (atom.tag) {
350  case MKTAG('R','E','D','V'):
351  if (s->streams[0]->discard == AVDISCARD_ALL)
352  goto skip;
353  if (!(err = r3d_read_redv(s, pkt, &atom)))
354  return 0;
355  break;
356  case MKTAG('R','E','D','A'):
357  if (!r3d->audio_channels)
358  return -1;
359  if (s->nb_streams >= 2 && s->streams[1]->discard == AVDISCARD_ALL)
360  goto skip;
361  if (!(err = r3d_read_reda(s, pkt, &atom)))
362  return 0;
363  break;
364  default:
365  skip:
366  avio_skip(s->pb, atom.size-8);
367  }
368  }
369  return err;
370 }
371 
372 static int r3d_probe(const AVProbeData *p)
373 {
374  if (AV_RL32(p->buf + 4) == MKTAG('R','E','D','1'))
375  return AVPROBE_SCORE_MAX;
376  return 0;
377 }
378 
379 static int r3d_seek(AVFormatContext *s, int stream_index, int64_t sample_time, int flags)
380 {
381  AVStream *st = s->streams[0]; // video stream
382  R3DContext *r3d = s->priv_data;
383  int frame_num;
384 
385  if (!st->avg_frame_rate.num)
386  return -1;
387 
388  frame_num = av_rescale_q(sample_time, st->time_base,
389  av_inv_q(st->avg_frame_rate));
390  av_log(s, AV_LOG_TRACE, "seek frame num %d timestamp %"PRId64"\n",
391  frame_num, sample_time);
392 
393  if (frame_num < r3d->video_offsets_count) {
394  if (avio_seek(s->pb, r3d->video_offsets_count, SEEK_SET) < 0)
395  return -1;
396  } else {
397  av_log(s, AV_LOG_ERROR, "could not seek to frame %d\n", frame_num);
398  return -1;
399  }
400 
401  return 0;
402 }
403 
405 {
406  R3DContext *r3d = s->priv_data;
407 
408  av_freep(&r3d->video_offsets);
409 
410  return 0;
411 }
412 
414  .name = "r3d",
415  .long_name = NULL_IF_CONFIG_SMALL("REDCODE R3D"),
416  .priv_data_size = sizeof(R3DContext),
421  .read_seek = r3d_seek,
422 };
AVERROR
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
avformat_new_stream
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
Definition: utils.c:4480
AVCodecParameters::codec_type
enum AVMediaType codec_type
General type of the encoded data.
Definition: avcodec.h:3953
out
FILE * out
Definition: movenc.c:54
MKTAG
#define MKTAG(a, b, c, d)
Definition: common.h:366
r3d_read_red1
static int r3d_read_red1(AVFormatContext *s)
Definition: r3d.c:54
Atom::tag
uint32_t tag
Definition: r3d.c:38
av_unused
#define av_unused
Definition: attributes.h:125
tmp
static uint8_t tmp[11]
Definition: aes_ctr.c:26
r3d_seek
static int r3d_seek(AVFormatContext *s, int stream_index, int64_t sample_time, int flags)
Definition: r3d.c:379
AVStream::avg_frame_rate
AVRational avg_frame_rate
Average framerate.
Definition: avformat.h:943
AVPacket::duration
int64_t duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
Definition: avcodec.h:1495
mathematics.h
avio_size
int64_t avio_size(AVIOContext *s)
Get the filesize.
Definition: aviobuf.c:336
av_malloc
#define av_malloc(s)
Definition: tableprint_vlc.h:31
Atom::offset
uint64_t offset
Definition: r3d.c:39
AVPROBE_SCORE_MAX
#define AVPROBE_SCORE_MAX
maximum score
Definition: avformat.h:458
framerate
int framerate
Definition: h264_levels.c:65
AVCodecParameters::channels
int channels
Audio only.
Definition: avcodec.h:4063
r3d_read_reda
static int r3d_read_reda(AVFormatContext *s, AVPacket *pkt, Atom *atom)
Definition: r3d.c:273
read_seek
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
Definition: libcdio.c:153
read_close
static av_cold int read_close(AVFormatContext *ctx)
Definition: libcdio.c:145
avio_tell
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
Definition: avio.h:557
Atom
Definition: r3d.c:36
AVStream::duration
int64_t duration
Decoding: duration of the stream, in stream time base.
Definition: avformat.h:919
AVRational::num
int num
Numerator.
Definition: rational.h:59
R3DContext::video_offsets
unsigned * video_offsets
Definition: r3d.c:30
avio_rb32
unsigned int avio_rb32(AVIOContext *s)
Definition: aviobuf.c:800
AV_LOG_TRACE
#define AV_LOG_TRACE
Extremely verbose debugging, useful for libav* development.
Definition: log.h:202
AV_LOG_ERROR
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:176
AVInputFormat
Definition: avformat.h:640
intreadwrite.h
s
#define s(width, name)
Definition: cbs_vp9.c:257
r3d_read_reos
static void r3d_read_reos(AVFormatContext *s)
Definition: r3d.c:143
AVInputFormat::name
const char * name
A comma separated list of short names for the format.
Definition: avformat.h:645
AVProbeData::buf
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
Definition: avformat.h:448
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
AVCodecParameters::width
int width
Video only.
Definition: avcodec.h:4023
read_atom
static int read_atom(AVFormatContext *s, Atom *atom)
Definition: r3d.c:42
av_rescale_q
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq)
Rescale a 64-bit integer by 2 rational numbers.
Definition: mathematics.c:142
r3d_probe
static int r3d_probe(const AVProbeData *p)
Definition: r3d.c:372
AVDISCARD_ALL
@ AVDISCARD_ALL
discard all
Definition: avcodec.h:811
AVFormatContext
Format I/O context.
Definition: avformat.h:1342
internal.h
AVStream::codecpar
AVCodecParameters * codecpar
Codec parameters associated with this stream.
Definition: avformat.h:1017
read_header
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:530
AVStream::time_base
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented.
Definition: avformat.h:899
NULL
#define NULL
Definition: coverity.c:32
R3DContext
Definition: r3d.c:28
read_probe
static int read_probe(const AVProbeData *pd)
Definition: jvdec.c:55
AVFMTCTX_NOHEADER
#define AVFMTCTX_NOHEADER
signal that no header is present (streams are added dynamically)
Definition: avformat.h:1291
AVRational
Rational number (pair of numerator and denominator).
Definition: rational.h:58
AVProbeData
This structure contains the data a format has to probe a file.
Definition: avformat.h:446
AVStream::metadata
AVDictionary * metadata
Definition: avformat.h:934
AVCodecParameters::sample_rate
int sample_rate
Audio only.
Definition: avcodec.h:4067
R3DContext::video_offsets_count
unsigned video_offsets_count
Definition: r3d.c:29
avio_rl32
unsigned int avio_rl32(AVIOContext *s)
Definition: aviobuf.c:769
ff_r3d_demuxer
AVInputFormat ff_r3d_demuxer
Definition: r3d.c:413
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:188
avpriv_set_pts_info
void avpriv_set_pts_info(AVStream *s, int pts_wrap_bits, unsigned int pts_num, unsigned int pts_den)
Set the time base and wrapping info for a given stream.
Definition: utils.c:4910
size
int size
Definition: twinvq_data.h:11134
r3d_read_packet
static int r3d_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: r3d.c:338
AVPacket::dts
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed.
Definition: avcodec.h:1476
avio_r8
int avio_r8(AVIOContext *s)
Definition: aviobuf.c:638
r3d_read_header
static int r3d_read_header(AVFormatContext *s)
Definition: r3d.c:162
r3d_read_redv
static int r3d_read_redv(AVFormatContext *s, AVPacket *pkt, Atom *atom)
Definition: r3d.c:218
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:259
AVCodecParameters::height
int height
Definition: avcodec.h:4024
AV_CODEC_ID_PCM_S32BE
@ AV_CODEC_ID_PCM_S32BE
Definition: avcodec.h:472
av_inv_q
static av_always_inline AVRational av_inv_q(AVRational q)
Invert a rational.
Definition: rational.h:159
AV_CODEC_ID_JPEG2000
@ AV_CODEC_ID_JPEG2000
Definition: avcodec.h:306
av_rescale
int64_t av_rescale(int64_t a, int64_t b, int64_t c)
Rescale a 64-bit integer with rounding to nearest.
Definition: mathematics.c:129
av_get_packet
int av_get_packet(AVIOContext *s, AVPacket *pkt, int size)
Allocate and read the payload of a packet and initialize its fields with default values.
Definition: utils.c:313
ret
ret
Definition: filter_design.txt:187
read_packet
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
Definition: avio_reading.c:42
AVStream
Stream structure.
Definition: avformat.h:870
avio_seek
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
Definition: aviobuf.c:246
avio_rb16
unsigned int avio_rb16(AVIOContext *s)
Definition: aviobuf.c:785
avformat.h
dict.h
AV_RL32
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_RL32
Definition: bytestream.h:88
R3DContext::audio_channels
int audio_channels
Definition: r3d.c:33
pkt
static AVPacket pkt
Definition: demuxing_decoding.c:54
AVIO_SEEKABLE_NORMAL
#define AVIO_SEEKABLE_NORMAL
Seeking works like for a local file.
Definition: avio.h:40
AVRational::den
int den
Denominator.
Definition: rational.h:60
avio_read
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
Definition: aviobuf.c:647
AVStream::r_frame_rate
AVRational r_frame_rate
Real base framerate of the stream.
Definition: avformat.h:994
samples
Filter the word “frame” indicates either a video frame or a group of audio samples
Definition: filter_design.txt:8
AVPacket::stream_index
int stream_index
Definition: avcodec.h:1479
avio_skip
int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
Definition: aviobuf.c:331
r3d_read_rdvo
static int r3d_read_rdvo(AVFormatContext *s, Atom *atom)
Definition: r3d.c:114
r3d_close
static int r3d_close(AVFormatContext *s)
Definition: r3d.c:404
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
AVCodecParameters::codec_id
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
Definition: avcodec.h:3957
AVPacket
This structure stores compressed data.
Definition: avcodec.h:1454
av_freep
#define av_freep(p)
Definition: tableprint_vlc.h:35
av_dict_set
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
Definition: dict.c:70
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:565
av_log
#define av_log(a,...)
Definition: tableprint_vlc.h:28
AVERROR_INVALIDDATA
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
Definition: error.h:59
R3DContext::rdvo_offset
unsigned rdvo_offset
Definition: r3d.c:31
Atom::size
unsigned size
Definition: r3d.c:37