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
508b744e
Commit
508b744e
authored
Apr 16, 2014
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
audiobargraph_v: use CFG_PREFIX
parent
3afd9951
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
23 deletions
+22
-23
modules/video_filter/audiobargraph_v.c
modules/video_filter/audiobargraph_v.c
+22
-23
No files found.
modules/video_filter/audiobargraph_v.c
View file @
508b744e
...
...
@@ -324,15 +324,15 @@ static int BarGraphCallback(vlc_object_t *p_this, char const *psz_var,
char
*
res
=
NULL
;
vlc_mutex_lock
(
&
p_sys
->
lock
);
if
(
!
strcmp
(
psz_var
,
"audiobargraph_v-
x"
))
if
(
!
strcmp
(
psz_var
,
CFG_PREFIX
"
x"
))
p_sys
->
i_pos_x
=
newval
.
i_int
;
else
if
(
!
strcmp
(
psz_var
,
"audiobargraph_v-
y"
))
else
if
(
!
strcmp
(
psz_var
,
CFG_PREFIX
"
y"
))
p_sys
->
i_pos_y
=
newval
.
i_int
;
else
if
(
!
strcmp
(
psz_var
,
"audiobargraph_v-
position"
))
else
if
(
!
strcmp
(
psz_var
,
CFG_PREFIX
"
position"
))
p_sys
->
i_pos
=
newval
.
i_int
;
else
if
(
!
strcmp
(
psz_var
,
"audiobargraph_v-
transparency"
))
else
if
(
!
strcmp
(
psz_var
,
CFG_PREFIX
"
transparency"
))
p_BarGraph
->
i_alpha
=
VLC_CLIP
(
newval
.
i_int
,
0
,
255
);
else
if
(
!
strcmp
(
psz_var
,
"audiobargraph_v-
i_values"
))
{
else
if
(
!
strcmp
(
psz_var
,
CFG_PREFIX
"
i_values"
))
{
char
*
psz
=
xstrdup
(
newval
.
psz_string
?
newval
.
psz_string
:
""
);
// in case many answer are received at the same time, only keep one
res
=
strchr
(
psz
,
'@'
);
...
...
@@ -341,10 +341,10 @@ static int BarGraphCallback(vlc_object_t *p_this, char const *psz_var,
parse_i_values
(
p_BarGraph
,
psz
);
free
(
psz
);
Draw
(
p_BarGraph
);
}
else
if
(
!
strcmp
(
psz_var
,
"audiobargraph_v-
alarm"
))
{
}
else
if
(
!
strcmp
(
psz_var
,
CFG_PREFIX
"
alarm"
))
{
p_BarGraph
->
alarm
=
newval
.
b_bool
;
Draw
(
p_BarGraph
);
}
else
if
(
!
strcmp
(
psz_var
,
"audiobargraph_v-
barWidth"
))
{
}
else
if
(
!
strcmp
(
psz_var
,
CFG_PREFIX
"
barWidth"
))
{
p_BarGraph
->
barWidth
=
newval
.
i_int
;
Draw
(
p_BarGraph
);
}
...
...
@@ -524,19 +524,18 @@ static int OpenCommon(vlc_object_t *p_this, bool b_sub)
p_filter
->
p_cfg
);
/* create and initialize variables */
p_sys
->
i_pos
=
var_CreateGetInteger
(
p_filter
,
"audiobargraph_v-
position"
);
p_sys
->
i_pos_x
=
var_CreateGetInteger
(
p_filter
,
"audiobargraph_v-
x"
);
p_sys
->
i_pos_y
=
var_CreateGetInteger
(
p_filter
,
"audiobargraph_v-
y"
);
p_sys
->
i_pos
=
var_CreateGetInteger
(
p_filter
,
CFG_PREFIX
"
position"
);
p_sys
->
i_pos_x
=
var_CreateGetInteger
(
p_filter
,
CFG_PREFIX
"
x"
);
p_sys
->
i_pos_y
=
var_CreateGetInteger
(
p_filter
,
CFG_PREFIX
"
y"
);
BarGraph_t
*
p_BarGraph
=
&
p_sys
->
p_BarGraph
;
p_BarGraph
->
p_pic
=
NULL
;
p_BarGraph
->
i_alpha
=
var_CreateGetInteger
(
p_filter
,
"audiobargraph_v-transparency"
);
p_BarGraph
->
i_alpha
=
var_CreateGetInteger
(
p_filter
,
CFG_PREFIX
"transparency"
);
p_BarGraph
->
i_alpha
=
VLC_CLIP
(
p_BarGraph
->
i_alpha
,
0
,
255
);
p_BarGraph
->
i_values
=
NULL
;
parse_i_values
(
p_BarGraph
,
&
(
char
){
0
});
p_BarGraph
->
alarm
=
false
;
p_BarGraph
->
barWidth
=
var_CreateGetInteger
(
p_filter
,
"audiobargraph_v-
barWidth"
);
p_BarGraph
->
barWidth
=
var_CreateGetInteger
(
p_filter
,
CFG_PREFIX
"
barWidth"
);
p_BarGraph
->
scale
=
400
;
/* Ignore aligment if a position is given for video filter */
...
...
@@ -545,16 +544,16 @@ static int OpenCommon(vlc_object_t *p_this, bool b_sub)
vlc_mutex_init
(
&
p_sys
->
lock
);
var_Create
(
p_filter
->
p_libvlc
,
"audiobargraph_v-
alarm"
,
VLC_VAR_BOOL
);
var_Create
(
p_filter
->
p_libvlc
,
"audiobargraph_v-
i_values"
,
VLC_VAR_STRING
);
var_Create
(
p_filter
->
p_libvlc
,
CFG_PREFIX
"
alarm"
,
VLC_VAR_BOOL
);
var_Create
(
p_filter
->
p_libvlc
,
CFG_PREFIX
"
i_values"
,
VLC_VAR_STRING
);
var_AddCallback
(
p_filter
->
p_libvlc
,
"audiobargraph_v-
alarm"
,
var_AddCallback
(
p_filter
->
p_libvlc
,
CFG_PREFIX
"
alarm"
,
BarGraphCallback
,
p_sys
);
var_AddCallback
(
p_filter
->
p_libvlc
,
"audiobargraph_v-
i_values"
,
var_AddCallback
(
p_filter
->
p_libvlc
,
CFG_PREFIX
"
i_values"
,
BarGraphCallback
,
p_sys
);
var_TriggerCallback
(
p_filter
->
p_libvlc
,
"audiobargraph_v-
alarm"
);
var_TriggerCallback
(
p_filter
->
p_libvlc
,
"audiobargraph_v-
i_values"
);
var_TriggerCallback
(
p_filter
->
p_libvlc
,
CFG_PREFIX
"
alarm"
);
var_TriggerCallback
(
p_filter
->
p_libvlc
,
CFG_PREFIX
"
i_values"
);
for
(
int
i
=
0
;
ppsz_filter_callbacks
[
i
];
i
++
)
var_AddCallback
(
p_filter
,
ppsz_filter_callbacks
[
i
],
...
...
@@ -596,12 +595,12 @@ static void Close(vlc_object_t *p_this)
var_DelCallback
(
p_filter
,
ppsz_filter_callbacks
[
i
],
BarGraphCallback
,
p_sys
);
var_DelCallback
(
p_filter
->
p_libvlc
,
"audiobargraph_v-
i_values"
,
var_DelCallback
(
p_filter
->
p_libvlc
,
CFG_PREFIX
"
i_values"
,
BarGraphCallback
,
p_sys
);
var_DelCallback
(
p_filter
->
p_libvlc
,
"audiobargraph_v-
alarm"
,
var_DelCallback
(
p_filter
->
p_libvlc
,
CFG_PREFIX
"
alarm"
,
BarGraphCallback
,
p_sys
);
var_Destroy
(
p_filter
->
p_libvlc
,
"audiobargraph_v-
i_values"
);
var_Destroy
(
p_filter
->
p_libvlc
,
"audiobargraph_v-
alarm"
);
var_Destroy
(
p_filter
->
p_libvlc
,
CFG_PREFIX
"
i_values"
);
var_Destroy
(
p_filter
->
p_libvlc
,
CFG_PREFIX
"
alarm"
);
if
(
p_sys
->
p_blend
)
filter_DeleteBlend
(
p_sys
->
p_blend
);
...
...
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