Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
20a5956b
Commit
20a5956b
authored
Sep 26, 2014
by
Vittorio Giovara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dump: split audio and video probing on multiple lines
Also always report pixel format.
parent
5a419b2d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
15 deletions
+26
-15
utils.c
libavcodec/utils.c
+12
-7
dump.c
libavformat/dump.c
+14
-8
No files found.
libavcodec/utils.c
View file @
20a5956b
...
...
@@ -1887,6 +1887,7 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
const
AVCodec
*
p
;
char
buf1
[
32
];
int
bitrate
;
int
new_line
=
0
;
AVRational
display_aspect_ratio
;
if
(
enc
->
codec
)
...
...
@@ -1919,15 +1920,19 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
if
(
profile
)
snprintf
(
buf
+
strlen
(
buf
),
buf_size
-
strlen
(
buf
),
" (%s)"
,
profile
);
if
(
enc
->
pix_fmt
!=
AV_PIX_FMT_NONE
)
{
snprintf
(
buf
+
strlen
(
buf
),
buf_size
-
strlen
(
buf
),
", %s"
,
av_strlcat
(
buf
,
"
\n
"
,
buf_size
);
snprintf
(
buf
+
strlen
(
buf
),
buf_size
-
strlen
(
buf
),
"%s"
,
enc
->
pix_fmt
==
AV_PIX_FMT_NONE
?
"none"
:
av_get_pix_fmt_name
(
enc
->
pix_fmt
));
}
if
(
enc
->
width
)
{
av_strlcat
(
buf
,
new_line
?
"
\n
"
:
", "
,
buf_size
);
snprintf
(
buf
+
strlen
(
buf
),
buf_size
-
strlen
(
buf
),
"
,
%dx%d"
,
"%dx%d"
,
enc
->
width
,
enc
->
height
);
if
(
enc
->
sample_aspect_ratio
.
num
)
{
av_reduce
(
&
display_aspect_ratio
.
num
,
&
display_aspect_ratio
.
den
,
enc
->
width
*
enc
->
sample_aspect_ratio
.
num
,
...
...
@@ -1957,11 +1962,11 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
if
(
profile
)
snprintf
(
buf
+
strlen
(
buf
),
buf_size
-
strlen
(
buf
),
" (%s)"
,
profile
);
av_strlcat
(
buf
,
"
\n
"
,
buf_size
);
if
(
enc
->
sample_rate
)
{
snprintf
(
buf
+
strlen
(
buf
),
buf_size
-
strlen
(
buf
),
"
, %d Hz
"
,
enc
->
sample_rate
);
"
%d Hz,
"
,
enc
->
sample_rate
);
}
av_strlcat
(
buf
,
", "
,
buf_size
);
av_get_channel_layout_string
(
buf
+
strlen
(
buf
),
buf_size
-
strlen
(
buf
),
enc
->
channels
,
enc
->
channel_layout
);
if
(
enc
->
sample_fmt
!=
AV_SAMPLE_FMT_NONE
)
{
snprintf
(
buf
+
strlen
(
buf
),
buf_size
-
strlen
(
buf
),
...
...
libavformat/dump.c
View file @
20a5956b
...
...
@@ -116,11 +116,11 @@ static void print_fps(double d, const char *postfix)
{
uint64_t
v
=
lrintf
(
d
*
100
);
if
(
v
%
100
)
av_log
(
NULL
,
AV_LOG_INFO
,
"
,
%3.2f %s"
,
d
,
postfix
);
av_log
(
NULL
,
AV_LOG_INFO
,
"%3.2f %s"
,
d
,
postfix
);
else
if
(
v
%
(
100
*
1000
))
av_log
(
NULL
,
AV_LOG_INFO
,
"
,
%1.0f %s"
,
d
,
postfix
);
av_log
(
NULL
,
AV_LOG_INFO
,
"%1.0f %s"
,
d
,
postfix
);
else
av_log
(
NULL
,
AV_LOG_INFO
,
"
,
%1.0fk %s"
,
d
/
1000
,
postfix
);
av_log
(
NULL
,
AV_LOG_INFO
,
"%1.0fk %s"
,
d
/
1000
,
postfix
);
}
static
void
dump_metadata
(
void
*
ctx
,
AVDictionary
*
m
,
const
char
*
indent
)
...
...
@@ -357,11 +357,17 @@ static void dump_stream_format(AVFormatContext *ic, int i,
}
if
(
st
->
codec
->
codec_type
==
AVMEDIA_TYPE_VIDEO
)
{
if
(
st
->
avg_frame_rate
.
den
&&
st
->
avg_frame_rate
.
num
)
print_fps
(
av_q2d
(
st
->
avg_frame_rate
),
"fps"
);
if
(
st
->
time_base
.
den
&&
st
->
time_base
.
num
)
print_fps
(
1
/
av_q2d
(
st
->
time_base
),
"tbn"
);
if
(
st
->
codec
->
time_base
.
den
&&
st
->
codec
->
time_base
.
num
)
int
fps
=
st
->
avg_frame_rate
.
den
&&
st
->
avg_frame_rate
.
num
;
int
tbn
=
st
->
time_base
.
den
&&
st
->
time_base
.
num
;
int
tbc
=
st
->
codec
->
time_base
.
den
&&
st
->
codec
->
time_base
.
num
;
if
(
fps
||
tbn
||
tbc
)
av_log
(
NULL
,
AV_LOG_INFO
,
"
\n
"
);
if
(
fps
)
print_fps
(
av_q2d
(
st
->
avg_frame_rate
),
tbn
||
tbc
?
"fps, "
:
"fps"
);
if
(
tbn
)
print_fps
(
1
/
av_q2d
(
st
->
time_base
),
tbc
?
"tbn, "
:
"tbn"
);
if
(
tbc
)
print_fps
(
1
/
av_q2d
(
st
->
codec
->
time_base
),
"tbc"
);
}
...
...
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