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
d9bf3484
Commit
d9bf3484
authored
Apr 16, 2014
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
audiobargraph_v: simplify callback
parent
13d0590b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
13 deletions
+3
-13
modules/video_filter/audiobargraph_v.c
modules/video_filter/audiobargraph_v.c
+3
-13
No files found.
modules/video_filter/audiobargraph_v.c
View file @
d9bf3484
...
...
@@ -559,6 +559,9 @@ static picture_t *LoadImage(vlc_object_t *p_this, int nbChannels, int* i_values,
*****************************************************************************/
static
void
LoadBarGraph
(
vlc_object_t
*
p_this
,
BarGraph_t
*
p_BarGraph
)
{
if
(
p_BarGraph
->
p_pic
)
picture_Release
(
p_BarGraph
->
p_pic
);
p_BarGraph
->
p_pic
=
LoadImage
(
p_this
,
p_BarGraph
->
nbChannels
,
p_BarGraph
->
i_values
,
p_BarGraph
->
scale
,
p_BarGraph
->
alarm
,
p_BarGraph
->
barWidth
);
if
(
!
p_BarGraph
->
p_pic
)
msg_Warn
(
p_this
,
"error while creating picture"
);
...
...
@@ -585,11 +588,6 @@ static int BarGraphCallback(vlc_object_t *p_this, char const *psz_var,
else
if
(
!
strcmp
(
psz_var
,
"audiobargraph_v-transparency"
))
p_BarGraph
->
i_alpha
=
VLC_CLIP
(
newval
.
i_int
,
0
,
255
);
else
if
(
!
strcmp
(
psz_var
,
"audiobargraph_v-i_values"
))
{
if
(
p_BarGraph
->
p_pic
)
{
picture_Release
(
p_BarGraph
->
p_pic
);
p_BarGraph
->
p_pic
=
NULL
;
}
char
*
psz
=
xstrdup
(
newval
.
psz_string
?
newval
.
psz_string
:
""
);
free
(
p_BarGraph
->
i_values
);
// in case many answer are received at the same time, only keep one
...
...
@@ -600,17 +598,9 @@ static int BarGraphCallback(vlc_object_t *p_this, char const *psz_var,
free
(
psz
);
LoadBarGraph
(
p_this
,
p_BarGraph
);
}
else
if
(
!
strcmp
(
psz_var
,
"audiobargraph_v-alarm"
))
{
if
(
p_BarGraph
->
p_pic
)
{
picture_Release
(
p_BarGraph
->
p_pic
);
p_BarGraph
->
p_pic
=
NULL
;
}
p_BarGraph
->
alarm
=
newval
.
b_bool
;
LoadBarGraph
(
p_this
,
p_BarGraph
);
}
else
if
(
!
strcmp
(
psz_var
,
"audiobargraph_v-barWidth"
))
{
if
(
p_BarGraph
->
p_pic
)
{
picture_Release
(
p_BarGraph
->
p_pic
);
p_BarGraph
->
p_pic
=
NULL
;
}
p_BarGraph
->
barWidth
=
newval
.
i_int
;
LoadBarGraph
(
p_this
,
p_BarGraph
);
}
...
...
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