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
This commit is contained in:
Panagiotis Issaris
2007-03-12 14:17:26 +00:00
parent 318c5e0524
commit 750f0e1f8b
5 changed files with 84 additions and 30 deletions

View File

@@ -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 */