Commit 0b034be7 authored by michael's avatar michael

Make timestamp debuging work nicer.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@13728 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 0832fd5f
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#define FFMPEG_AVFORMAT_H #define FFMPEG_AVFORMAT_H
#define LIBAVFORMAT_VERSION_MAJOR 52 #define LIBAVFORMAT_VERSION_MAJOR 52
#define LIBAVFORMAT_VERSION_MINOR 15 #define LIBAVFORMAT_VERSION_MINOR 16
#define LIBAVFORMAT_VERSION_MICRO 0 #define LIBAVFORMAT_VERSION_MICRO 0
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
...@@ -549,6 +549,12 @@ typedef struct AVFormatContext { ...@@ -549,6 +549,12 @@ typedef struct AVFormatContext {
unsigned int nb_chapters; unsigned int nb_chapters;
AVChapter **chapters; AVChapter **chapters;
/**
* Flags to enable debuging.
*/
int debug;
#define FF_FDEBUG_TS 0x0001
} AVFormatContext; } AVFormatContext;
typedef struct AVPacketList { typedef struct AVPacketList {
......
...@@ -326,6 +326,8 @@ static const AVOption options[]={ ...@@ -326,6 +326,8 @@ static const AVOption options[]={
{"cryptokey", "decryption key", OFFSET(key), FF_OPT_TYPE_BINARY, 0, 0, 0, D}, {"cryptokey", "decryption key", OFFSET(key), FF_OPT_TYPE_BINARY, 0, 0, 0, D},
{"indexmem", "max memory used for timestamp index (per stream)", OFFSET(max_index_size), FF_OPT_TYPE_INT, 1<<20, 0, INT_MAX, D}, {"indexmem", "max memory used for timestamp index (per stream)", OFFSET(max_index_size), FF_OPT_TYPE_INT, 1<<20, 0, INT_MAX, D},
{"rtbufsize", "max memory used for buffering real-time frames", OFFSET(max_picture_buffer), FF_OPT_TYPE_INT, 3041280, 0, INT_MAX, D}, /* defaults to 1s of 15fps 352x288 YUYV422 video */ {"rtbufsize", "max memory used for buffering real-time frames", OFFSET(max_picture_buffer), FF_OPT_TYPE_INT, 3041280, 0, INT_MAX, D}, /* defaults to 1s of 15fps 352x288 YUYV422 video */
{"fdebug", "print specific debug info", OFFSET(debug), FF_OPT_TYPE_FLAGS, DEFAULT, 0, INT_MAX, E|D, "fdebug"},
{"ts", NULL, 0, FF_OPT_TYPE_CONST, FF_FDEBUG_TS, INT_MIN, INT_MAX, E|D, "fdebug"},
{NULL}, {NULL},
}; };
...@@ -880,7 +882,7 @@ static int av_read_frame_internal(AVFormatContext *s, AVPacket *pkt) ...@@ -880,7 +882,7 @@ static int av_read_frame_internal(AVFormatContext *s, AVPacket *pkt)
} }
st = s->streams[s->cur_pkt.stream_index]; st = s->streams[s->cur_pkt.stream_index];
if(st->codec->debug & FF_DEBUG_PTS) if(s->debug & FF_FDEBUG_TS)
av_log(s, AV_LOG_DEBUG, "av_read_packet stream=%d, pts=%"PRId64", dts=%"PRId64", size=%d\n", av_log(s, AV_LOG_DEBUG, "av_read_packet stream=%d, pts=%"PRId64", dts=%"PRId64", size=%d\n",
s->cur_pkt.stream_index, s->cur_pkt.stream_index,
s->cur_pkt.pts, s->cur_pkt.pts,
...@@ -905,7 +907,7 @@ static int av_read_frame_internal(AVFormatContext *s, AVPacket *pkt) ...@@ -905,7 +907,7 @@ static int av_read_frame_internal(AVFormatContext *s, AVPacket *pkt)
} }
} }
} }
if(st->codec->debug & FF_DEBUG_PTS) if(s->debug & FF_FDEBUG_TS)
av_log(s, AV_LOG_DEBUG, "av_read_frame_internal stream=%d, pts=%"PRId64", dts=%"PRId64", size=%d\n", av_log(s, AV_LOG_DEBUG, "av_read_frame_internal stream=%d, pts=%"PRId64", dts=%"PRId64", size=%d\n",
pkt->stream_index, pkt->stream_index,
pkt->pts, pkt->pts,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment