Commit 22e77e44 authored by Diego Biurrun's avatar Diego Biurrun

spelling/wording/grammar cosmetics

Originally committed as revision 17589 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent e0cffbe7
...@@ -79,24 +79,24 @@ typedef struct { ...@@ -79,24 +79,24 @@ typedef struct {
typedef struct AVMetadata AVMetadata; typedef struct AVMetadata AVMetadata;
/** /**
* gets a metadata element with matching key. * Gets a metadata element with matching key.
* @param prev set to the previous matching element to find the next. * @param prev Set to the previous matching element to find the next.
* @param flags allows case as well as suffix insensitive comparisons. * @param flags Allows case as well as suffix-insensitive comparisons.
* @return found tag or NULL, changing key or value leads to undefined behavior. * @return Found tag or NULL, changing key or value leads to undefined behavior.
*/ */
AVMetadataTag * AVMetadataTag *
av_metadata_get(AVMetadata *m, const char *key, const AVMetadataTag *prev, int flags); av_metadata_get(AVMetadata *m, const char *key, const AVMetadataTag *prev, int flags);
/** /**
* sets the given tag in m, overwriting an existing tag. * Sets the given tag in m, overwriting an existing tag.
* @param key tag key to add to m (will be av_strduped). * @param key tag key to add to m (will be av_strduped)
* @param value tag value to add to m (will be av_strduped). * @param value tag value to add to m (will be av_strduped)
* @return >= 0 if success otherwise error code that is <0. * @return >= 0 on success otherwise an error code <0
*/ */
int av_metadata_set(AVMetadata **pm, const char *key, const char *value); int av_metadata_set(AVMetadata **pm, const char *key, const char *value);
/** /**
* Free all the memory allocated for an AVMetadata struct. * Frees all the memory allocated for an AVMetadata struct.
*/ */
void av_metadata_free(AVMetadata **m); void av_metadata_free(AVMetadata **m);
...@@ -105,19 +105,18 @@ void av_metadata_free(AVMetadata **m); ...@@ -105,19 +105,18 @@ void av_metadata_free(AVMetadata **m);
typedef struct AVPacket { typedef struct AVPacket {
/** /**
* Presentation timestamp in time_base units. * Presentation timestamp in time_base units; the time at which the
* This is the time at which the decompressed packet will be presented * decompressed packet will be presented to the user.
* to the user.
* Can be AV_NOPTS_VALUE if it is not stored in the file. * Can be AV_NOPTS_VALUE if it is not stored in the file.
* pts MUST be larger or equal to dts as presentation cannot happen before * pts MUST be larger or equal to dts as presentation cannot happen before
* decompression, unless one wants to view hex dumps. Some formats misuse * decompression, unless one wants to view hex dumps. Some formats misuse
* the terms dts and pts/cts to mean something different, these timestamps * the terms dts and pts/cts to mean something different. Such timestamps
* must be converted to true pts/dts before they are stored in AVPacket. * must be converted to true pts/dts before they are stored in AVPacket.
*/ */
int64_t pts; int64_t pts;
/** /**
* Decompression timestamp in time_base units. * Decompression timestamp in time_base units; the time at which the
* This is the time at which the packet is decompressed. * packet is decompressed.
* Can be AV_NOPTS_VALUE if it is not stored in the file. * Can be AV_NOPTS_VALUE if it is not stored in the file.
*/ */
int64_t dts; int64_t dts;
...@@ -230,7 +229,7 @@ typedef struct AVProbeData { ...@@ -230,7 +229,7 @@ typedef struct AVProbeData {
int buf_size; int buf_size;
} AVProbeData; } AVProbeData;
#define AVPROBE_SCORE_MAX 100 ///< Maximum score, half of that is used for file-extension-based detection. #define AVPROBE_SCORE_MAX 100 ///< maximum score, half of that is used for file-extension-based detection
#define AVPROBE_PADDING_SIZE 32 ///< extra allocated bytes at the end of the probe buffer #define AVPROBE_PADDING_SIZE 32 ///< extra allocated bytes at the end of the probe buffer
typedef struct AVFormatParameters { typedef struct AVFormatParameters {
...@@ -277,7 +276,7 @@ typedef struct AVOutputFormat { ...@@ -277,7 +276,7 @@ typedef struct AVOutputFormat {
const char *long_name; const char *long_name;
const char *mime_type; const char *mime_type;
const char *extensions; /**< comma-separated filename extensions */ const char *extensions; /**< comma-separated filename extensions */
/** Size of private data so that it can be allocated in the wrapper. */ /** size of private data so that it can be allocated in the wrapper */
int priv_data_size; int priv_data_size;
/* output support */ /* output support */
enum CodecID audio_codec; /**< default audio codec */ enum CodecID audio_codec; /**< default audio codec */
...@@ -294,7 +293,7 @@ typedef struct AVOutputFormat { ...@@ -294,7 +293,7 @@ typedef struct AVOutputFormat {
/** /**
* List of supported codec_id-codec_tag pairs, ordered by "better * List of supported codec_id-codec_tag pairs, ordered by "better
* choice first". The arrays are all CODEC_ID_NONE terminated. * choice first". The arrays are all terminated by CODEC_ID_NONE.
*/ */
const struct AVCodecTag * const *codec_tag; const struct AVCodecTag * const *codec_tag;
...@@ -315,7 +314,7 @@ typedef struct AVInputFormat { ...@@ -315,7 +314,7 @@ typedef struct AVInputFormat {
/** Size of private data so that it can be allocated in the wrapper. */ /** Size of private data so that it can be allocated in the wrapper. */
int priv_data_size; int priv_data_size;
/** /**
* Tell if a given file has a chance of being parsed by this format. * Tell if a given file has a chance of being parsed as this format.
* The buffer provided is guaranteed to be AVPROBE_PADDING_SIZE bytes * The buffer provided is guaranteed to be AVPROBE_PADDING_SIZE bytes
* big so you do not have to check for that unless you need more. * big so you do not have to check for that unless you need more.
*/ */
...@@ -338,9 +337,9 @@ typedef struct AVInputFormat { ...@@ -338,9 +337,9 @@ typedef struct AVInputFormat {
/** /**
* Seek to a given timestamp relative to the frames in * Seek to a given timestamp relative to the frames in
* stream component stream_index. * stream component stream_index.
* @param stream_index must not be -1 * @param stream_index Must not be -1.
* @param flags selects which direction should be preferred if no exact * @param flags Selects which direction should be preferred if no exact
* match is available * match is available.
* @return >= 0 on success (but not necessarily the new offset) * @return >= 0 on success (but not necessarily the new offset)
*/ */
int (*read_seek)(struct AVFormatContext *, int (*read_seek)(struct AVFormatContext *,
...@@ -418,11 +417,11 @@ typedef struct AVStream { ...@@ -418,11 +417,11 @@ typedef struct AVStream {
int id; /**< format-specific stream ID */ int id; /**< format-specific stream ID */
AVCodecContext *codec; /**< codec context */ AVCodecContext *codec; /**< codec context */
/** /**
* Real base frame rate of the stream. * Real base framerate of the stream.
* This is the lowest frame rate with which all timestamps can be * This is the lowest framerate with which all timestamps can be
* represented accurately (it is the least common multiple of all * represented accurately (it is the least common multiple of all
* frame rates in the stream). Note, this value is just a guess! * framerates in the stream). Note, this value is just a guess!
* For example if the time base is 1/90000 and all frames have either * For example, if the time base is 1/90000 and all frames have either
* approximately 3600 or 1800 timer ticks, then r_frame_rate will be 50/1. * approximately 3600 or 1800 timer ticks, then r_frame_rate will be 50/1.
*/ */
AVRational r_frame_rate; AVRational r_frame_rate;
...@@ -436,7 +435,7 @@ typedef struct AVStream { ...@@ -436,7 +435,7 @@ typedef struct AVStream {
/** /**
* This is the fundamental unit of time (in seconds) in terms * This is the fundamental unit of time (in seconds) in terms
* of which frame timestamps are represented. For fixed-fps content, * of which frame timestamps are represented. For fixed-fps content,
* time base should be 1/frame rate and timestamp increments should be 1. * time base should be 1/framerate and timestamp increments should be 1.
*/ */
AVRational time_base; AVRational time_base;
int pts_wrap_bits; /**< number of bits in pts (used for wrapping control) */ int pts_wrap_bits; /**< number of bits in pts (used for wrapping control) */
...@@ -596,7 +595,7 @@ typedef struct AVFormatContext { ...@@ -596,7 +595,7 @@ typedef struct AVFormatContext {
int64_t file_size; int64_t file_size;
/** Decoding: total stream bitrate in bit/s, 0 if not /** Decoding: total stream bitrate in bit/s, 0 if not
available. Never set it directly if the file_size and the available. Never set it directly if the file_size and the
duration are known as ffmpeg can compute it automatically. */ duration are known as FFmpeg can compute it automatically. */
int bit_rate; int bit_rate;
/* av_read_frame() support */ /* av_read_frame() support */
...@@ -622,12 +621,12 @@ typedef struct AVFormatContext { ...@@ -622,12 +621,12 @@ typedef struct AVFormatContext {
int loop_output; int loop_output;
int flags; int flags;
#define AVFMT_FLAG_GENPTS 0x0001 ///< Generate pts if missing even if it requires parsing future frames. #define AVFMT_FLAG_GENPTS 0x0001 ///< Generate missing pts even if it requires parsing future frames.
#define AVFMT_FLAG_IGNIDX 0x0002 ///< Ignore index. #define AVFMT_FLAG_IGNIDX 0x0002 ///< Ignore index.
#define AVFMT_FLAG_NONBLOCK 0x0004 ///< Do not block when reading packets from input. #define AVFMT_FLAG_NONBLOCK 0x0004 ///< Do not block when reading packets from input.
int loop_input; int loop_input;
/** Decoding: size of data to probe; encoding: unused. */ /** decoding: size of data to probe; encoding: unused. */
unsigned int probesize; unsigned int probesize;
/** /**
...@@ -659,8 +658,8 @@ typedef struct AVFormatContext { ...@@ -659,8 +658,8 @@ typedef struct AVFormatContext {
enum CodecID subtitle_codec_id; enum CodecID subtitle_codec_id;
/** /**
* Maximum amount of memory in bytes to use per stream for the index. * Maximum amount of memory in bytes to use for the index of each stream.
* If the needed index exceeds this size, entries will be discarded as * If the index exceeds this size, entries will be discarded as
* needed to maintain a smaller size. This can lead to slower or less * needed to maintain a smaller size. This can lead to slower or less
* accurate seeking (depends on demuxer). * accurate seeking (depends on demuxer).
* Demuxers for which a full in-memory index is mandatory will ignore * Demuxers for which a full in-memory index is mandatory will ignore
...@@ -711,22 +710,22 @@ extern AVOutputFormat *first_oformat; ...@@ -711,22 +710,22 @@ extern AVOutputFormat *first_oformat;
/** /**
* If f is NULL, returns the first registered input format, * If f is NULL, returns the first registered input format,
* if f is non-NULL, returns the next registered input format after f, * if f is non-NULL, returns the next registered input format after f
* or NULL if f is the last one. * or NULL if f is the last one.
*/ */
AVInputFormat *av_iformat_next(AVInputFormat *f); AVInputFormat *av_iformat_next(AVInputFormat *f);
/** /**
* If f is NULL, returns the first registered output format, * If f is NULL, returns the first registered output format,
* if f is non-NULL, returns the next registered output format after f, * if f is non-NULL, returns the next registered output format after f
* or NULL if f is the last one. * or NULL if f is the last one.
*/ */
AVOutputFormat *av_oformat_next(AVOutputFormat *f); AVOutputFormat *av_oformat_next(AVOutputFormat *f);
enum CodecID av_guess_image2_codec(const char *filename); enum CodecID av_guess_image2_codec(const char *filename);
/* XXX: use automatic init with either ELF sections or C file parser */ /* XXX: Use automatic init with either ELF sections or C file parser */
/* modules */ /* modules. */
/* utils.c */ /* utils.c */
void av_register_input_format(AVInputFormat *format); void av_register_input_format(AVInputFormat *format);
...@@ -863,7 +862,7 @@ AVFormatContext *avformat_alloc_context(void); ...@@ -863,7 +862,7 @@ AVFormatContext *avformat_alloc_context(void);
/** /**
* Read packets of a media file to get stream information. This * Read packets of a media file to get stream information. This
* is useful for file formats with no headers such as MPEG. This * is useful for file formats with no headers such as MPEG. This
* function also computes the real frame rate in case of MPEG-2 repeat * function also computes the real framerate in case of MPEG-2 repeat
* frame mode. * frame mode.
* The logical file position is not changed by this function; * The logical file position is not changed by this function;
* examined packets may be buffered for later processing. * examined packets may be buffered for later processing.
...@@ -899,7 +898,7 @@ int av_read_packet(AVFormatContext *s, AVPacket *pkt); ...@@ -899,7 +898,7 @@ int av_read_packet(AVFormatContext *s, AVPacket *pkt);
* then it contains one frame. * then it contains one frame.
* *
* pkt->pts, pkt->dts and pkt->duration are always set to correct * pkt->pts, pkt->dts and pkt->duration are always set to correct
* values in AVStream.timebase units (and guessed if the format cannot * values in AVStream.time_base units (and guessed if the format cannot
* provide them). pkt->pts can be AV_NOPTS_VALUE if the video format * provide them). pkt->pts can be AV_NOPTS_VALUE if the video format
* has B-frames, so it is better to rely on pkt->dts if you do not * has B-frames, so it is better to rely on pkt->dts if you do not
* decompress the payload. * decompress the payload.
...@@ -909,7 +908,7 @@ int av_read_packet(AVFormatContext *s, AVPacket *pkt); ...@@ -909,7 +908,7 @@ int av_read_packet(AVFormatContext *s, AVPacket *pkt);
int av_read_frame(AVFormatContext *s, AVPacket *pkt); int av_read_frame(AVFormatContext *s, AVPacket *pkt);
/** /**
* Seek to the key frame at timestamp. * Seek to the keyframe at timestamp.
* 'timestamp' in 'stream_index'. * 'timestamp' in 'stream_index'.
* @param stream_index If stream_index is (-1), a default * @param stream_index If stream_index is (-1), a default
* stream is selected, and timestamp is automatically converted * stream is selected, and timestamp is automatically converted
...@@ -928,36 +927,36 @@ int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp, ...@@ -928,36 +927,36 @@ int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp,
* can be presented successfully will be closest to ts and within min/max_ts. * can be presented successfully will be closest to ts and within min/max_ts.
* Active streams are all streams that have AVStream.discard < AVDISCARD_ALL. * Active streams are all streams that have AVStream.discard < AVDISCARD_ALL.
* *
* if flags contain AVSEEK_FLAG_BYTE then all timestamps are in byte and * If flags contain AVSEEK_FLAG_BYTE, then all timestamps are in bytes and
* are the file position (this may not be supported by all demuxers). * are the file position (this may not be supported by all demuxers).
* if flags contain AVSEEK_FLAG_FRAME then all timestamps are in frames * If flags contain AVSEEK_FLAG_FRAME, then all timestamps are in frames
* in the stream with stream_index (this may not be supported by all demuxers). * in the stream with stream_index (this may not be supported by all demuxers).
* else all timestamps are in units of the stream selected by stream_index or * Otherwise all timestamps are in units of the stream selected by stream_index
* if stream_index is -1, AV_TIME_BASE units. * or if stream_index is -1, in AV_TIME_BASE units.
* if flags contain AVSEEK_FLAG_ANY then non keyframes are treated as * If flags contain AVSEEK_FLAG_ANY, then non-keyframes are treated as
* keyframes (this may not be supported by all demuxers). * keyframes (this may not be supported by all demuxers).
* *
* @param stream_index index of the stream which is used as timebase reference. * @param stream_index index of the stream which is used as time base reference
* @param min_ts smallest acceptable timestamp * @param min_ts smallest acceptable timestamp
* @param ts target timestamp * @param ts target timestamp
* @param max_ts largest acceptable timestamp * @param max_ts largest acceptable timestamp
* @param flags flags * @param flags flags
* @returns >=0 on success, error code otherwise * @returns >=0 on success, error code otherwise
* *
* @NOTE this is part of the new seek API which is still under construction * @NOTE This is part of the new seek API which is still under construction.
* thus do not use this yet it may change any time, dont expect ABI * Thus do not use this yet. It may change at any time, do not expect
* compatibility yet! * ABI compatibility yet!
*/ */
int avformat_seek_file(AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags); int avformat_seek_file(AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags);
/** /**
* Start playing a network based stream (e.g. RTSP stream) at the * Start playing a network-based stream (e.g. RTSP stream) at the
* current position. * current position.
*/ */
int av_read_play(AVFormatContext *s); int av_read_play(AVFormatContext *s);
/** /**
* Pause a network based stream (e.g. RTSP stream). * Pause a network-based stream (e.g. RTSP stream).
* *
* Use av_read_play() to resume it. * Use av_read_play() to resume it.
*/ */
...@@ -1035,7 +1034,7 @@ int av_index_search_timestamp(AVStream *st, int64_t timestamp, int flags); ...@@ -1035,7 +1034,7 @@ int av_index_search_timestamp(AVStream *st, int64_t timestamp, int flags);
/** /**
* Ensures the index uses less memory than the maximum specified in * Ensures the index uses less memory than the maximum specified in
* AVFormatContext.max_index_size, by discarding entries if it grows * AVFormatContext.max_index_size by discarding entries if it grows
* too large. * too large.
* This function is not part of the public API and should only be called * This function is not part of the public API and should only be called
* by demuxers. * by demuxers.
...@@ -1116,7 +1115,7 @@ int av_write_frame(AVFormatContext *s, AVPacket *pkt); ...@@ -1116,7 +1115,7 @@ int av_write_frame(AVFormatContext *s, AVPacket *pkt);
* Writes a packet to an output media file ensuring correct interleaving. * Writes a packet to an output media file ensuring correct interleaving.
* *
* The packet must contain one audio or video frame. * The packet must contain one audio or video frame.
* If the packets are already correctly interleaved the application should * If the packets are already correctly interleaved, the application should
* call av_write_frame() instead as it is slightly faster. It is also important * call av_write_frame() instead as it is slightly faster. It is also important
* to keep in mind that completely non-interleaved input will need huge amounts * to keep in mind that completely non-interleaved input will need huge amounts
* of memory to interleave with this, so it is preferable to interleave at the * of memory to interleave with this, so it is preferable to interleave at the
...@@ -1133,7 +1132,7 @@ int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt); ...@@ -1133,7 +1132,7 @@ int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt);
* Interleave a packet per dts in an output media file. * Interleave a packet per dts in an output media file.
* *
* Packets with pkt->destruct == av_destruct_packet will be freed inside this * Packets with pkt->destruct == av_destruct_packet will be freed inside this
* function, so they cannot be used after it, note calling av_free_packet() * function, so they cannot be used after it. Note that calling av_free_packet()
* on them is still safe. * on them is still safe.
* *
* @param s media file handle * @param s media file handle
...@@ -1172,7 +1171,7 @@ attribute_deprecated int parse_image_size(int *width_ptr, int *height_ptr, ...@@ -1172,7 +1171,7 @@ attribute_deprecated int parse_image_size(int *width_ptr, int *height_ptr,
const char *str); const char *str);
/** /**
* Converts frame rate from string to a fraction. * Converts framerate from a string to a fraction.
* @deprecated Use av_parse_video_frame_rate instead. * @deprecated Use av_parse_video_frame_rate instead.
*/ */
attribute_deprecated int parse_frame_rate(int *frame_rate, int *frame_rate_base, attribute_deprecated int parse_frame_rate(int *frame_rate, int *frame_rate_base,
...@@ -1225,7 +1224,7 @@ void ffm_set_write_index(AVFormatContext *s, int64_t pos, int64_t file_size); ...@@ -1225,7 +1224,7 @@ void ffm_set_write_index(AVFormatContext *s, int64_t pos, int64_t file_size);
int find_info_tag(char *arg, int arg_size, const char *tag1, const char *info); int find_info_tag(char *arg, int arg_size, const char *tag1, const char *info);
/** /**
* Returns in 'buf' the path with '%d' replaced by number. * Returns in 'buf' the path with '%d' replaced by a number.
* *
* Also handles the '%0nd' format where 'n' is the total number * Also handles the '%0nd' format where 'n' is the total number
* of digits and '%%'. * of digits and '%%'.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment