FFmpeg
rpl.c
Go to the documentation of this file.
1 /*
2  * ARMovie/RPL demuxer
3  * Copyright (c) 2007 Christian Ohm, 2008 Eli Friedman
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 <inttypes.h>
23 #include <stdlib.h>
24 
25 #include "libavutil/avstring.h"
26 #include "libavutil/dict.h"
27 #include "avformat.h"
28 #include "internal.h"
29 
30 #define RPL_SIGNATURE "ARMovie\x0A"
31 #define RPL_SIGNATURE_SIZE 8
32 
33 /** 256 is arbitrary, but should be big enough for any reasonable file. */
34 #define RPL_LINE_LENGTH 256
35 
36 static int rpl_probe(const AVProbeData *p)
37 {
38  if (memcmp(p->buf, RPL_SIGNATURE, RPL_SIGNATURE_SIZE))
39  return 0;
40 
41  return AVPROBE_SCORE_MAX;
42 }
43 
44 typedef struct RPLContext {
45  // RPL header data
47 
48  // Stream position data
49  uint32_t chunk_number;
50  uint32_t chunk_part;
51  uint32_t frame_in_part;
52 } RPLContext;
53 
54 static int read_line(AVIOContext * pb, char* line, int bufsize)
55 {
56  int i;
57  for (i = 0; i < bufsize - 1; i++) {
58  int b = avio_r8(pb);
59  if (b == 0)
60  break;
61  if (b == '\n') {
62  line[i] = '\0';
63  return avio_feof(pb) ? -1 : 0;
64  }
65  line[i] = b;
66  }
67  line[i] = '\0';
68  return -1;
69 }
70 
71 static int32_t read_int(const char* line, const char** endptr, int* error)
72 {
73  unsigned long result = 0;
74  for (; *line>='0' && *line<='9'; line++) {
75  if (result > (0x7FFFFFFF - 9) / 10)
76  *error = -1;
77  result = 10 * result + *line - '0';
78  }
79  *endptr = line;
80  return result;
81 }
82 
84 {
85  char line[RPL_LINE_LENGTH];
86  const char *endptr;
87  *error |= read_line(pb, line, sizeof(line));
88  return read_int(line, &endptr, error);
89 }
90 
91 /** Parsing for fps, which can be a fraction. Unfortunately,
92  * the spec for the header leaves out a lot of details,
93  * so this is mostly guessing.
94  */
95 static AVRational read_fps(const char* line, int* error)
96 {
97  int64_t num, den = 1;
99  num = read_int(line, &line, error);
100  if (*line == '.')
101  line++;
102  for (; *line>='0' && *line<='9'; line++) {
103  // Truncate any numerator too large to fit into an int64_t
104  if (num > (INT64_MAX - 9) / 10 || den > INT64_MAX / 10)
105  break;
106  num = 10 * num + (*line - '0');
107  den *= 10;
108  }
109  if (!num)
110  *error = -1;
111  av_reduce(&result.num, &result.den, num, den, 0x7FFFFFFF);
112  return result;
113 }
114 
116 {
117  AVIOContext *pb = s->pb;
118  RPLContext *rpl = s->priv_data;
119  AVStream *vst = NULL, *ast = NULL;
120  int64_t total_audio_size;
121  int error = 0;
122  const char *endptr;
123  char audio_type[RPL_LINE_LENGTH];
124  char audio_codec[RPL_LINE_LENGTH];
125 
126  uint32_t i;
127 
128  int32_t video_format, audio_format, chunk_catalog_offset, number_of_chunks;
129  AVRational fps;
130 
131  char line[RPL_LINE_LENGTH];
132 
133  // The header for RPL/ARMovie files is 21 lines of text
134  // containing the various header fields. The fields are always
135  // in the same order, and other text besides the first
136  // number usually isn't important.
137  // (The spec says that there exists some significance
138  // for the text in a few cases; samples needed.)
139  error |= read_line(pb, line, sizeof(line)); // ARMovie
140  error |= read_line(pb, line, sizeof(line)); // movie name
141  av_dict_set(&s->metadata, "title" , line, 0);
142  error |= read_line(pb, line, sizeof(line)); // date/copyright
143  av_dict_set(&s->metadata, "copyright", line, 0);
144  error |= read_line(pb, line, sizeof(line)); // author and other
145  av_dict_set(&s->metadata, "author" , line, 0);
146 
147  // video headers
148  video_format = read_line_and_int(pb, &error);
149  if (video_format) {
150  vst = avformat_new_stream(s, NULL);
151  if (!vst)
152  return AVERROR(ENOMEM);
154  vst->codecpar->codec_tag = video_format;
155  vst->codecpar->width = read_line_and_int(pb, &error); // video width
156  vst->codecpar->height = read_line_and_int(pb, &error); // video height
157  vst->codecpar->bits_per_coded_sample = read_line_and_int(pb, &error); // video bits per sample
158 
159  // Figure out the video codec
160  switch (vst->codecpar->codec_tag) {
161 #if 0
162  case 122:
163  vst->codecpar->codec_id = AV_CODEC_ID_ESCAPE122;
164  break;
165 #endif
166  case 124:
168  // The header is wrong here, at least sometimes
169  vst->codecpar->bits_per_coded_sample = 16;
170  break;
171  case 130:
173  break;
174  default:
175  avpriv_report_missing_feature(s, "Video format %s",
178  }
179  } else {
180  for (i = 0; i < 3; i++)
181  error |= read_line(pb, line, sizeof(line));
182  }
183 
184  error |= read_line(pb, line, sizeof(line)); // video frames per second
185  fps = read_fps(line, &error);
186  if (vst)
187  avpriv_set_pts_info(vst, 32, fps.den, fps.num);
188 
189  // Audio headers
190 
191  // ARMovie supports multiple audio tracks; I don't have any
192  // samples, though. This code will ignore additional tracks.
193  error |= read_line(pb, line, sizeof(line));
194  audio_format = read_int(line, &endptr, &error); // audio format ID
195  av_strlcpy(audio_codec, endptr, RPL_LINE_LENGTH);
196  if (audio_format) {
197  int channels;
198  ast = avformat_new_stream(s, NULL);
199  if (!ast)
200  return AVERROR(ENOMEM);
201  ast->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
202  ast->codecpar->codec_tag = audio_format;
203  ast->codecpar->sample_rate = read_line_and_int(pb, &error); // audio bitrate
204  channels = read_line_and_int(pb, &error); // number of audio channels
205  error |= read_line(pb, line, sizeof(line));
206  ast->codecpar->bits_per_coded_sample = read_int(line, &endptr, &error); // audio bits per sample
207  av_strlcpy(audio_type, endptr, RPL_LINE_LENGTH);
208  ast->codecpar->ch_layout.nb_channels = channels;
209  // At least one sample uses 0 for ADPCM, which is really 4 bits
210  // per sample.
211  if (ast->codecpar->bits_per_coded_sample == 0)
212  ast->codecpar->bits_per_coded_sample = 4;
213 
214  ast->codecpar->bit_rate = ast->codecpar->sample_rate *
215  (int64_t)ast->codecpar->ch_layout.nb_channels;
216  if (ast->codecpar->bit_rate > INT64_MAX / ast->codecpar->bits_per_coded_sample)
217  return AVERROR_INVALIDDATA;
218  ast->codecpar->bit_rate *= ast->codecpar->bits_per_coded_sample;
219 
220  ast->codecpar->codec_id = AV_CODEC_ID_NONE;
221  switch (audio_format) {
222  case 1:
223  if (ast->codecpar->bits_per_coded_sample == 16) {
224  // 16-bit audio is always signed
225  ast->codecpar->codec_id = AV_CODEC_ID_PCM_S16LE;
226  } else if (ast->codecpar->bits_per_coded_sample == 8) {
227  if (av_stristr(audio_type, "unsigned") != NULL)
228  ast->codecpar->codec_id = AV_CODEC_ID_PCM_U8;
229  else if (av_stristr(audio_type, "linear") != NULL)
230  ast->codecpar->codec_id = AV_CODEC_ID_PCM_S8;
231  else
232  ast->codecpar->codec_id = AV_CODEC_ID_PCM_VIDC;
233  }
234  // There are some other formats listed as legal per the spec;
235  // samples needed.
236  break;
237  case 2:
238  if (av_stristr(audio_codec, "adpcm") != NULL) {
239  ast->codecpar->codec_id = AV_CODEC_ID_ADPCM_IMA_ACORN;
240  }
241  break;
242  case 101:
243  if (ast->codecpar->bits_per_coded_sample == 8) {
244  // The samples with this kind of audio that I have
245  // are all unsigned.
246  ast->codecpar->codec_id = AV_CODEC_ID_PCM_U8;
247  } else if (ast->codecpar->bits_per_coded_sample == 4) {
248  ast->codecpar->codec_id = AV_CODEC_ID_ADPCM_IMA_EA_SEAD;
249  }
250  break;
251  }
252  if (ast->codecpar->codec_id == AV_CODEC_ID_NONE)
253  avpriv_request_sample(s, "Audio format %"PRId32" (%s)",
254  audio_format, audio_codec);
255  avpriv_set_pts_info(ast, 32, 1, ast->codecpar->bit_rate);
256  } else {
257  for (i = 0; i < 3; i++)
258  error |= read_line(pb, line, sizeof(line));
259  }
260 
261  if (s->nb_streams == 0)
262  return AVERROR_INVALIDDATA;
263 
264  rpl->frames_per_chunk = read_line_and_int(pb, &error); // video frames per chunk
265  if (vst && rpl->frames_per_chunk > 1 && vst->codecpar->codec_tag != 124)
267  "Don't know how to split frames for video format %s. "
268  "Video stream will be broken!\n", av_fourcc2str(vst->codecpar->codec_tag));
269 
270  number_of_chunks = read_line_and_int(pb, &error); // number of chunks in the file
271  if (number_of_chunks == INT_MAX)
272  return AVERROR_INVALIDDATA;
273 
274  // The number in the header is actually the index of the last chunk.
275  number_of_chunks++;
276 
277  error |= read_line(pb, line, sizeof(line)); // "even" chunk size in bytes
278  error |= read_line(pb, line, sizeof(line)); // "odd" chunk size in bytes
279  chunk_catalog_offset = // offset of the "chunk catalog"
280  read_line_and_int(pb, &error); // (file index)
281  error |= read_line(pb, line, sizeof(line)); // offset to "helpful" sprite
282  error |= read_line(pb, line, sizeof(line)); // size of "helpful" sprite
283  if (vst) {
284  error |= read_line(pb, line, sizeof(line)); // offset to key frame list
285  vst->duration = number_of_chunks * (int64_t)rpl->frames_per_chunk;
286  }
287 
288  // Read the index
289  avio_seek(pb, chunk_catalog_offset, SEEK_SET);
290  total_audio_size = 0;
291  for (i = 0; !error && i < number_of_chunks; i++) {
292  int64_t offset, video_size, audio_size;
293  error |= read_line(pb, line, sizeof(line));
294  if (3 != sscanf(line, "%"SCNd64" , %"SCNd64" ; %"SCNd64,
295  &offset, &video_size, &audio_size)) {
296  error = -1;
297  continue;
298  }
299  if (vst)
301  video_size, rpl->frames_per_chunk, 0);
302  if (ast)
303  av_add_index_entry(ast, offset + video_size, total_audio_size,
304  audio_size, audio_size * 8, 0);
305  if (total_audio_size/8 + (uint64_t)audio_size >= INT64_MAX/8)
306  return AVERROR_INVALIDDATA;
307  total_audio_size += audio_size * 8;
308  }
309 
310  if (error)
311  return AVERROR(EIO);
312 
313  return 0;
314 }
315 
317 {
318  RPLContext *rpl = s->priv_data;
319  AVIOContext *pb = s->pb;
320  AVStream* stream;
321  FFStream *sti;
322  AVIndexEntry* index_entry;
323  int ret;
324 
325  if (rpl->chunk_part == s->nb_streams) {
326  rpl->chunk_number++;
327  rpl->chunk_part = 0;
328  }
329 
330  stream = s->streams[rpl->chunk_part];
331  sti = ffstream(stream);
332 
333  if (rpl->chunk_number >= sti->nb_index_entries)
334  return AVERROR_EOF;
335 
336  index_entry = &sti->index_entries[rpl->chunk_number];
337 
338  if (rpl->frame_in_part == 0) {
339  if (avio_seek(pb, index_entry->pos, SEEK_SET) < 0)
340  return AVERROR(EIO);
341  }
342 
343  if (stream->codecpar->codec_type == AVMEDIA_TYPE_VIDEO &&
344  stream->codecpar->codec_tag == 124) {
345  // We have to split Escape 124 frames because there are
346  // multiple frames per chunk in Escape 124 samples.
347  uint32_t frame_size;
348 
349  avio_skip(pb, 4); /* flags */
350  frame_size = avio_rl32(pb);
351  if (avio_feof(pb) || avio_seek(pb, -8, SEEK_CUR) < 0 || !frame_size)
352  return AVERROR(EIO);
353 
355  if (ret < 0)
356  return ret;
357  if (ret != frame_size)
358  return AVERROR(EIO);
359 
360  pkt->duration = 1;
361  pkt->pts = index_entry->timestamp + rpl->frame_in_part;
362  pkt->stream_index = rpl->chunk_part;
363 
364  rpl->frame_in_part++;
365  if (rpl->frame_in_part == rpl->frames_per_chunk) {
366  rpl->frame_in_part = 0;
367  rpl->chunk_part++;
368  }
369  } else {
370  ret = av_get_packet(pb, pkt, index_entry->size);
371  if (ret < 0)
372  return ret;
373  if (ret != index_entry->size)
374  return AVERROR(EIO);
375 
376  if (stream->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) {
377  // frames_per_chunk should always be one here; the header
378  // parsing will warn if it isn't.
379  pkt->duration = rpl->frames_per_chunk;
380  } else {
381  // All the audio codecs supported in this container
382  // (at least so far) are constant-bitrate.
383  pkt->duration = ret * 8;
384  }
385  pkt->pts = index_entry->timestamp;
386  pkt->stream_index = rpl->chunk_part;
387  rpl->chunk_part++;
388  }
389 
390  // None of the Escape formats have keyframes, and the ADPCM
391  // format used doesn't have keyframes.
392  if (rpl->chunk_number == 0 && rpl->frame_in_part == 0)
394 
395  return ret;
396 }
397 
399  .name = "rpl",
400  .long_name = NULL_IF_CONFIG_SMALL("RPL / ARMovie"),
401  .priv_data_size = sizeof(RPLContext),
405 };
error
static void error(const char *err)
Definition: target_bsf_fuzzer.c:31
AV_CODEC_ID_PCM_S16LE
@ AV_CODEC_ID_PCM_S16LE
Definition: codec_id.h:330
AV_LOG_WARNING
#define AV_LOG_WARNING
Something somehow does not look correct.
Definition: log.h:186
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
AVCodecParameters::codec_type
enum AVMediaType codec_type
General type of the encoded data.
Definition: codec_par.h:51
RPLContext::chunk_number
uint32_t chunk_number
Definition: rpl.c:49
AV_CODEC_ID_ESCAPE130
@ AV_CODEC_ID_ESCAPE130
Definition: codec_id.h:222
RPLContext
Definition: rpl.c:44
av_stristr
char * av_stristr(const char *s1, const char *s2)
Locate the first case-independent occurrence in the string haystack of the string needle.
Definition: avstring.c:58
avformat_new_stream
AVStream * avformat_new_stream(AVFormatContext *s, const struct AVCodec *c)
Add a new stream to a media file.
AVERROR_EOF
#define AVERROR_EOF
End of file.
Definition: error.h:57
RPL_SIGNATURE_SIZE
#define RPL_SIGNATURE_SIZE
Definition: rpl.c:31
b
#define b
Definition: input.c:41
RPLContext::chunk_part
uint32_t chunk_part
Definition: rpl.c:50
AVPacket::duration
int64_t duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
Definition: packet.h:509
AVCodecParameters::codec_tag
uint32_t codec_tag
Additional information about the codec (corresponds to the AVI FOURCC).
Definition: codec_par.h:59
AV_PKT_FLAG_KEY
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
Definition: packet.h:546
AVIndexEntry
Definition: avformat.h:700
AVPROBE_SCORE_MAX
#define AVPROBE_SCORE_MAX
maximum score
Definition: avformat.h:464
avpriv_set_pts_info
void avpriv_set_pts_info(AVStream *st, int pts_wrap_bits, unsigned int pts_num, unsigned int pts_den)
Set the time base and wrapping info for a given stream.
Definition: avformat.c:761
RPL_LINE_LENGTH
#define RPL_LINE_LENGTH
256 is arbitrary, but should be big enough for any reasonable file.
Definition: rpl.c:34
ffstream
static av_always_inline FFStream * ffstream(AVStream *st)
Definition: internal.h:420
av_add_index_entry
int av_add_index_entry(AVStream *st, int64_t pos, int64_t timestamp, int size, int distance, int flags)
Add an index entry into a sorted list.
Definition: seek.c:120
AVStream::duration
int64_t duration
Decoding: duration of the stream, in stream time base.
Definition: avformat.h:900
av_reduce
int av_reduce(int *dst_num, int *dst_den, int64_t num, int64_t den, int64_t max)
Reduce a fraction.
Definition: rational.c:35
AVRational::num
int num
Numerator.
Definition: rational.h:59
AV_CODEC_ID_PCM_S8
@ AV_CODEC_ID_PCM_S8
Definition: codec_id.h:334
pkt
AVPacket * pkt
Definition: movenc.c:59
AVInputFormat
Definition: avformat.h:549
read_packet
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
Definition: avio_read_callback.c:41
read_int
static int32_t read_int(const char *line, const char **endptr, int *error)
Definition: rpl.c:71
AV_CODEC_ID_ADPCM_IMA_ACORN
@ AV_CODEC_ID_ADPCM_IMA_ACORN
Definition: codec_id.h:419
read_line
static int read_line(AVIOContext *pb, char *line, int bufsize)
Definition: rpl.c:54
s
#define s(width, name)
Definition: cbs_vp9.c:198
read_fps
static AVRational read_fps(const char *line, int *error)
Parsing for fps, which can be a fraction.
Definition: rpl.c:95
AV_CODEC_ID_ADPCM_IMA_EA_SEAD
@ AV_CODEC_ID_ADPCM_IMA_EA_SEAD
Definition: codec_id.h:392
AVInputFormat::name
const char * name
A comma separated list of short names for the format.
Definition: avformat.h:554
AVProbeData::buf
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
Definition: avformat.h:454
frame_size
int frame_size
Definition: mxfenc.c:2311
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
AVCodecParameters::width
int width
Video only.
Definition: codec_par.h:121
AVIndexEntry::size
int size
Definition: avformat.h:711
AVIndexEntry::timestamp
int64_t timestamp
Timestamp in AVStream.time_base units, preferably the time from which on correctly decoded frames are...
Definition: avformat.h:702
channels
channels
Definition: aptx.h:31
if
if(ret)
Definition: filter_design.txt:179
AVFormatContext
Format I/O context.
Definition: avformat.h:1115
internal.h
AVStream::codecpar
AVCodecParameters * codecpar
Codec parameters associated with this stream.
Definition: avformat.h:864
read_header
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:550
result
and forward the result(frame or status change) to the corresponding input. If nothing is possible
NULL
#define NULL
Definition: coverity.c:32
AVRational
Rational number (pair of numerator and denominator).
Definition: rational.h:58
FFStream::nb_index_entries
int nb_index_entries
Definition: internal.h:256
AVProbeData
This structure contains the data a format has to probe a file.
Definition: avformat.h:452
rpl_read_header
static int rpl_read_header(AVFormatContext *s)
Definition: rpl.c:115
AV_CODEC_ID_PCM_VIDC
@ AV_CODEC_ID_PCM_VIDC
Definition: codec_id.h:365
avio_rl32
unsigned int avio_rl32(AVIOContext *s)
Definition: aviobuf.c:777
AVIOContext
Bytestream IO Context.
Definition: avio.h:166
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:106
FFStream
Definition: internal.h:199
avpriv_report_missing_feature
void avpriv_report_missing_feature(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message about a missing feature.
avio_r8
int avio_r8(AVIOContext *s)
Definition: aviobuf.c:650
RPL_SIGNATURE
#define RPL_SIGNATURE
Definition: rpl.c:30
offset
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf offset
Definition: writing_filters.txt:86
line
Definition: graph2dot.c:48
AVPacket::flags
int flags
A combination of AV_PKT_FLAG values.
Definition: packet.h:497
AV_CODEC_ID_NONE
@ AV_CODEC_ID_NONE
Definition: codec_id.h:50
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:255
AVPacket::pts
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
Definition: packet.h:484
rpl_probe
static int rpl_probe(const AVProbeData *p)
Definition: rpl.c:36
AVCodecParameters::height
int height
Definition: codec_par.h:122
ff_rpl_demuxer
const AVInputFormat ff_rpl_demuxer
Definition: rpl.c:398
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:103
ret
ret
Definition: filter_design.txt:187
AVStream
Stream structure.
Definition: avformat.h:841
avio_seek
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
Definition: aviobuf.c:278
avformat.h
dict.h
AV_CODEC_ID_ESCAPE124
@ AV_CODEC_ID_ESCAPE124
Definition: codec_id.h:167
read_line_and_int
static int32_t read_line_and_int(AVIOContext *pb, int *error)
Definition: rpl.c:83
AVRational::den
int den
Denominator.
Definition: rational.h:60
AVIndexEntry::pos
int64_t pos
Definition: avformat.h:701
AVPacket::stream_index
int stream_index
Definition: packet.h:493
avio_skip
int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
Definition: aviobuf.c:365
FFStream::index_entries
AVIndexEntry * index_entries
Only used if the format does not support seeking natively.
Definition: internal.h:254
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
read_probe
static int read_probe(const AVProbeData *p)
Definition: cdg.c:29
AVCodecParameters::bits_per_coded_sample
int bits_per_coded_sample
The number of bits per sample in the codedwords.
Definition: codec_par.h:97
AV_CODEC_ID_PCM_U8
@ AV_CODEC_ID_PCM_U8
Definition: codec_id.h:335
avpriv_request_sample
#define avpriv_request_sample(...)
Definition: tableprint_vlc.h:36
RPLContext::frame_in_part
uint32_t frame_in_part
Definition: rpl.c:51
rpl_read_packet
static int rpl_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: rpl.c:316
AVCodecParameters::codec_id
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
Definition: codec_par.h:55
AVPacket
This structure stores compressed data.
Definition: packet.h:468
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:88
int32_t
int32_t
Definition: audioconvert.c:56
av_strlcpy
size_t av_strlcpy(char *dst, const char *src, size_t size)
Copy the string src to dst, but no more than size - 1 bytes, and null-terminate dst.
Definition: avstring.c:85
av_log
#define av_log(a,...)
Definition: tableprint_vlc.h:27
AVERROR_INVALIDDATA
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
Definition: error.h:61
avstring.h
line
The official guide to swscale for confused that consecutive non overlapping rectangles of slice_bottom special converter These generally are unscaled converters of common like for each output line the vertical scaler pulls lines from a ring buffer When the ring buffer does not contain the wanted line
Definition: swscale.txt:40
RPLContext::frames_per_chunk
int32_t frames_per_chunk
Definition: rpl.c:46
av_fourcc2str
#define av_fourcc2str(fourcc)
Definition: avutil.h:358
avio_feof
int avio_feof(AVIOContext *s)
Similar to feof() but also returns nonzero on read errors.
Definition: aviobuf.c:393