diff avformat.h @ 1908:174083eafc6c libavformat

Introduce two new logging functions av_hex_dump_log() and av_pkt_dump_log() which use av_log() for logging instead of fprintf().
author takis
date Mon, 12 Mar 2007 14:17:26 +0000
parents 330115d147d6
children 7ccf23e42481
line wrap: on
line diff
--- a/avformat.h	Mon Mar 12 12:36:41 2007 +0000
+++ b/avformat.h	Mon Mar 12 14:17:26 2007 +0000
@@ -444,21 +444,51 @@
                             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 */