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
65cc3915
Commit
65cc3915
authored
Feb 28, 2016
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/avf_showvolume: support unknown channel layouts too
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
14925072
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
7 deletions
+13
-7
avf_showvolume.c
libavfilter/avf_showvolume.c
+13
-7
No files found.
libavfilter/avf_showvolume.c
View file @
65cc3915
...
...
@@ -102,7 +102,7 @@ static int query_formats(AVFilterContext *ctx)
if
((
ret
=
ff_formats_ref
(
formats
,
&
inlink
->
out_formats
))
<
0
)
return
ret
;
layouts
=
ff_all_channel_
layou
ts
();
layouts
=
ff_all_channel_
coun
ts
();
if
((
ret
=
ff_channel_layouts_ref
(
layouts
,
&
inlink
->
out_channel_layouts
))
<
0
)
return
ret
;
...
...
@@ -242,9 +242,12 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
}
}
if
(
outlink
->
h
>
40
&&
s
->
draw_text
)
drawtext
(
s
->
out
,
c
*
(
s
->
h
+
s
->
b
)
+
(
s
->
h
-
10
)
/
2
,
outlink
->
h
-
35
,
av_get_channel_name
(
av_channel_layout_extract_channel
(
insamples
->
channel_layout
,
c
)),
1
);
if
(
outlink
->
h
>
40
&&
s
->
draw_text
)
{
const
char
*
channel_name
=
av_get_channel_name
(
av_channel_layout_extract_channel
(
insamples
->
channel_layout
,
c
));
if
(
!
channel_name
)
continue
;
drawtext
(
s
->
out
,
c
*
(
s
->
h
+
s
->
b
)
+
(
s
->
h
-
10
)
/
2
,
outlink
->
h
-
35
,
channel_name
,
1
);
}
}
}
else
{
for
(
c
=
0
;
c
<
inlink
->
channels
;
c
++
)
{
...
...
@@ -270,9 +273,12 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
}
}
if
(
s
->
h
>=
8
&&
s
->
draw_text
)
drawtext
(
s
->
out
,
2
,
c
*
(
s
->
h
+
s
->
b
)
+
(
s
->
h
-
8
)
/
2
,
av_get_channel_name
(
av_channel_layout_extract_channel
(
insamples
->
channel_layout
,
c
)),
0
);
if
(
s
->
h
>=
8
&&
s
->
draw_text
)
{
const
char
*
channel_name
=
av_get_channel_name
(
av_channel_layout_extract_channel
(
insamples
->
channel_layout
,
c
));
if
(
!
channel_name
)
continue
;
drawtext
(
s
->
out
,
2
,
c
*
(
s
->
h
+
s
->
b
)
+
(
s
->
h
-
8
)
/
2
,
channel_name
,
0
);
}
}
}
...
...
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