diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-06-24 02:54:12 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-06-24 03:07:04 +0200 |
commit | 686959e87e377c0494da636640e36779dd985c30 (patch) | |
tree | 8c4674c56f291638686e6bc3efafe0ef2b921327 /libavformat | |
parent | ffc6c8a4305d25db8a5af72389a2453b17f43646 (diff) | |
parent | adbfc605f6bbe87b292c82cd1f5d4d974fa6b73c (diff) | |
download | ffmpeg-686959e87e377c0494da636640e36779dd985c30.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
doxygen: Consistently use '@' instead of '\' for Doxygen markup.
Use av_printf_format to check the usage of printf style functions
Add av_printf_format, for marking printf style format strings and their parameters
ARM: enable thumb for Cortex-M* CPUs
nsvdec: Propagate error values instead of returning 0 in nsv_read_header().
build: remove SRC_PATH_BARE variable
build: move basic rules and variables to main Makefile
build: move special targets to end of main Makefile
lavdev: improve feedback in case of invalid frame rate/size
vfwcap: prefer "framerate_q" over "fps" in vfw_read_header()
v4l2: prefer "framerate_q" over "fps" in v4l2_set_parameters()
fbdev: prefer "framerate_q" over "fps" in device context
bktr: prefer "framerate" over "fps" for grab_read_header()
ALSA: implement channel layout for playback.
alsa: support unsigned variants of already supported signed formats.
alsa: add support for more formats.
ARM: allow building in Thumb2 mode
Conflicts:
common.mak
doc/APIchanges
libavcodec/vdpau.h
libavdevice/alsa-audio-common.c
libavdevice/fbdev.c
libavdevice/libdc1394.c
libavutil/avutil.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/asfcrypt.c | 36 | ||||
-rw-r--r-- | libavformat/avio.h | 12 | ||||
-rw-r--r-- | libavformat/gxf.c | 54 | ||||
-rw-r--r-- | libavformat/internal.h | 2 | ||||
-rw-r--r-- | libavformat/mpegts.c | 8 | ||||
-rw-r--r-- | libavformat/nuv.c | 10 | ||||
-rw-r--r-- | libavformat/rtpproto.c | 2 |
7 files changed, 58 insertions, 66 deletions
diff --git a/libavformat/asfcrypt.c b/libavformat/asfcrypt.c index 59986e0a2c..750758d822 100644 --- a/libavformat/asfcrypt.c +++ b/libavformat/asfcrypt.c @@ -28,9 +28,9 @@ #include "asfcrypt.h" /** - * \brief find multiplicative inverse modulo 2 ^ 32 - * \param v number to invert, must be odd! - * \return number so that result * v = 1 (mod 2^32) + * @brief find multiplicative inverse modulo 2 ^ 32 + * @param v number to invert, must be odd! + * @return number so that result * v = 1 (mod 2^32) */ static uint32_t inverse(uint32_t v) { // v ^ 3 gives the inverse (mod 16), could also be implemented @@ -45,9 +45,9 @@ static uint32_t inverse(uint32_t v) { } /** - * \brief read keys from keybuf into keys - * \param keybuf buffer containing the keys - * \param keys output key array containing the keys for encryption in + * @brief read keys from keybuf into keys + * @param keybuf buffer containing the keys + * @param keys output key array containing the keys for encryption in * native endianness */ static void multiswap_init(const uint8_t keybuf[48], uint32_t keys[12]) { @@ -57,9 +57,9 @@ static void multiswap_init(const uint8_t keybuf[48], uint32_t keys[12]) { } /** - * \brief invert the keys so that encryption become decryption keys and + * @brief invert the keys so that encryption become decryption keys and * the other way round. - * \param keys key array of ints to invert + * @param keys key array of ints to invert */ static void multiswap_invert_keys(uint32_t keys[12]) { int i; @@ -92,12 +92,12 @@ static uint32_t multiswap_inv_step(const uint32_t keys[12], uint32_t v) { } /** - * \brief "MultiSwap" encryption - * \param keys 32 bit numbers in machine endianness, + * @brief "MultiSwap" encryption + * @param keys 32 bit numbers in machine endianness, * 0-4 and 6-10 must be inverted from decryption - * \param key another key, this one must be the same for the decryption - * \param data data to encrypt - * \return encrypted data + * @param key another key, this one must be the same for the decryption + * @param data data to encrypt + * @return encrypted data */ static uint64_t multiswap_enc(const uint32_t keys[12], uint64_t key, uint64_t data) { uint32_t a = data; @@ -114,12 +114,12 @@ static uint64_t multiswap_enc(const uint32_t keys[12], uint64_t key, uint64_t da } /** - * \brief "MultiSwap" decryption - * \param keys 32 bit numbers in machine endianness, + * @brief "MultiSwap" decryption + * @param keys 32 bit numbers in machine endianness, * 0-4 and 6-10 must be inverted from encryption - * \param key another key, this one must be the same as for the encryption - * \param data data to decrypt - * \return decrypted data + * @param key another key, this one must be the same as for the encryption + * @param data data to decrypt + * @return decrypted data */ static uint64_t multiswap_dec(const uint32_t keys[12], uint64_t key, uint64_t data) { uint32_t a; diff --git a/libavformat/avio.h b/libavformat/avio.h index bf1ea30bb3..ed78ffaad9 100644 --- a/libavformat/avio.h +++ b/libavformat/avio.h @@ -285,11 +285,7 @@ attribute_deprecated int64_t url_fsize(AVIOContext *s); #define URL_EOF (-1) attribute_deprecated int url_fgetc(AVIOContext *s); attribute_deprecated int url_setbufsize(AVIOContext *s, int buf_size); -#ifdef __GNUC__ -attribute_deprecated int url_fprintf(AVIOContext *s, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3))); -#else -attribute_deprecated int url_fprintf(AVIOContext *s, const char *fmt, ...); -#endif +attribute_deprecated int url_fprintf(AVIOContext *s, const char *fmt, ...) av_printf_format(2, 3); attribute_deprecated void put_flush_packet(AVIOContext *s); attribute_deprecated int url_open_dyn_buf(AVIOContext **s); attribute_deprecated int url_open_dyn_packet_buf(AVIOContext **s, int max_packet_size); @@ -463,11 +459,7 @@ int64_t avio_size(AVIOContext *s); int url_feof(AVIOContext *s); /** @warning currently size is limited */ -#ifdef __GNUC__ -int avio_printf(AVIOContext *s, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3))); -#else -int avio_printf(AVIOContext *s, const char *fmt, ...); -#endif +int avio_printf(AVIOContext *s, const char *fmt, ...) av_printf_format(2, 3); void avio_flush(AVIOContext *s); diff --git a/libavformat/gxf.c b/libavformat/gxf.c index e278b9b846..7002a1d4ec 100644 --- a/libavformat/gxf.c +++ b/libavformat/gxf.c @@ -32,11 +32,11 @@ struct gxf_stream_info { }; /** - * \brief parses a packet header, extracting type and length - * \param pb AVIOContext to read header from - * \param type detected packet type is stored here - * \param length detected packet length, excluding header is stored here - * \return 0 if header not found or contains invalid data, 1 otherwise + * @brief parses a packet header, extracting type and length + * @param pb AVIOContext to read header from + * @param type detected packet type is stored here + * @param length detected packet length, excluding header is stored here + * @return 0 if header not found or contains invalid data, 1 otherwise */ static int parse_packet_header(AVIOContext *pb, GXFPktType *type, int *length) { if (avio_rb32(pb)) @@ -58,7 +58,7 @@ static int parse_packet_header(AVIOContext *pb, GXFPktType *type, int *length) { } /** - * \brief check if file starts with a PKT_MAP header + * @brief check if file starts with a PKT_MAP header */ static int gxf_probe(AVProbeData *p) { static const uint8_t startcode[] = {0, 0, 0, 0, 1, 0xbc}; // start with map packet @@ -70,10 +70,10 @@ static int gxf_probe(AVProbeData *p) { } /** - * \brief gets the stream index for the track with the specified id, creates new + * @brief gets the stream index for the track with the specified id, creates new * stream if not found - * \param id id of stream to find / add - * \param format stream format identifier + * @param id id of stream to find / add + * @param format stream format identifier */ static int get_sindex(AVFormatContext *s, int id, int format) { int i; @@ -153,9 +153,9 @@ static int get_sindex(AVFormatContext *s, int id, int format) { } /** - * \brief filters out interesting tags from material information. - * \param len length of tag section, will be adjusted to contain remaining bytes - * \param si struct to store collected information into + * @brief filters out interesting tags from material information. + * @param len length of tag section, will be adjusted to contain remaining bytes + * @param si struct to store collected information into */ static void gxf_material_tags(AVIOContext *pb, int *len, struct gxf_stream_info *si) { si->first_field = AV_NOPTS_VALUE; @@ -179,9 +179,9 @@ static void gxf_material_tags(AVIOContext *pb, int *len, struct gxf_stream_info } /** - * \brief convert fps tag value to AVRational fps - * \param fps fps value from tag - * \return fps as AVRational, or 0 / 0 if unknown + * @brief convert fps tag value to AVRational fps + * @param fps fps value from tag + * @return fps as AVRational, or 0 / 0 if unknown */ static AVRational fps_tag2avr(int32_t fps) { extern const AVRational ff_frame_rate_tab[]; @@ -190,9 +190,9 @@ static AVRational fps_tag2avr(int32_t fps) { } /** - * \brief convert UMF attributes flags to AVRational fps - * \param flags UMF flags to convert - * \return fps as AVRational, or 0 / 0 if unknown + * @brief convert UMF attributes flags to AVRational fps + * @param flags UMF flags to convert + * @return fps as AVRational, or 0 / 0 if unknown */ static AVRational fps_umf2avr(uint32_t flags) { static const AVRational map[] = {{50, 1}, {60000, 1001}, {24, 1}, @@ -202,9 +202,9 @@ static AVRational fps_umf2avr(uint32_t flags) { } /** - * \brief filters out interesting tags from track information. - * \param len length of tag section, will be adjusted to contain remaining bytes - * \param si struct to store collected information into + * @brief filters out interesting tags from track information. + * @param len length of tag section, will be adjusted to contain remaining bytes + * @param si struct to store collected information into */ static void gxf_track_tags(AVIOContext *pb, int *len, struct gxf_stream_info *si) { si->frames_per_second = (AVRational){0, 0}; @@ -228,7 +228,7 @@ static void gxf_track_tags(AVIOContext *pb, int *len, struct gxf_stream_info *si } /** - * \brief read index from FLT packet into stream 0 av_index + * @brief read index from FLT packet into stream 0 av_index */ static void gxf_read_index(AVFormatContext *s, int pkt_len) { AVIOContext *pb = s->pb; @@ -374,11 +374,11 @@ static int gxf_header(AVFormatContext *s, AVFormatParameters *ap) { } /** - * \brief resync the stream on the next media packet with specified properties - * \param max_interval how many bytes to search for matching packet at most - * \param track track id the media packet must belong to, -1 for any - * \param timestamp minimum timestamp (== field number) the packet must have, -1 for any - * \return timestamp of packet found + * @brief resync the stream on the next media packet with specified properties + * @param max_interval how many bytes to search for matching packet at most + * @param track track id the media packet must belong to, -1 for any + * @param timestamp minimum timestamp (== field number) the packet must have, -1 for any + * @return timestamp of packet found */ static int64_t gxf_resync_media(AVFormatContext *s, uint64_t max_interval, int track, int timestamp) { uint32_t tmp; diff --git a/libavformat/internal.h b/libavformat/internal.h index e0d04db43f..5636f78ec7 100644 --- a/libavformat/internal.h +++ b/libavformat/internal.h @@ -106,7 +106,7 @@ uint64_t ff_ntp_time(void); */ int ff_url_join(char *str, int size, const char *proto, const char *authorization, const char *hostname, - int port, const char *fmt, ...); + int port, const char *fmt, ...) av_printf_format(7, 8); /** * Append the media-specific SDP fragment for the media stream c diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 74c9ac931c..ad3cd824f4 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -232,11 +232,11 @@ static void set_pcr_pid(AVFormatContext *s, unsigned int programid, unsigned int } /** - * \brief discard_pid() decides if the pid is to be discarded according + * @brief discard_pid() decides if the pid is to be discarded according * to caller's programs selection - * \param ts : - TS context - * \param pid : - pid - * \return 1 if the pid is only comprised in programs that have .discard=AVDISCARD_ALL + * @param ts : - TS context + * @param pid : - pid + * @return 1 if the pid is only comprised in programs that have .discard=AVDISCARD_ALL * 0 otherwise */ static int discard_pid(MpegTSContext *ts, unsigned int pid) diff --git a/libavformat/nuv.c b/libavformat/nuv.c index db31689753..a75f1d6d7f 100644 --- a/libavformat/nuv.c +++ b/libavformat/nuv.c @@ -49,11 +49,11 @@ static int nuv_probe(AVProbeData *p) { #define PKTSIZE(s) (s & 0xffffff) /** - * \brief read until we found all data needed for decoding - * \param vst video stream of which to change parameters - * \param ast video stream of which to change parameters - * \param myth set if this is a MythTVVideo format file - * \return 1 if all required codec data was found + * @brief read until we found all data needed for decoding + * @param vst video stream of which to change parameters + * @param ast video stream of which to change parameters + * @param myth set if this is a MythTVVideo format file + * @return 1 if all required codec data was found */ static int get_codec_data(AVIOContext *pb, AVStream *vst, AVStream *ast, int myth) { diff --git a/libavformat/rtpproto.c b/libavformat/rtpproto.c index 8b23f25c46..d4d7f3cb85 100644 --- a/libavformat/rtpproto.c +++ b/libavformat/rtpproto.c @@ -86,7 +86,7 @@ int rtp_set_remote_url(URLContext *h, const char *uri) * "http://host:port/path?option1=val1&option2=val2... */ -static void url_add_option(char *buf, int buf_size, const char *fmt, ...) +static av_printf_format(3, 4) void url_add_option(char *buf, int buf_size, const char *fmt, ...) { char buf1[1024]; va_list ap; |