diff options
author | Panagiotis Issaris <takis.issaris@uhasselt.be> | 2007-03-12 14:17:26 +0000 |
---|---|---|
committer | Panagiotis Issaris <takis.issaris@uhasselt.be> | 2007-03-12 14:17:26 +0000 |
commit | 750f0e1f8b6c04ca4562a64fd1049f322ba05aa8 (patch) | |
tree | 7aa6d486cf256887b2590a004bfde0179749a9d8 /libavformat/avformat.h | |
parent | 318c5e052415aada4036c382cb0ef243113f667a (diff) | |
download | ffmpeg-750f0e1f8b6c04ca4562a64fd1049f322ba05aa8.tar.gz |
Introduce two new logging functions av_hex_dump_log() and av_pkt_dump_log()
which use av_log() for logging instead of fprintf().
Originally committed as revision 8339 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/avformat.h')
-rw-r--r-- | libavformat/avformat.h | 38 |
1 files changed, 34 insertions, 4 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h index b6fefaf33b..f1b29b3fbd 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -444,21 +444,51 @@ enum CodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name, const char *filename, const char *mime_type, enum CodecType type); /** - * Print nice hexa dump of a buffer - * @param f stream for output + * Send a nice hexadecimal dump of a buffer to the specified file stream. + * + * @param f The file stream pointer where the dump should be sent to. * @param buf buffer * @param size buffer size + * + * @see av_hex_dump_log, av_pkt_dump, av_pkt_dump_log */ void av_hex_dump(FILE *f, uint8_t *buf, int size); /** - * Print on 'f' a nice dump of a packet - * @param f stream for output + * Send a nice hexadecimal dump of a buffer to the log. + * + * @param avcl A pointer to an arbitrary struct of which the first field is a + * pointer to an AVClass struct. + * @param level The importance level of the message, lower values signifying + * higher importance. + * @param buf buffer + * @param size buffer size + * + * @see av_hex_dump, av_pkt_dump, av_pkt_dump_log + */ +void av_hex_dump_log(void *avcl, int level, uint8_t *buf, int size); + +/** + * Send a nice dump of a packet to the specified file stream. + * + * @param f The file stream pointer where the dump should be sent to. * @param pkt packet to dump * @param dump_payload true if the payload must be displayed too */ void av_pkt_dump(FILE *f, AVPacket *pkt, int dump_payload); +/** + * Send a nice dump of a packet to the log. + * + * @param avcl A pointer to an arbitrary struct of which the first field is a + * pointer to an AVClass struct. + * @param level The importance level of the message, lower values signifying + * higher importance. + * @param pkt packet to dump + * @param dump_payload true if the payload must be displayed too + */ +void av_pkt_dump_log(void *avcl, int level, AVPacket *pkt, int dump_payload); + void av_register_all(void); /** codec tag <-> codec id */ |