Originally committed as revision 19288 to svn://svn.ffmpeg.org/ffmpeg/trunk
Unified · Split
| @@ -98,7 +98,7 @@ av_metadata_get(AVMetadata *m, const char *key, const AVMetadataTag *prev, int f · 97 unmodified lines | |||
| 98 | int av_metadata_set(AVMetadata **pm, const char *key, const char *value); | 98 | int av_metadata_set(AVMetadata **pm, const char *key, const char *value); |
| 99 | 99 | ||
| 100 | /** | 100 | /** |
| 101 | * Convert all the metadata sets from ctx according to the source and | 101 | * Converts all the metadata sets from ctx according to the source and |
| 102 | * destination conversion tables. | 102 | * destination conversion tables. |
| 103 | * @param d_conv destination tags format conversion table | 103 | * @param d_conv destination tags format conversion table |
| 104 | * @param s_conv source tags format conversion table | 104 | * @param s_conv source tags format conversion table |
| @@ -116,8 +116,8 @@ void av_metadata_free(AVMetadata **m); · 11 unmodified lines | |||
| 116 | 116 | ||
| 117 | 117 | ||
| 118 | /** | 118 | /** |
| 119 | * Allocate and read the payload of a packet and initialize its fields with | 119 | * Allocates and reads the payload of a packet and initializes its |
| 120 | * default values. | 120 | * fields with default values. |
| 121 | * | 121 | * |
| 122 | * @param pkt packet | 122 | * @param pkt packet |
| 123 | * @param size desired payload size | 123 | * @param size desired payload size |
| @@ -285,18 +285,18 @@ typedef struct AVInputFormat { · 161 unmodified lines | |||
| 285 | /** General purpose read-only value that the format can use. */ | 285 | /** General purpose read-only value that the format can use. */ |
| 286 | int value; | 286 | int value; |
| 287 | 287 | ||
| 288 | /** Start/resume playing - only meaningful if using a network-based format | 288 | /** Starts/resumes playing - only meaningful if using a network-based format |
| 289 | (RTSP). */ | 289 | (RTSP). */ |
| 290 | int (*read_play)(struct AVFormatContext *); | 290 | int (*read_play)(struct AVFormatContext *); |
| 291 | 291 | ||
| 292 | /** Pause playing - only meaningful if using a network-based format | 292 | /** Pauses playing - only meaningful if using a network-based format |
| 293 | (RTSP). */ | 293 | (RTSP). */ |
| 294 | int (*read_pause)(struct AVFormatContext *); | 294 | int (*read_pause)(struct AVFormatContext *); |
| 295 | 295 | ||
| 296 | const struct AVCodecTag * const *codec_tag; | 296 | const struct AVCodecTag * const *codec_tag; |
| 297 | 297 | ||
| 298 | /** | 298 | /** |
| 299 | * Seek to timestamp ts. | 299 | * Seeks to timestamp ts. |
| 300 | * Seeking will be done so that the point from which all active streams | 300 | * Seeking will be done so that the point from which all active streams |
| 301 | * can be presented successfully will be closest to ts and within min/max_ts. | 301 | * can be presented successfully will be closest to ts and within min/max_ts. |
| 302 | * Active streams are all streams that have AVStream.discard < AVDISCARD_ALL. | 302 | * Active streams are all streams that have AVStream.discard < AVDISCARD_ALL. |
| @@ -694,7 +694,7 @@ enum CodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name, · 391 unmodified lines | |||
| 694 | enum CodecType type); | 694 | enum CodecType type); |
| 695 | 695 | ||
| 696 | /** | 696 | /** |
| 697 | * Send a nice hexadecimal dump of a buffer to the specified file stream. | 697 | * Sends a nice hexadecimal dump of a buffer to the specified file stream. |
| 698 | * | 698 | * |
| 699 | * @param f The file stream pointer where the dump should be sent to. | 699 | * @param f The file stream pointer where the dump should be sent to. |
| 700 | * @param buf buffer | 700 | * @param buf buffer |
| @@ -705,7 +705,7 @@ enum CodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name, · 4 unmodified lines | |||
| 705 | void av_hex_dump(FILE *f, uint8_t *buf, int size); | 705 | void av_hex_dump(FILE *f, uint8_t *buf, int size); |
| 706 | 706 | ||
| 707 | /** | 707 | /** |
| 708 | * Send a nice hexadecimal dump of a buffer to the log. | 708 | * Sends a nice hexadecimal dump of a buffer to the log. |
| 709 | * | 709 | * |
| 710 | * @param avcl A pointer to an arbitrary struct of which the first field is a | 710 | * @param avcl A pointer to an arbitrary struct of which the first field is a |
| 711 | * pointer to an AVClass struct. | 711 | * pointer to an AVClass struct. |
| @@ -719,7 +719,7 @@ void av_hex_dump(FILE *f, uint8_t *buf, int size); · 7 unmodified lines | |||
| 719 | void av_hex_dump_log(void *avcl, int level, uint8_t *buf, int size); | 719 | void av_hex_dump_log(void *avcl, int level, uint8_t *buf, int size); |
| 720 | 720 | ||
| 721 | /** | 721 | /** |
| 722 | * Send a nice dump of a packet to the specified file stream. | 722 | * Sends a nice dump of a packet to the specified file stream. |
| 723 | * | 723 | * |
| 724 | * @param f The file stream pointer where the dump should be sent to. | 724 | * @param f The file stream pointer where the dump should be sent to. |
| 725 | * @param pkt packet to dump | 725 | * @param pkt packet to dump |
| @@ -728,7 +728,7 @@ void av_hex_dump_log(void *avcl, int level, uint8_t *buf, int size); · 2 unmodified lines | |||
| 728 | void av_pkt_dump(FILE *f, AVPacket *pkt, int dump_payload); | 728 | void av_pkt_dump(FILE *f, AVPacket *pkt, int dump_payload); |
| 729 | 729 | ||
| 730 | /** | 730 | /** |
| 731 | * Send a nice dump of a packet to the log. | 731 | * Sends a nice dump of a packet to the log. |
| 732 | * | 732 | * |
| 733 | * @param avcl A pointer to an arbitrary struct of which the first field is a | 733 | * @param avcl A pointer to an arbitrary struct of which the first field is a |
| 734 | * pointer to an AVClass struct. | 734 | * pointer to an AVClass struct. |
| @@ -740,7 +740,7 @@ void av_pkt_dump(FILE *f, AVPacket *pkt, int dump_payload); · 5 unmodified lines | |||
| 740 | void av_pkt_dump_log(void *avcl, int level, AVPacket *pkt, int dump_payload); | 740 | void av_pkt_dump_log(void *avcl, int level, AVPacket *pkt, int dump_payload); |
| 741 | 741 | ||
| 742 | /** | 742 | /** |
| 743 | * Initialize libavformat and register all the muxers, demuxers and | 743 | * Initializes libavformat and registers all the muxers, demuxers and |
| 744 | * protocols. If you do not call this function, then you can select | 744 | * protocols. If you do not call this function, then you can select |
| 745 | * exactly which formats you want to support. | 745 | * exactly which formats you want to support. |
| 746 | * | 746 | * |
| @@ -762,7 +762,7 @@ unsigned int av_codec_get_tag(const struct AVCodecTag * const *tags, enum CodecI · 15 unmodified lines | |||
| 762 | AVInputFormat *av_find_input_format(const char *short_name); | 762 | AVInputFormat *av_find_input_format(const char *short_name); |
| 763 | 763 | ||
| 764 | /** | 764 | /** |
| 765 | * Guess file format. | 765 | * Guesses the file format. |
| 766 | * | 766 | * |
| 767 | * @param is_opened Whether the file is already opened; determines whether | 767 | * @param is_opened Whether the file is already opened; determines whether |
| 768 | * demuxers with or without AVFMT_NOFILE are probed. | 768 | * demuxers with or without AVFMT_NOFILE are probed. |
| @@ -778,7 +778,7 @@ int av_open_input_stream(AVFormatContext **ic_ptr, · 9 unmodified lines | |||
| 778 | AVInputFormat *fmt, AVFormatParameters *ap); | 778 | AVInputFormat *fmt, AVFormatParameters *ap); |
| 779 | 779 | ||
| 780 | /** | 780 | /** |
| 781 | * Open a media file as input. The codecs are not opened. Only the file | 781 | * Opens a media file as input. The codecs are not opened. Only the file |
| 782 | * header (if present) is read. | 782 | * header (if present) is read. |
| 783 | * | 783 | * |
| 784 | * @param ic_ptr The opened media file handle is put here. | 784 | * @param ic_ptr The opened media file handle is put here. |
| @@ -802,14 +802,14 @@ attribute_deprecated AVFormatContext *av_alloc_format_context(void); · 17 unmodified lines | |||
| 802 | #endif | 802 | #endif |
| 803 | 803 | ||
| 804 | /** | 804 | /** |
| 805 | * Allocate an AVFormatContext. | 805 | * Allocates an AVFormatContext. |
| 806 | * Can be freed with av_free() but do not forget to free everything you | 806 | * Can be freed with av_free() but do not forget to free everything you |
| 807 | * explicitly allocated as well! | 807 | * explicitly allocated as well! |
| 808 | */ | 808 | */ |
| 809 | AVFormatContext *avformat_alloc_context(void); | 809 | AVFormatContext *avformat_alloc_context(void); |
| 810 | 810 | ||
| 811 | /** | 811 | /** |
| 812 | * Read packets of a media file to get stream information. This | 812 | * Reads packets of a media file to get stream information. This |
| 813 | * is useful for file formats with no headers such as MPEG. This | 813 | * is useful for file formats with no headers such as MPEG. This |
| 814 | * function also computes the real framerate in case of MPEG-2 repeat | 814 | * function also computes the real framerate in case of MPEG-2 repeat |
| 815 | * frame mode. | 815 | * frame mode. |
| @@ -824,7 +824,7 @@ AVFormatContext *avformat_alloc_context(void); · 8 unmodified lines | |||
| 824 | int av_find_stream_info(AVFormatContext *ic); | 824 | int av_find_stream_info(AVFormatContext *ic); |
| 825 | 825 | ||
| 826 | /** | 826 | /** |
| 827 | * Read a transport packet from a media file. | 827 | * Reads a transport packet from a media file. |
| 828 | * | 828 | * |
| 829 | * This function is obsolete and should never be used. | 829 | * This function is obsolete and should never be used. |
| 830 | * Use av_read_frame() instead. | 830 | * Use av_read_frame() instead. |
| @@ -836,7 +836,7 @@ int av_find_stream_info(AVFormatContext *ic); · 5 unmodified lines | |||
| 836 | int av_read_packet(AVFormatContext *s, AVPacket *pkt); | 836 | int av_read_packet(AVFormatContext *s, AVPacket *pkt); |
| 837 | 837 | ||
| 838 | /** | 838 | /** |
| 839 | * Return the next frame of a stream. | 839 | * Returns the next frame of a stream. |
| 840 | * | 840 | * |
| 841 | * The returned packet is valid | 841 | * The returned packet is valid |
| 842 | * until the next av_read_frame() or until av_close_input_file() and | 842 | * until the next av_read_frame() or until av_close_input_file() and |
| @@ -857,7 +857,7 @@ int av_read_packet(AVFormatContext *s, AVPacket *pkt); · 14 unmodified lines | |||
| 857 | int av_read_frame(AVFormatContext *s, AVPacket *pkt); | 857 | int av_read_frame(AVFormatContext *s, AVPacket *pkt); |
| 858 | 858 | ||
| 859 | /** | 859 | /** |
| 860 | * Seek to the keyframe at timestamp. | 860 | * Seeks to the keyframe at timestamp. |
| 861 | * 'timestamp' in 'stream_index'. | 861 | * 'timestamp' in 'stream_index'. |
| 862 | * @param stream_index If stream_index is (-1), a default | 862 | * @param stream_index If stream_index is (-1), a default |
| 863 | * stream is selected, and timestamp is automatically converted | 863 | * stream is selected, and timestamp is automatically converted |
| @@ -871,7 +871,7 @@ int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp, · 7 unmodified lines | |||
| 871 | int flags); | 871 | int flags); |
| 872 | 872 | ||
| 873 | /** | 873 | /** |
| 874 | * Seek to timestamp ts. | 874 | * Seeks to timestamp ts. |
| 875 | * Seeking will be done so that the point from which all active streams | 875 | * Seeking will be done so that the point from which all active streams |
| 876 | * can be presented successfully will be closest to ts and within min/max_ts. | 876 | * can be presented successfully will be closest to ts and within min/max_ts. |
| 877 | * Active streams are all streams that have AVStream.discard < AVDISCARD_ALL. | 877 | * Active streams are all streams that have AVStream.discard < AVDISCARD_ALL. |
| @@ -899,33 +899,33 @@ int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp, · 21 unmodified lines | |||
| 899 | int avformat_seek_file(AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags); | 899 | int avformat_seek_file(AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags); |
| 900 | 900 | ||
| 901 | /** | 901 | /** |
| 902 | * Start playing a network-based stream (e.g. RTSP stream) at the | 902 | * Starts playing a network-based stream (e.g. RTSP stream) at the |
| 903 | * current position. | 903 | * current position. |
| 904 | */ | 904 | */ |
| 905 | int av_read_play(AVFormatContext *s); | 905 | int av_read_play(AVFormatContext *s); |
| 906 | 906 | ||
| 907 | /** | 907 | /** |
| 908 | * Pause a network-based stream (e.g. RTSP stream). | 908 | * Pauses a network-based stream (e.g. RTSP stream). |
| 909 | * | 909 | * |
| 910 | * Use av_read_play() to resume it. | 910 | * Use av_read_play() to resume it. |
| 911 | */ | 911 | */ |
| 912 | int av_read_pause(AVFormatContext *s); | 912 | int av_read_pause(AVFormatContext *s); |
| 913 | 913 | ||
| 914 | /** | 914 | /** |
| 915 | * Free a AVFormatContext allocated by av_open_input_stream. | 915 | * Frees a AVFormatContext allocated by av_open_input_stream. |
| 916 | * @param s context to free | 916 | * @param s context to free |
| 917 | */ | 917 | */ |
| 918 | void av_close_input_stream(AVFormatContext *s); | 918 | void av_close_input_stream(AVFormatContext *s); |
| 919 | 919 | ||
| 920 | /** | 920 | /** |
| 921 | * Close a media file (but not its codecs). | 921 | * Closes a media file (but not its codecs). |
| 922 | * | 922 | * |
| 923 | * @param s media file handle | 923 | * @param s media file handle |
| 924 | */ | 924 | */ |
| 925 | void av_close_input_file(AVFormatContext *s); | 925 | void av_close_input_file(AVFormatContext *s); |
| 926 | 926 | ||
| 927 | /** | 927 | /** |
| 928 | * Add a new stream to a media file. | 928 | * Adds a new stream to a media file. |
| 929 | * | 929 | * |
| 930 | * Can only be called in the read_header() function. If the flag | 930 | * Can only be called in the read_header() function. If the flag |
| 931 | * AVFMTCTX_NOHEADER is in the format context, then new streams | 931 | * AVFMTCTX_NOHEADER is in the format context, then new streams |
| @@ -938,7 +938,7 @@ AVStream *av_new_stream(AVFormatContext *s, int id); · 6 unmodified lines | |||
| 938 | AVProgram *av_new_program(AVFormatContext *s, int id); | 938 | AVProgram *av_new_program(AVFormatContext *s, int id); |
| 939 | 939 | ||
| 940 | /** | 940 | /** |
| 941 | * Add a new chapter. | 941 | * Adds a new chapter. |
| 942 | * This function is NOT part of the public API | 942 | * This function is NOT part of the public API |
| 943 | * and should ONLY be used by demuxers. | 943 | * and should ONLY be used by demuxers. |
| 944 | * | 944 | * |
| @@ -954,7 +954,7 @@ AVChapter *ff_new_chapter(AVFormatContext *s, int id, AVRational time_base, · 9 unmodified lines | |||
| 954 | int64_t start, int64_t end, const char *title); | 954 | int64_t start, int64_t end, const char *title); |
| 955 | 955 | ||
| 956 | /** | 956 | /** |
| 957 | * Set the pts for a given stream. | 957 | * Sets the pts for a given stream. |
| 958 | * | 958 | * |
| 959 | * @param s stream | 959 | * @param s stream |
| 960 | * @param pts_wrap_bits number of bits effectively used by the pts | 960 | * @param pts_wrap_bits number of bits effectively used by the pts |
| @@ -991,7 +991,7 @@ int av_index_search_timestamp(AVStream *st, int64_t timestamp, int flags); · 30 unmodified lines | |||
| 991 | void ff_reduce_index(AVFormatContext *s, int stream_index); | 991 | void ff_reduce_index(AVFormatContext *s, int stream_index); |
| 992 | 992 | ||
| 993 | /** | 993 | /** |
| 994 | * Add an index entry into a sorted list. Update the entry if the list | 994 | * Adds an index entry into a sorted list. Updates the entry if the list |
| 995 | * already contains it. | 995 | * already contains it. |
| 996 | * | 996 | * |
| 997 | * @param timestamp timestamp in the time base of the given stream | 997 | * @param timestamp timestamp in the time base of the given stream |
| @@ -1038,7 +1038,7 @@ int64_t av_gen_search(AVFormatContext *s, int stream_index, · 40 unmodified lines | |||
| 1038 | int av_set_parameters(AVFormatContext *s, AVFormatParameters *ap); | 1038 | int av_set_parameters(AVFormatContext *s, AVFormatParameters *ap); |
| 1039 | 1039 | ||
| 1040 | /** | 1040 | /** |
| 1041 | * Allocate the stream private data and write the stream header to an | 1041 | * Allocates the stream private data and writes the stream header to an |
| 1042 | * output media file. | 1042 | * output media file. |
| 1043 | * | 1043 | * |
| 1044 | * @param s media file handle | 1044 | * @param s media file handle |
| @@ -1047,7 +1047,7 @@ int av_set_parameters(AVFormatContext *s, AVFormatParameters *ap); · 2 unmodified lines | |||
| 1047 | int av_write_header(AVFormatContext *s); | 1047 | int av_write_header(AVFormatContext *s); |
| 1048 | 1048 | ||
| 1049 | /** | 1049 | /** |
| 1050 | * Write a packet to an output media file. | 1050 | * Writes a packet to an output media file. |
| 1051 | * | 1051 | * |
| 1052 | * The packet shall contain one audio or video frame. | 1052 | * The packet shall contain one audio or video frame. |
| 1053 | * The packet must be correctly interleaved according to the container | 1053 | * The packet must be correctly interleaved according to the container |
| @@ -1078,7 +1078,7 @@ int av_write_frame(AVFormatContext *s, AVPacket *pkt); · 24 unmodified lines | |||
| 1078 | int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt); | 1078 | int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt); |
| 1079 | 1079 | ||
| 1080 | /** | 1080 | /** |
| 1081 | * Interleave a packet per dts in an output media file. | 1081 | * Interleaves a packet per dts in an output media file. |
| 1082 | * | 1082 | * |
| 1083 | * Packets with pkt->destruct == av_destruct_packet will be freed inside this | 1083 | * Packets with pkt->destruct == av_destruct_packet will be freed inside this |
| 1084 | * function, so they cannot be used after it. Note that calling av_free_packet() | 1084 | * function, so they cannot be used after it. Note that calling av_free_packet() |
| @@ -1096,7 +1096,7 @@ int av_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out, · 11 unmodified lines | |||
| 1096 | AVPacket *pkt, int flush); | 1096 | AVPacket *pkt, int flush); |
| 1097 | 1097 | ||
| 1098 | /** | 1098 | /** |
| 1099 | * @brief Write the stream trailer to an output media file and | 1099 | * @brief Writes the stream trailer to an output media file and |
| 1100 | * free the file private data. | 1100 | * free the file private data. |
| 1101 | * | 1101 | * |
| 1102 | * May only be called after a successful call to av_write_header. | 1102 | * May only be called after a successful call to av_write_header. |
| @@ -1188,7 +1188,7 @@ int av_get_frame_filename(char *buf, int buf_size, · 85 unmodified lines | |||
| 1188 | const char *path, int number); | 1188 | const char *path, int number); |
| 1189 | 1189 | ||
| 1190 | /** | 1190 | /** |
| 1191 | * Check whether filename actually is a numbered sequence generator. | 1191 | * Checks whether filename actually is a numbered sequence generator. |
| 1192 | * | 1192 | * |
| 1193 | * @param filename possible numbered sequence string | 1193 | * @param filename possible numbered sequence string |
| 1194 | * @return 1 if a valid numbered sequence string, 0 otherwise | 1194 | * @return 1 if a valid numbered sequence string, 0 otherwise |
| @@ -1196,7 +1196,7 @@ int av_get_frame_filename(char *buf, int buf_size, · 1 unmodified line | |||
| 1196 | int av_filename_number_test(const char *filename); | 1196 | int av_filename_number_test(const char *filename); |
| 1197 | 1197 | ||
| 1198 | /** | 1198 | /** |
| 1199 | * Generate an SDP for an RTP session. | 1199 | * Generates an SDP for an RTP session. |
| 1200 | * | 1200 | * |
| 1201 | * @param ac array of AVFormatContexts describing the RTP streams. If the | 1201 | * @param ac array of AVFormatContexts describing the RTP streams. If the |
| 1202 | * array is composed by only one context, such context can contain | 1202 | * array is composed by only one context, such context can contain |