libavformat: Add av_pkt_dump{, _log}2, taking an AVStream parameter

This removes a fixme issue, by allowing the av_pkt_dump functions
to use the correct time base.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit 863c471638)
This commit is contained in:
Martin Storsjö
2011-02-24 10:08:06 +02:00
committed by Michael Niedermayer
parent 62d0a7453a
commit 08ad81cbff
2 changed files with 31 additions and 11 deletions

View File

@@ -951,7 +951,7 @@ enum CodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name,
* @param buf buffer
* @param size buffer size
*
* @see av_hex_dump_log, av_pkt_dump, av_pkt_dump_log
* @see av_hex_dump_log, av_pkt_dump2, av_pkt_dump_log2
*/
void av_hex_dump(FILE *f, uint8_t *buf, int size);
@@ -965,7 +965,7 @@ void av_hex_dump(FILE *f, uint8_t *buf, int size);
* @param buf buffer
* @param size buffer size
*
* @see av_hex_dump, av_pkt_dump, av_pkt_dump_log
* @see av_hex_dump, av_pkt_dump2, av_pkt_dump_log2
*/
void av_hex_dump_log(void *avcl, int level, uint8_t *buf, int size);
@@ -975,8 +975,11 @@ void av_hex_dump_log(void *avcl, int level, uint8_t *buf, int size);
* @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.
* @param st AVStream that the packet belongs to
*/
void av_pkt_dump(FILE *f, AVPacket *pkt, int dump_payload);
void av_pkt_dump2(FILE *f, AVPacket *pkt, int dump_payload, AVStream *st);
attribute_deprecated void av_pkt_dump(FILE *f, AVPacket *pkt, int dump_payload);
/**
* Send a nice dump of a packet to the log.
@@ -987,8 +990,13 @@ void av_pkt_dump(FILE *f, AVPacket *pkt, int dump_payload);
* higher importance.
* @param pkt packet to dump
* @param dump_payload True if the payload must be displayed, too.
* @param st AVStream that the packet belongs to
*/
void av_pkt_dump_log(void *avcl, int level, AVPacket *pkt, int dump_payload);
void av_pkt_dump_log2(void *avcl, int level, AVPacket *pkt, int dump_payload,
AVStream *st);
attribute_deprecated void av_pkt_dump_log(void *avcl, int level, AVPacket *pkt,
int dump_payload);
/**
* Initialize libavformat and register all the muxers, demuxers and