Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
74d80d86
Commit
74d80d86
authored
Mar 31, 2007
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make it possible to change puzzle parmaeters after filter launch.
parent
7fbd1ca8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
3 deletions
+35
-3
modules/video_filter/puzzle.c
modules/video_filter/puzzle.c
+35
-3
No files found.
modules/video_filter/puzzle.c
View file @
74d80d86
...
...
@@ -52,6 +52,9 @@ static int SendEvents ( vlc_object_t *, char const *,
static
int
MouseEvent
(
vlc_object_t
*
,
char
const
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
static
int
PuzzleCallback
(
vlc_object_t
*
,
char
const
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
/*****************************************************************************
* Module descriptor
*****************************************************************************/
...
...
@@ -208,10 +211,18 @@ static int Create( vlc_object_t *p_this )
config_ChainParse
(
p_vout
,
CFG_PREFIX
,
ppsz_filter_options
,
p_vout
->
p_cfg
);
p_vout
->
p_sys
->
i_rows
=
var_CreateGetInteger
(
p_vout
,
CFG_PREFIX
"rows"
);
p_vout
->
p_sys
->
i_cols
=
var_CreateGetInteger
(
p_vout
,
CFG_PREFIX
"cols"
);
p_vout
->
p_sys
->
i_rows
=
var_CreateGetIntegerCommand
(
p_vout
,
CFG_PREFIX
"rows"
);
p_vout
->
p_sys
->
i_cols
=
var_CreateGetIntegerCommand
(
p_vout
,
CFG_PREFIX
"cols"
);
p_vout
->
p_sys
->
b_blackslot
=
var_CreateGetInteger
(
p_vout
,
CFG_PREFIX
"black-slot"
);
var_CreateGetBoolCommand
(
p_vout
,
CFG_PREFIX
"black-slot"
);
var_AddCallback
(
p_vout
,
CFG_PREFIX
"rows"
,
PuzzleCallback
,
p_vout
->
p_sys
);
var_AddCallback
(
p_vout
,
CFG_PREFIX
"cols"
,
PuzzleCallback
,
p_vout
->
p_sys
);
var_AddCallback
(
p_vout
,
CFG_PREFIX
"black-slot"
,
PuzzleCallback
,
p_vout
->
p_sys
);
p_vout
->
p_sys
->
pi_order
=
NULL
;
shuffle
(
p_vout
->
p_sys
);
...
...
@@ -544,3 +555,24 @@ static int MouseEvent( vlc_object_t *p_this, char const *psz_var,
}
return
VLC_SUCCESS
;
}
static
int
PuzzleCallback
(
vlc_object_t
*
p_this
,
char
const
*
psz_var
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
p_data
)
{
vout_sys_t
*
p_sys
=
(
vout_sys_t
*
)
p_data
;
if
(
!
strcmp
(
psz_var
,
CFG_PREFIX
"rows"
)
)
{
p_sys
->
i_rows
=
__MAX
(
1
,
newval
.
i_int
);
}
else
if
(
!
strcmp
(
psz_var
,
CFG_PREFIX
"cols"
)
)
{
p_sys
->
i_cols
=
__MAX
(
1
,
newval
.
i_int
);
}
else
if
(
!
strcmp
(
psz_var
,
CFG_PREFIX
"black-slot"
)
)
{
p_sys
->
b_blackslot
=
newval
.
b_bool
;
}
shuffle
(
p_sys
);
return
VLC_SUCCESS
;
}
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