Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
045dd4b9
Commit
045dd4b9
authored
Apr 29, 2011
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace some commented-out debug printf() / av_log() messages with av_dlog().
parent
d1be646e
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
43 additions
and
80 deletions
+43
-80
ffplay.c
ffplay.c
+3
-5
mpegaudioenc.c
libavcodec/mpegaudioenc.c
+7
-13
mpegvideo_parser.c
libavcodec/mpegvideo_parser.c
+2
-4
parser.c
libavcodec/parser.c
+3
-4
v4l.c
libavdevice/v4l.c
+2
-8
mpeg.c
libavformat/mpeg.c
+3
-4
mpegenc.c
libavformat/mpegenc.c
+3
-8
mpegts.c
libavformat/mpegts.c
+2
-4
oggdec.c
libavformat/oggdec.c
+4
-12
rmdec.c
libavformat/rmdec.c
+7
-9
utils.c
libavformat/utils.c
+7
-9
No files found.
ffplay.c
View file @
045dd4b9
...
...
@@ -2028,11 +2028,9 @@ static int synchronize_audio(VideoState *is, short *samples,
samples_size
=
wanted_size
;
}
}
#if 0
printf("diff=%f adiff=%f sample_diff=%d apts=%0.3f vpts=%0.3f %f\n",
diff, avg_diff, samples_size - samples_size1,
is->audio_clock, is->video_clock, is->audio_diff_threshold);
#endif
av_dlog
(
NULL
,
"diff=%f adiff=%f sample_diff=%d apts=%0.3f vpts=%0.3f %f
\n
"
,
diff
,
avg_diff
,
samples_size
-
samples_size1
,
is
->
audio_clock
,
is
->
video_clock
,
is
->
audio_diff_threshold
);
}
}
else
{
/* too big difference : may be initial PTS errors, so
...
...
libavcodec/mpegaudioenc.c
View file @
045dd4b9
...
...
@@ -399,10 +399,8 @@ static void compute_scale_factors(unsigned char scale_code[SBLIMIT],
index
=
62
;
/* value 63 is not allowed */
}
#if 0
printf("%2d:%d in=%x %x %d\n",
j, i, vmax, scale_factor_table[index], index);
#endif
av_dlog
(
NULL
,
"%2d:%d in=%x %x %d
\n
"
,
j
,
i
,
vmax
,
scale_factor_table
[
index
],
index
);
/* store the scale factor */
assert
(
index
>=
0
&&
index
<=
63
);
sf
[
i
]
=
index
;
...
...
@@ -470,10 +468,8 @@ static void compute_scale_factors(unsigned char scale_code[SBLIMIT],
code
=
0
;
/* kill warning */
}
#if 0
printf("%d: %2d %2d %2d %d %d -> %d\n", j,
sf[0], sf[1], sf[2], d1, d2, code);
#endif
av_dlog
(
NULL
,
"%d: %2d %2d %2d %d %d -> %d
\n
"
,
j
,
sf
[
0
],
sf
[
1
],
sf
[
2
],
d1
,
d2
,
code
);
scale_code
[
j
]
=
code
;
sf
+=
3
;
}
...
...
@@ -547,11 +543,9 @@ static void compute_bit_allocation(MpegAudioContext *s,
}
}
}
#if 0
printf("current=%d max=%d max_sb=%d alloc=%d\n",
current_frame_size, max_frame_size, max_sb,
bit_alloc[max_sb]);
#endif
av_dlog
(
NULL
,
"current=%d max=%d max_sb=%d alloc=%d
\n
"
,
current_frame_size
,
max_frame_size
,
max_sb
,
bit_alloc
[
max_sb
]);
if
(
max_sb
<
0
)
break
;
...
...
libavcodec/mpegvideo_parser.c
View file @
045dd4b9
...
...
@@ -152,10 +152,8 @@ static int mpegvideo_parse(AVCodecParserContext *s,
to have the full timing information. The time take by this
function should be negligible for uncorrupted streams */
mpegvideo_extract_headers
(
s
,
avctx
,
buf
,
buf_size
);
#if 0
printf("pict_type=%d frame_rate=%0.3f repeat_pict=%d\n",
s->pict_type, (double)avctx->time_base.den / avctx->time_base.num, s->repeat_pict);
#endif
av_dlog
(
NULL
,
"pict_type=%d frame_rate=%0.3f repeat_pict=%d
\n
"
,
s
->
pict_type
,
(
double
)
avctx
->
time_base
.
den
/
avctx
->
time_base
.
num
,
s
->
repeat_pict
);
*
poutbuf
=
buf
;
*
poutbuf_size
=
buf_size
;
...
...
libavcodec/parser.c
View file @
045dd4b9
...
...
@@ -221,12 +221,11 @@ void av_parser_close(AVCodecParserContext *s)
*/
int
ff_combine_frame
(
ParseContext
*
pc
,
int
next
,
const
uint8_t
**
buf
,
int
*
buf_size
)
{
#if 0
if
(
pc
->
overread
){
printf("overread %d, state:%X next:%d index:%d o_index:%d\n", pc->overread, pc->state, next, pc->index, pc->overread_index);
printf("%X %X %X %X\n", (*buf)[0], (*buf)[1],(*buf)[2],(*buf)[3]);
av_dlog
(
pc
,
"overread %d, state:%X next:%d index:%d o_index:%d
\n
"
,
pc
->
overread
,
pc
->
state
,
next
,
pc
->
index
,
pc
->
overread_index
);
av_dlog
(
pc
,
"%X %X %X %X
\n
"
,
(
*
buf
)[
0
],
(
*
buf
)[
1
],
(
*
buf
)[
2
],
(
*
buf
)[
3
]);
}
#endif
/* Copy overread bytes from last frame into buffer. */
for
(;
pc
->
overread
>
0
;
pc
->
overread
--
){
...
...
libavdevice/v4l.c
View file @
045dd4b9
...
...
@@ -149,14 +149,8 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
ioctl
(
video_fd
,
VIDIOCSAUDIO
,
&
audio
);
ioctl
(
video_fd
,
VIDIOCGPICT
,
&
pict
);
#if 0
printf("v4l: colour=%d hue=%d brightness=%d constrast=%d whiteness=%d\n",
pict.colour,
pict.hue,
pict.brightness,
pict.contrast,
pict.whiteness);
#endif
av_dlog
(
s1
,
"v4l: colour=%d hue=%d brightness=%d constrast=%d whiteness=%d
\n
"
,
pict
.
colour
,
pict
.
hue
,
pict
.
brightness
,
pict
.
contrast
,
pict
.
whiteness
);
/* try to choose a suitable video format */
pict
.
palette
=
desired_palette
;
pict
.
depth
=
desired_depth
;
...
...
libavformat/mpeg.c
View file @
045dd4b9
...
...
@@ -569,10 +569,9 @@ static int mpegps_read_packet(AVFormatContext *s,
pkt
->
dts
=
dts
;
pkt
->
pos
=
dummy_pos
;
pkt
->
stream_index
=
st
->
index
;
#if 0
av_log(s, AV_LOG_DEBUG, "%d: pts=%0.3f dts=%0.3f size=%d\n",
pkt->stream_index, pkt->pts / 90000.0, pkt->dts / 90000.0, pkt->size);
#endif
av_dlog
(
s
,
AV_LOG_DEBUG
,
"%d: pts=%0.3f dts=%0.3f size=%d
\n
"
,
pkt
->
stream_index
,
pkt
->
pts
/
90000
.
0
,
pkt
->
dts
/
90000
.
0
,
pkt
->
size
);
return
0
;
}
...
...
libavformat/mpegenc.c
View file @
045dd4b9
...
...
@@ -662,10 +662,7 @@ static int flush_packet(AVFormatContext *ctx, int stream_index,
id
=
stream
->
id
;
#if 0
printf("packet ID=%2x PTS=%0.3f\n",
id, pts / 90000.0);
#endif
av_dlog
(
ctx
,
"packet ID=%2x PTS=%0.3f
\n
"
,
id
,
pts
/
90000
.
0
);
buf_ptr
=
buffer
;
...
...
@@ -1078,10 +1075,8 @@ retry:
best_dts
=
pkt_desc
->
dts
;
}
#if 0
av_log(ctx, AV_LOG_DEBUG, "bumping scr, scr:%f, dts:%f\n",
scr/90000.0, best_dts/90000.0);
#endif
av_dlog
(
ctx
,
AV_LOG_DEBUG
,
"bumping scr, scr:%f, dts:%f
\n
"
,
scr
/
90000
.
0
,
best_dts
/
90000
.
0
);
if
(
best_dts
==
INT64_MAX
)
return
0
;
...
...
libavformat/mpegts.c
View file @
045dd4b9
...
...
@@ -1538,10 +1538,8 @@ static int mpegts_read_header(AVFormatContext *s,
s
->
bit_rate
=
(
TS_PACKET_SIZE
*
8
)
*
27e6
/
ts
->
pcr_incr
;
st
->
codec
->
bit_rate
=
s
->
bit_rate
;
st
->
start_time
=
ts
->
cur_pcr
;
#if 0
av_log(ts->stream, AV_LOG_DEBUG, "start=%0.3f pcr=%0.3f incr=%d\n",
st->start_time / 1000000.0, pcrs[0] / 27e6, ts->pcr_incr);
#endif
av_dlog
(
ts
->
stream
,
AV_LOG_DEBUG
,
"start=%0.3f pcr=%0.3f incr=%d
\n
"
,
st
->
start_time
/
1000000
.
0
,
pcrs
[
0
]
/
27e6
,
ts
->
pcr_incr
);
}
avio_seek
(
pb
,
pos
,
SEEK_SET
);
...
...
libavformat/oggdec.c
View file @
045dd4b9
...
...
@@ -316,9 +316,7 @@ ogg_packet (AVFormatContext * s, int *str, int *dstart, int *dsize, int64_t *fpo
int
complete
=
0
;
int
segp
=
0
,
psize
=
0
;
#if 0
av_log (s, AV_LOG_DEBUG, "ogg_packet: curidx=%i\n", ogg->curidx);
#endif
av_dlog
(
s
,
AV_LOG_DEBUG
,
"ogg_packet: curidx=%i
\n
"
,
ogg
->
curidx
);
do
{
idx
=
ogg
->
curidx
;
...
...
@@ -330,11 +328,9 @@ ogg_packet (AVFormatContext * s, int *str, int *dstart, int *dsize, int64_t *fpo
os
=
ogg
->
streams
+
idx
;
#if 0
av_log (s, AV_LOG_DEBUG,
av_dlog
(
s
,
AV_LOG_DEBUG
,
"ogg_packet: idx=%d pstart=%d psize=%d segp=%d nsegs=%d
\n
"
,
idx
,
os
->
pstart
,
os
->
psize
,
os
->
segp
,
os
->
nsegs
);
#endif
if
(
!
os
->
codec
){
if
(
os
->
header
<
0
){
...
...
@@ -366,11 +362,9 @@ ogg_packet (AVFormatContext * s, int *str, int *dstart, int *dsize, int64_t *fpo
}
}
while
(
!
complete
);
#if 0
av_log (s, AV_LOG_DEBUG,
av_dlog
(
s
,
AV_LOG_DEBUG
,
"ogg_packet: idx %i, frame size %i, start %i
\n
"
,
idx
,
os
->
psize
,
os
->
pstart
);
#endif
if
(
os
->
granule
==
-
1
)
av_log
(
s
,
AV_LOG_WARNING
,
"Page at %"
PRId64
" is missing granule
\n
"
,
os
->
page_pos
);
...
...
@@ -451,9 +445,7 @@ ogg_get_headers (AVFormatContext * s)
return
-
1
;
}
while
(
!
ogg
->
headers
);
#if 0
av_log (s, AV_LOG_DEBUG, "found headers\n");
#endif
av_dlog
(
s
,
AV_LOG_DEBUG
,
"found headers
\n
"
);
return
0
;
}
...
...
libavformat/rmdec.c
View file @
045dd4b9
...
...
@@ -414,15 +414,13 @@ static int rm_read_header(AVFormatContext *s, AVFormatParameters *ap)
tag
=
avio_rl32
(
pb
);
tag_size
=
avio_rb32
(
pb
);
avio_rb16
(
pb
);
#if 0
printf("tag=%c%c%c%c (%08x) size=%d\n",
(tag) & 0xff,
(tag >> 8) & 0xff,
(tag >> 16) & 0xff,
(tag >> 24) & 0xff,
tag,
tag_size);
#endif
av_dlog
(
s
,
"tag=%c%c%c%c (%08x) size=%d
\n
"
,
(
tag
)
&
0xff
,
(
tag
>>
8
)
&
0xff
,
(
tag
>>
16
)
&
0xff
,
(
tag
>>
24
)
&
0xff
,
tag
,
tag_size
);
if
(
tag_size
<
10
&&
tag
!=
MKTAG
(
'D'
,
'A'
,
'T'
,
'A'
))
return
-
1
;
switch
(
tag
)
{
...
...
libavformat/utils.c
View file @
045dd4b9
...
...
@@ -1974,22 +1974,20 @@ static void av_estimate_timings(AVFormatContext *ic, int64_t old_offset)
}
av_update_stream_timings
(
ic
);
#if 0
{
int
i
;
AVStream
*
st
;
for
(
i
=
0
;
i
<
ic
->
nb_streams
;
i
++
)
{
st
=
ic
->
streams
[
i
];
printf("%d: start_time: %0.3f duration: %0.3f\n"
,
i, (double)
st->start_time / AV_TIME_BASE,
(double)st->duration
/ AV_TIME_BASE);
av_dlog
(
ic
,
"%d: start_time: %0.3f duration: %0.3f
\n
"
,
i
,
(
double
)
st
->
start_time
/
AV_TIME_BASE
,
(
double
)
st
->
duration
/
AV_TIME_BASE
);
}
printf(
"stream: start_time: %0.3f duration: %0.3f bitrate=%d kb/s\n",
(double)
ic->start_time / AV_TIME_BASE,
(double)ic->duration
/ AV_TIME_BASE,
ic->bit_rate / 1000);
av_dlog
(
ic
,
"stream: start_time: %0.3f duration: %0.3f bitrate=%d kb/s
\n
"
,
(
double
)
ic
->
start_time
/
AV_TIME_BASE
,
(
double
)
ic
->
duration
/
AV_TIME_BASE
,
ic
->
bit_rate
/
1000
);
}
#endif
}
static
int
has_codec_parameters
(
AVCodecContext
*
enc
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment