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
49eda27c
Commit
49eda27c
authored
Jun 03, 2018
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/avf_showspectrum: also show sample rate and channel layout
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
9add1786
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
avf_showspectrum.c
libavfilter/avf_showspectrum.c
+10
-0
No files found.
libavfilter/avf_showspectrum.c
View file @
49eda27c
...
@@ -1082,9 +1082,19 @@ static int showspectrumpic_request_frame(AVFilterLink *outlink)
...
@@ -1082,9 +1082,19 @@ static int showspectrumpic_request_frame(AVFilterLink *outlink)
if
(
s
->
legend
)
{
if
(
s
->
legend
)
{
int
multi
=
(
s
->
mode
==
SEPARATE
&&
s
->
color_mode
==
CHANNEL
);
int
multi
=
(
s
->
mode
==
SEPARATE
&&
s
->
color_mode
==
CHANNEL
);
float
spp
=
samples
/
(
float
)
sz
;
float
spp
=
samples
/
(
float
)
sz
;
char
*
text
;
uint8_t
*
dst
;
uint8_t
*
dst
;
char
chlayout_str
[
128
];
av_get_channel_layout_string
(
chlayout_str
,
sizeof
(
chlayout_str
),
inlink
->
channels
,
inlink
->
channel_layout
);
text
=
av_asprintf
(
"%d Hz | %s"
,
inlink
->
sample_rate
,
chlayout_str
);
drawtext
(
s
->
outpicref
,
2
,
outlink
->
h
-
10
,
"CREATED BY LIBAVFILTER"
,
0
);
drawtext
(
s
->
outpicref
,
2
,
outlink
->
h
-
10
,
"CREATED BY LIBAVFILTER"
,
0
);
drawtext
(
s
->
outpicref
,
outlink
->
w
-
2
-
strlen
(
text
)
*
10
,
outlink
->
h
-
10
,
text
,
0
);
av_freep
(
&
text
);
dst
=
s
->
outpicref
->
data
[
0
]
+
(
s
->
start_y
-
1
)
*
s
->
outpicref
->
linesize
[
0
]
+
s
->
start_x
-
1
;
dst
=
s
->
outpicref
->
data
[
0
]
+
(
s
->
start_y
-
1
)
*
s
->
outpicref
->
linesize
[
0
]
+
s
->
start_x
-
1
;
for
(
x
=
0
;
x
<
s
->
w
+
1
;
x
++
)
for
(
x
=
0
;
x
<
s
->
w
+
1
;
x
++
)
...
...
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