annotate vorbiscomment.h @ 6491:b7f807b4cd88 libavformat tip

In mov demuxer, check that nb_streams is valid before using it in read_dac3
author bcoudurier
date Tue, 28 Sep 2010 00:33:21 +0000
parents fa244b4fe683
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5857
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
1 /*
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
2 * VorbisComment writer
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
3 * Copyright (c) 2009 James Darnley
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
4 *
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
5 * This file is part of FFmpeg.
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
6 *
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
7 * FFmpeg is free software; you can redistribute it and/or
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
8 * modify it under the terms of the GNU Lesser General Public
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
9 * License as published by the Free Software Foundation; either
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
10 * version 2.1 of the License, or (at your option) any later version.
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
11 *
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
12 * FFmpeg is distributed in the hope that it will be useful,
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
15 * Lesser General Public License for more details.
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
16 *
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
17 * You should have received a copy of the GNU Lesser General Public
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
18 * License along with FFmpeg; if not, write to the Free Software
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
20 */
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
21
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
22 #ifndef AVFORMAT_VORBISCOMMENT_H
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
23 #define AVFORMAT_VORBISCOMMENT_H
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
24
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
25 #include "avformat.h"
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
26 #include "metadata.h"
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
27
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
28 /**
6199
fa244b4fe683 Fix grammar errors in documentation
mru
parents: 5857
diff changeset
29 * Calculate the length in bytes of a VorbisComment. This is the minimum
5857
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
30 * size required by ff_vorbiscomment_write().
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
31 *
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
32 * @param m The metadata structure to be parsed. For no metadata, set to NULL.
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
33 * @param vendor_string The vendor string to be added into the VorbisComment.
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
34 * For no string, set to an empty string.
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
35 * @param count Pointer to store the number of tags in m because m->count is "not allowed"
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
36 * @return The length in bytes.
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
37 */
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
38 int ff_vorbiscomment_length(AVMetadata *m, const char *vendor_string,
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
39 unsigned *count);
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
40
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
41 /**
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
42 * Writes a VorbisComment into a buffer. The buffer, p, must have enough
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
43 * data to hold the whole VorbisComment. The minimum size required can be
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
44 * obtained by passing the same AVMetadata and vendor_string to
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
45 * ff_vorbiscomment_length()
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
46 *
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
47 * @param p The buffer in which to write.
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
48 * @param m The metadata struct to write.
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
49 * @param vendor_string The vendor string to write.
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
50 * @param count The number of tags in m because m->count is "not allowed"
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
51 */
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
52 int ff_vorbiscomment_write(uint8_t **p, AVMetadata *m,
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
53 const char *vendor_string, const unsigned count);
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
54
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
55 extern const AVMetadataConv ff_vorbiscomment_metadata_conv[];
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
56
121d6994c20e Add VorbisComment writing to FLAC files.
jbr
parents:
diff changeset
57 #endif /* AVFORMAT_VORBISCOMMENT_H */