FFmpeg
au.c
Go to the documentation of this file.
1 /*
2  * AU muxer and demuxer
3  * Copyright (c) 2001 Fabrice Bellard
4  *
5  * first version by Francois Revol <revol@free.fr>
6  *
7  * This file is part of FFmpeg.
8  *
9  * FFmpeg is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2.1 of the License, or (at your option) any later version.
13  *
14  * FFmpeg is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with FFmpeg; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22  */
23 
24 /*
25  * Reference documents:
26  * http://www.opengroup.org/public/pubs/external/auformat.html
27  * http://www.goice.co.jp/member/mo/formats/au.html
28  */
29 
30 #include "config_components.h"
31 
32 #include "libavutil/bprint.h"
33 #include "libavutil/intreadwrite.h"
34 #include "libavutil/mem.h"
35 #include "avformat.h"
36 #include "demux.h"
37 #include "internal.h"
38 #include "avio_internal.h"
39 #include "mux.h"
40 #include "pcm.h"
41 #include "libavutil/avassert.h"
42 
43 /* if we don't know the size in advance */
44 #define AU_UNKNOWN_SIZE ((uint32_t)(~0))
45 
46 static const AVCodecTag codec_au_tags[] = {
47  { AV_CODEC_ID_PCM_MULAW, 1 },
48  { AV_CODEC_ID_PCM_S8, 2 },
49  { AV_CODEC_ID_PCM_S16BE, 3 },
50  { AV_CODEC_ID_PCM_S24BE, 4 },
51  { AV_CODEC_ID_PCM_S32BE, 5 },
52  { AV_CODEC_ID_PCM_F32BE, 6 },
53  { AV_CODEC_ID_PCM_F64BE, 7 },
58  { AV_CODEC_ID_PCM_ALAW, 27 },
59  { AV_CODEC_ID_ADPCM_G726LE, MKBETAG('7','2','6','2') },
60  { AV_CODEC_ID_NONE, 0 },
61 };
62 
63 static const AVCodecTag *const au_codec_tags[] = { codec_au_tags, NULL };
64 
65 #if CONFIG_AU_DEMUXER
66 
67 static int au_probe(const AVProbeData *p)
68 {
69  if (p->buf_size < 24 ||
70  AV_RL32(p->buf) != MKTAG('.', 's', 'n', 'd') ||
71  AV_RN32(p->buf+4) == 0 ||
72  AV_RN32(p->buf+8) == 0 ||
73  AV_RN32(p->buf+12) == 0 ||
74  AV_RN32(p->buf+16) == 0 ||
75  AV_RN32(p->buf+20) == 0)
76  return 0;
77  return AVPROBE_SCORE_MAX;
78 }
79 
80 static int au_read_annotation(AVFormatContext *s, int size)
81 {
82  static const char keys[][7] = {
83  "title",
84  "artist",
85  "album",
86  "track",
87  "genre",
88  };
89  AVIOContext *pb = s->pb;
90  enum { PARSE_KEY, PARSE_VALUE, PARSE_FINISHED } state = PARSE_KEY;
91  char c;
92  AVBPrint bprint;
93  char * key = NULL;
94  char * value = NULL;
95  int ret, i;
96 
98 
99  while (size-- > 0) {
100  if (avio_feof(pb)) {
101  av_bprint_finalize(&bprint, NULL);
102  av_freep(&key);
103  return AVERROR_EOF;
104  }
105  c = avio_r8(pb);
106  switch(state) {
107  case PARSE_KEY:
108  if (c == '\0') {
109  state = PARSE_FINISHED;
110  } else if (c == '=') {
111  ret = av_bprint_finalize(&bprint, &key);
112  if (ret < 0)
113  return ret;
115  state = PARSE_VALUE;
116  } else {
117  av_bprint_chars(&bprint, c, 1);
118  }
119  break;
120  case PARSE_VALUE:
121  if (c == '\0' || c == '\n') {
122  if (av_bprint_finalize(&bprint, &value) != 0) {
123  av_log(s, AV_LOG_ERROR, "Memory error while parsing AU metadata.\n");
124  } else {
126  for (i = 0; i < FF_ARRAY_ELEMS(keys); i++) {
127  if (av_strcasecmp(keys[i], key) == 0) {
128  av_dict_set(&(s->metadata), keys[i], value, AV_DICT_DONT_STRDUP_VAL);
129  value = NULL;
130  break;
131  }
132  }
133  }
134  av_freep(&key);
135  av_freep(&value);
136  state = (c == '\0') ? PARSE_FINISHED : PARSE_KEY;
137  } else {
138  av_bprint_chars(&bprint, c, 1);
139  }
140  break;
141  case PARSE_FINISHED:
142  break;
143  default:
144  /* should never happen */
145  av_assert0(0);
146  }
147  }
148  av_bprint_finalize(&bprint, NULL);
149  av_freep(&key);
150  return 0;
151 }
152 
153 #define BLOCK_SIZE 1024
154 
155 static int au_read_header(AVFormatContext *s)
156 {
157  int size, data_size = 0;
158  unsigned int tag;
159  AVIOContext *pb = s->pb;
160  unsigned int id, channels, rate;
161  int bps, ba = 0;
162  enum AVCodecID codec;
163  AVStream *st;
164  int ret;
165 
166  tag = avio_rl32(pb);
167  if (tag != MKTAG('.', 's', 'n', 'd'))
168  return AVERROR_INVALIDDATA;
169  size = avio_rb32(pb); /* header size */
170  data_size = avio_rb32(pb); /* data size in bytes */
171 
172  if (data_size < 0 && data_size != AU_UNKNOWN_SIZE) {
173  av_log(s, AV_LOG_ERROR, "Invalid negative data size '%d' found\n", data_size);
174  return AVERROR_INVALIDDATA;
175  }
176 
177  id = avio_rb32(pb);
178  rate = avio_rb32(pb);
179  channels = avio_rb32(pb);
180 
181  if (size > 24) {
182  /* parse annotation field to get metadata */
183  ret = au_read_annotation(s, size - 24);
184  if (ret < 0)
185  return ret;
186  }
187 
188  codec = ff_codec_get_id(codec_au_tags, id);
189 
190  if (codec == AV_CODEC_ID_NONE) {
191  avpriv_request_sample(s, "unknown or unsupported codec tag: %u", id);
192  return AVERROR_PATCHWELCOME;
193  }
194 
195  bps = av_get_bits_per_sample(codec);
196  if (codec == AV_CODEC_ID_ADPCM_G726LE) {
197  if (id == MKBETAG('7','2','6','2')) {
198  bps = 2;
199  } else {
200  const uint8_t bpcss[] = {4, 0, 3, 5};
201  av_assert0(id >= 23 && id < 23 + 4);
202  ba = bpcss[id - 23];
203  bps = bpcss[id - 23];
204  }
205  } else if (!bps) {
206  avpriv_request_sample(s, "Unknown bits per sample");
207  return AVERROR_PATCHWELCOME;
208  }
209 
210  if (channels == 0 || channels >= INT_MAX / (BLOCK_SIZE * bps >> 3)) {
211  av_log(s, AV_LOG_ERROR, "Invalid number of channels %u\n", channels);
212  return AVERROR_INVALIDDATA;
213  }
214 
215  if (rate == 0 || rate > INT_MAX) {
216  av_log(s, AV_LOG_ERROR, "Invalid sample rate: %u\n", rate);
217  return AVERROR_INVALIDDATA;
218  }
219 
220  st = avformat_new_stream(s, NULL);
221  if (!st)
222  return AVERROR(ENOMEM);
224  st->codecpar->codec_tag = id;
225  st->codecpar->codec_id = codec;
227  st->codecpar->sample_rate = rate;
229  st->codecpar->bit_rate = channels * rate * bps;
230  st->codecpar->block_align = ba ? ba : FFMAX(bps * channels / 8, 1);
231  if (data_size != AU_UNKNOWN_SIZE)
232  st->duration = (((int64_t)data_size)<<3) / (channels * (int64_t)bps);
233 
234  st->start_time = 0;
235  avpriv_set_pts_info(st, 64, 1, rate);
236 
237  return 0;
238 }
239 
241  .p.name = "au",
242  .p.long_name = NULL_IF_CONFIG_SMALL("Sun AU"),
243  .p.codec_tag = au_codec_tags,
244  .read_probe = au_probe,
245  .read_header = au_read_header,
246  .read_packet = ff_pcm_read_packet,
247  .read_seek = ff_pcm_read_seek,
248 };
249 
250 #endif /* CONFIG_AU_DEMUXER */
251 
252 #if CONFIG_AU_MUXER
253 
254 typedef struct AUContext {
255  uint32_t header_size;
256 } AUContext;
257 
258 #include "rawenc.h"
259 
260 static int au_get_annotations(AVFormatContext *s, AVBPrint *annotations)
261 {
262  static const char keys[][7] = {
263  "Title",
264  "Artist",
265  "Album",
266  "Track",
267  "Genre",
268  };
269  int cnt = 0;
270  AVDictionary *m = s->metadata;
271  AVDictionaryEntry *t = NULL;
272 
273  for (int i = 0; i < FF_ARRAY_ELEMS(keys); i++) {
274  t = av_dict_get(m, keys[i], NULL, 0);
275  if (t != NULL) {
276  if (cnt++)
277  av_bprint_chars(annotations, '\n', 1);
278  av_bprintf(annotations, "%s=%s", keys[i], t->value);
279  }
280  }
281  /* The specification requires the annotation field to be zero-terminated
282  * and its length to be a multiple of eight, so pad with 0's */
283  av_bprint_chars(annotations, '\0', 8);
284  return av_bprint_is_complete(annotations) ? 0 : AVERROR(ENOMEM);
285 }
286 
287 static int au_write_header(AVFormatContext *s)
288 {
289  int ret;
290  AUContext *au = s->priv_data;
291  AVIOContext *pb = s->pb;
292  AVCodecParameters *par = s->streams[0]->codecpar;
293  AVBPrint annotations;
294 
296  if (!par->codec_tag) {
297  av_log(s, AV_LOG_ERROR, "unsupported codec\n");
298  return AVERROR(EINVAL);
299  }
300 
301  av_bprint_init(&annotations, 0, INT_MAX - 24);
302  ret = au_get_annotations(s, &annotations);
303  if (ret < 0)
304  goto fail;
305  au->header_size = 24 + annotations.len & ~7;
306 
307  ffio_wfourcc(pb, ".snd"); /* magic number */
308  avio_wb32(pb, au->header_size); /* header size */
309  avio_wb32(pb, AU_UNKNOWN_SIZE); /* data size */
310  avio_wb32(pb, par->codec_tag); /* codec ID */
311  avio_wb32(pb, par->sample_rate);
312  avio_wb32(pb, par->ch_layout.nb_channels);
313  avio_write(pb, annotations.str, annotations.len & ~7);
314 
315 fail:
316  av_bprint_finalize(&annotations, NULL);
317 
318  return ret;
319 }
320 
321 static int au_write_trailer(AVFormatContext *s)
322 {
323  AVIOContext *pb = s->pb;
324  AUContext *au = s->priv_data;
325  int64_t file_size = avio_tell(pb);
326 
327  if ((s->pb->seekable & AVIO_SEEKABLE_NORMAL) && file_size < INT32_MAX) {
328  /* update file size */
329  avio_seek(pb, 8, SEEK_SET);
330  avio_wb32(pb, (uint32_t)(file_size - au->header_size));
331  avio_seek(pb, file_size, SEEK_SET);
332  }
333 
334  return 0;
335 }
336 
337 const FFOutputFormat ff_au_muxer = {
338  .p.name = "au",
339  .p.long_name = NULL_IF_CONFIG_SMALL("Sun AU"),
340  .p.mime_type = "audio/basic",
341  .p.extensions = "au",
342  .p.codec_tag = au_codec_tags,
343  .p.audio_codec = AV_CODEC_ID_PCM_S16BE,
344  .p.video_codec = AV_CODEC_ID_NONE,
345  .p.subtitle_codec = AV_CODEC_ID_NONE,
346  .p.flags = AVFMT_NOTIMESTAMPS,
347  .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
348  .priv_data_size = sizeof(AUContext),
349  .write_header = au_write_header,
351  .write_trailer = au_write_trailer,
352 };
353 
354 #endif /* CONFIG_AU_MUXER */
ff_au_muxer
const FFOutputFormat ff_au_muxer
AV_BPRINT_SIZE_UNLIMITED
#define AV_BPRINT_SIZE_UNLIMITED
AV_CODEC_ID_PCM_F32BE
@ AV_CODEC_ID_PCM_F32BE
Definition: codec_id.h:354
codec_au_tags
static const AVCodecTag codec_au_tags[]
Definition: au.c:46
AVOutputFormat::name
const char * name
Definition: avformat.h:510
av_bprint_is_complete
static int av_bprint_is_complete(const AVBPrint *buf)
Test if the print buffer is complete (not truncated).
Definition: bprint.h:218
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
pcm.h
AVCodecParameters::codec_type
enum AVMediaType codec_type
General type of the encoded data.
Definition: codec_par.h:51
ffio_wfourcc
static av_always_inline void ffio_wfourcc(AVIOContext *pb, const uint8_t *s)
Definition: avio_internal.h:124
av_bprint_init
void av_bprint_init(AVBPrint *buf, unsigned size_init, unsigned size_max)
Definition: bprint.c:69
AVCodecParameters
This struct describes the properties of an encoded stream.
Definition: codec_par.h:47
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
AVFMT_NOTIMESTAMPS
#define AVFMT_NOTIMESTAMPS
Format does not need / have any timestamps.
Definition: avformat.h:479
int64_t
long long int64_t
Definition: coverity.c:34
av_strcasecmp
int av_strcasecmp(const char *a, const char *b)
Locale-independent case-insensitive compare.
Definition: avstring.c:207
AV_CODEC_ID_ADPCM_G722
@ AV_CODEC_ID_ADPCM_G722
Definition: codec_id.h:401
AVCodecParameters::codec_tag
uint32_t codec_tag
Additional information about the codec (corresponds to the AVI FOURCC).
Definition: codec_par.h:59
AVDictionary
Definition: dict.c:34
AVProbeData::buf_size
int buf_size
Size of buf except extra allocated bytes.
Definition: avformat.h:454
FFMAX
#define FFMAX(a, b)
Definition: macros.h:47
AVChannelLayout::nb_channels
int nb_channels
Number of channels in this layout.
Definition: channel_layout.h:327
FFOutputFormat::p
AVOutputFormat p
The public AVOutputFormat.
Definition: mux.h:65
au_codec_tags
static const AVCodecTag *const au_codec_tags[]
Definition: au.c:63
AVPROBE_SCORE_MAX
#define AVPROBE_SCORE_MAX
maximum score
Definition: avformat.h:463
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:867
AV_CODEC_ID_PCM_S16BE
@ AV_CODEC_ID_PCM_S16BE
Definition: codec_id.h:335
fail
#define fail()
Definition: checkasm.h:193
avio_tell
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
Definition: avio.h:494
AVStream::duration
int64_t duration
Decoding: duration of the stream, in stream time base.
Definition: avformat.h:807
AV_DICT_DONT_STRDUP_VAL
#define AV_DICT_DONT_STRDUP_VAL
Take ownership of a value that's been allocated with av_malloc() or another memory allocation functio...
Definition: dict.h:79
av_get_bits_per_sample
int av_get_bits_per_sample(enum AVCodecID codec_id)
Return codec bits per sample.
Definition: utils.c:550
AV_CODEC_ID_PCM_S8
@ AV_CODEC_ID_PCM_S8
Definition: codec_id.h:338
avassert.h
avio_rb32
unsigned int avio_rb32(AVIOContext *s)
Definition: aviobuf.c:761
AV_LOG_ERROR
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:209
FF_ARRAY_ELEMS
#define FF_ARRAY_ELEMS(a)
Definition: sinewin_tablegen.c:29
AVCodecTag
Definition: internal.h:42
av_dict_get
AVDictionaryEntry * av_dict_get(const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
Get a dictionary entry with matching key.
Definition: dict.c:62
intreadwrite.h
s
#define s(width, name)
Definition: cbs_vp9.c:198
AVInputFormat::name
const char * name
A comma separated list of short names for the format.
Definition: avformat.h:553
AVProbeData::buf
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
Definition: avformat.h:453
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
av_assert0
#define av_assert0(cond)
assert() equivalent, that is always enabled.
Definition: avassert.h:40
channels
channels
Definition: aptx.h:31
ff_raw_write_packet
int ff_raw_write_packet(AVFormatContext *s, AVPacket *pkt)
Definition: rawenc.c:31
AV_CODEC_ID_PCM_MULAW
@ AV_CODEC_ID_PCM_MULAW
Definition: codec_id.h:340
key
const char * key
Definition: hwcontext_opencl.c:189
AVFormatContext
Format I/O context.
Definition: avformat.h:1300
AV_CODEC_ID_PCM_ALAW
@ AV_CODEC_ID_PCM_ALAW
Definition: codec_id.h:341
internal.h
AVStream::codecpar
AVCodecParameters * codecpar
Codec parameters associated with this stream.
Definition: avformat.h:771
NULL
#define NULL
Definition: coverity.c:32
AVERROR_PATCHWELCOME
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
Definition: error.h:64
write_trailer
static int write_trailer(AVFormatContext *s1)
Definition: v4l2enc.c:101
state
static struct @466 state
AV_RN32
#define AV_RN32(p)
Definition: intreadwrite.h:360
AVProbeData
This structure contains the data a format has to probe a file.
Definition: avformat.h:451
FFOutputFormat
Definition: mux.h:61
AVCodecParameters::ch_layout
AVChannelLayout ch_layout
Audio only.
Definition: codec_par.h:180
c
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
Definition: undefined.txt:32
AVCodecParameters::sample_rate
int sample_rate
Audio only.
Definition: codec_par.h:184
AVCodecID
AVCodecID
Identify the syntax and semantics of the bitstream.
Definition: codec_id.h:49
avio_rl32
unsigned int avio_rl32(AVIOContext *s)
Definition: aviobuf.c:730
AVIOContext
Bytestream IO Context.
Definition: avio.h:160
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:94
ff_codec_get_id
enum AVCodecID ff_codec_get_id(const AVCodecTag *tags, unsigned int tag)
Definition: utils.c:133
av_bprint_finalize
int av_bprint_finalize(AVBPrint *buf, char **ret_str)
Finalize a print buffer.
Definition: bprint.c:240
bps
unsigned bps
Definition: movenc.c:1880
size
int size
Definition: twinvq_data.h:10344
ff_au_demuxer
const FFInputFormat ff_au_demuxer
MKBETAG
#define MKBETAG(a, b, c, d)
Definition: macros.h:56
FFInputFormat::p
AVInputFormat p
The public AVInputFormat.
Definition: demux.h:46
avio_write
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
Definition: aviobuf.c:201
avio_wb32
void avio_wb32(AVIOContext *s, unsigned int val)
Definition: aviobuf.c:365
avio_r8
int avio_r8(AVIOContext *s)
Definition: aviobuf.c:603
rawenc.h
bprint.h
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:256
avio_internal.h
AVCodecParameters::block_align
int block_align
Audio only.
Definition: codec_par.h:191
FF_OFMT_FLAG_MAX_ONE_OF_EACH
#define FF_OFMT_FLAG_MAX_ONE_OF_EACH
If this flag is set, it indicates that for each codec type whose corresponding default codec (i....
Definition: mux.h:50
AV_CODEC_ID_PCM_F64BE
@ AV_CODEC_ID_PCM_F64BE
Definition: codec_id.h:356
value
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 default value
Definition: writing_filters.txt:86
AV_CODEC_ID_PCM_S32BE
@ AV_CODEC_ID_PCM_S32BE
Definition: codec_id.h:343
demux.h
ff_pcm_read_packet
int ff_pcm_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: pcm.c:57
write_packet
static int write_packet(Muxer *mux, OutputStream *ost, AVPacket *pkt)
Definition: ffmpeg_mux.c:209
tag
uint32_t tag
Definition: movenc.c:1879
ret
ret
Definition: filter_design.txt:187
AVStream
Stream structure.
Definition: avformat.h:748
avio_seek
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
Definition: aviobuf.c:231
ff_pcm_read_seek
int ff_pcm_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
Definition: pcm.c:73
avformat.h
av_bprintf
void av_bprintf(AVBPrint *buf, const char *fmt,...)
Definition: bprint.c:99
id
enum AVCodecID id
Definition: dts2pts.c:367
AV_RL32
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_RL32
Definition: bytestream.h:92
AV_CODEC_ID_ADPCM_G726LE
@ AV_CODEC_ID_ADPCM_G726LE
Definition: codec_id.h:408
AVIO_SEEKABLE_NORMAL
#define AVIO_SEEKABLE_NORMAL
Seeking works like for a local file.
Definition: avio.h:41
ff_codec_get_tag
unsigned int ff_codec_get_tag(const AVCodecTag *tags, enum AVCodecID id)
Definition: utils.c:123
AU_UNKNOWN_SIZE
#define AU_UNKNOWN_SIZE
Definition: au.c:44
AVCodecParameters::bits_per_coded_sample
int bits_per_coded_sample
The number of bits per sample in the codedwords.
Definition: codec_par.h:110
mem.h
avpriv_request_sample
#define avpriv_request_sample(...)
Definition: tableprint_vlc.h:36
AVDictionaryEntry
Definition: dict.h:89
AVCodecParameters::codec_id
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
Definition: codec_par.h:55
av_freep
#define av_freep(p)
Definition: tableprint_vlc.h:34
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
FFInputFormat
Definition: demux.h:42
AVCodecParameters::bit_rate
int64_t bit_rate
The average bitrate of the encoded data (in bits per second).
Definition: codec_par.h:97
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
MKTAG
#define MKTAG(a, b, c, d)
Definition: macros.h:55
av_bprint_chars
void av_bprint_chars(AVBPrint *buf, char c, unsigned n)
Append char c n times to a print buffer.
Definition: bprint.c:145
BLOCK_SIZE
#define BLOCK_SIZE
Definition: adx.h:51
AVDictionaryEntry::value
char * value
Definition: dict.h:91
AVStream::start_time
int64_t start_time
Decoding: pts of the first frame of the stream in presentation order, in stream time base.
Definition: avformat.h:797
write_header
static void write_header(FFV1Context *f)
Definition: ffv1enc.c:348
AV_CODEC_ID_PCM_S24BE
@ AV_CODEC_ID_PCM_S24BE
Definition: codec_id.h:347
avio_feof
int avio_feof(AVIOContext *s)
Similar to feof() but also returns nonzero on read errors.
Definition: aviobuf.c:346
mux.h