Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
10131dbf
Commit
10131dbf
authored
Apr 16, 2014
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
audiobargraph_a: move initialization in Open()
parent
61368353
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
modules/audio_filter/audiobargraph_a.c
modules/audio_filter/audiobargraph_a.c
+6
-6
No files found.
modules/audio_filter/audiobargraph_a.c
View file @
10131dbf
...
...
@@ -97,9 +97,9 @@ struct filter_sys_t
int
bargraph
;
int
bargraph_repetition
;
int
silence
;
int
time_window
;
int
64_t
time_window
;
float
alarm_threshold
;
int
repetition_time
;
int
64_t
repetition_time
;
int
counter
;
ValueDate_t
*
first
;
ValueDate_t
*
last
;
...
...
@@ -120,9 +120,9 @@ static int Open( vlc_object_t *p_this )
p_sys
->
bargraph
=
var_CreateGetInteger
(
p_filter
,
CFG_PREFIX
"bargraph"
);
p_sys
->
bargraph_repetition
=
var_CreateGetInteger
(
p_filter
,
CFG_PREFIX
"bargraph_repetition"
);
p_sys
->
silence
=
var_CreateGetInteger
(
p_filter
,
CFG_PREFIX
"silence"
);
p_sys
->
time_window
=
var_CreateGetInteger
(
p_filter
,
CFG_PREFIX
"time_window"
);
p_sys
->
time_window
=
var_CreateGetInteger
(
p_filter
,
CFG_PREFIX
"time_window"
)
*
1000
;
p_sys
->
alarm_threshold
=
var_CreateGetFloat
(
p_filter
,
CFG_PREFIX
"alarm_threshold"
);
p_sys
->
repetition_time
=
var_CreateGetInteger
(
p_filter
,
CFG_PREFIX
"repetition_time"
);
p_sys
->
repetition_time
=
var_CreateGetInteger
(
p_filter
,
CFG_PREFIX
"repetition_time"
)
*
1000
;
p_sys
->
counter
=
0
;
p_sys
->
first
=
NULL
;
p_sys
->
last
=
NULL
;
...
...
@@ -188,7 +188,7 @@ static block_t *DoWork( filter_t *p_filter, block_t *p_in_buf )
}
/* 3 - delete too old values */
while
(
p_sys
->
first
->
date
<
(
new
->
date
-
(
p_sys
->
time_window
*
1000
)
))
{
while
(
p_sys
->
first
->
date
<
(
new
->
date
-
p_sys
->
time_window
))
{
p_sys
->
started
=
1
;
// we have enough values to compute a valid total
current
=
p_sys
->
first
;
p_sys
->
first
=
p_sys
->
first
->
next
;
...
...
@@ -196,7 +196,7 @@ static block_t *DoWork( filter_t *p_filter, block_t *p_in_buf )
}
/* If last message was sent enough time ago */
if
((
p_sys
->
started
)
&&
(
p_in_buf
->
i_pts
>
p_sys
->
lastAlarm
+
(
p_sys
->
repetition_time
*
1000
)
))
{
if
((
p_sys
->
started
)
&&
(
p_in_buf
->
i_pts
>
p_sys
->
lastAlarm
+
p_sys
->
repetition_time
))
{
/* 4 - compute the RMS */
current
=
p_sys
->
first
;
...
...
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