comparison 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
comparison
equal deleted inserted replaced
1907:b33db97089ba 1908:174083eafc6c
442 */ 442 */
443 enum CodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name, 443 enum CodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name,
444 const char *filename, const char *mime_type, enum CodecType type); 444 const char *filename, const char *mime_type, enum CodecType type);
445 445
446 /** 446 /**
447 * Print nice hexa dump of a buffer 447 * Send a nice hexadecimal dump of a buffer to the specified file stream.
448 * @param f stream for output 448 *
449 * @param f The file stream pointer where the dump should be sent to.
449 * @param buf buffer 450 * @param buf buffer
450 * @param size buffer size 451 * @param size buffer size
452 *
453 * @see av_hex_dump_log, av_pkt_dump, av_pkt_dump_log
451 */ 454 */
452 void av_hex_dump(FILE *f, uint8_t *buf, int size); 455 void av_hex_dump(FILE *f, uint8_t *buf, int size);
453 456
454 /** 457 /**
455 * Print on 'f' a nice dump of a packet 458 * Send a nice hexadecimal dump of a buffer to the log.
456 * @param f stream for output 459 *
460 * @param avcl A pointer to an arbitrary struct of which the first field is a
461 * pointer to an AVClass struct.
462 * @param level The importance level of the message, lower values signifying
463 * higher importance.
464 * @param buf buffer
465 * @param size buffer size
466 *
467 * @see av_hex_dump, av_pkt_dump, av_pkt_dump_log
468 */
469 void av_hex_dump_log(void *avcl, int level, uint8_t *buf, int size);
470
471 /**
472 * Send a nice dump of a packet to the specified file stream.
473 *
474 * @param f The file stream pointer where the dump should be sent to.
457 * @param pkt packet to dump 475 * @param pkt packet to dump
458 * @param dump_payload true if the payload must be displayed too 476 * @param dump_payload true if the payload must be displayed too
459 */ 477 */
460 void av_pkt_dump(FILE *f, AVPacket *pkt, int dump_payload); 478 void av_pkt_dump(FILE *f, AVPacket *pkt, int dump_payload);
479
480 /**
481 * Send a nice dump of a packet to the log.
482 *
483 * @param avcl A pointer to an arbitrary struct of which the first field is a
484 * pointer to an AVClass struct.
485 * @param level The importance level of the message, lower values signifying
486 * higher importance.
487 * @param pkt packet to dump
488 * @param dump_payload true if the payload must be displayed too
489 */
490 void av_pkt_dump_log(void *avcl, int level, AVPacket *pkt, int dump_payload);
461 491
462 void av_register_all(void); 492 void av_register_all(void);
463 493
464 /** codec tag <-> codec id */ 494 /** codec tag <-> codec id */
465 enum CodecID av_codec_get_id(const struct AVCodecTag **tags, unsigned int tag); 495 enum CodecID av_codec_get_id(const struct AVCodecTag **tags, unsigned int tag);