Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
f5bcfe6d
Commit
f5bcfe6d
authored
Mar 25, 2007
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for config chain option parsing.
parent
15267bb4
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
175 additions
and
115 deletions
+175
-115
modules/video_filter/clone.c
modules/video_filter/clone.c
+15
-4
modules/video_filter/logo.c
modules/video_filter/logo.c
+11
-10
modules/video_filter/panoramix.c
modules/video_filter/panoramix.c
+103
-84
modules/video_filter/puzzle.c
modules/video_filter/puzzle.c
+16
-6
modules/video_filter/transform.c
modules/video_filter/transform.c
+11
-2
modules/video_filter/wall.c
modules/video_filter/wall.c
+19
-9
No files found.
modules/video_filter/clone.c
View file @
f5bcfe6d
...
...
@@ -60,6 +60,8 @@ static int SendEvents( vlc_object_t *, char const *,
#define VOUTLIST_LONGTEXT N_("You can use specific video output modules " \
"for the clones. Use a comma-separated list of modules." )
#define CFG_PREFIX "clone-"
vlc_module_begin
();
set_description
(
_
(
"Clone video filter"
)
);
set_capability
(
"video filter"
,
0
);
...
...
@@ -67,13 +69,17 @@ vlc_module_begin();
set_category
(
CAT_VIDEO
);
set_subcategory
(
SUBCAT_VIDEO_VFILTER
);
add_integer
(
"clone-
count"
,
2
,
NULL
,
COUNT_TEXT
,
COUNT_LONGTEXT
,
VLC_FALSE
);
add_string
(
"clone-
vout-list"
,
NULL
,
NULL
,
VOUTLIST_TEXT
,
VOUTLIST_LONGTEXT
,
VLC_TRUE
);
add_integer
(
CFG_PREFIX
"
count"
,
2
,
NULL
,
COUNT_TEXT
,
COUNT_LONGTEXT
,
VLC_FALSE
);
add_string
(
CFG_PREFIX
"
vout-list"
,
NULL
,
NULL
,
VOUTLIST_TEXT
,
VOUTLIST_LONGTEXT
,
VLC_TRUE
);
add_shortcut
(
"clone"
);
set_callbacks
(
Create
,
Destroy
);
vlc_module_end
();
static
const
char
*
ppsz_filter_options
[]
=
{
"count"
,
"vout-list"
,
NULL
};
/*****************************************************************************
* vout_sys_t: Clone video output method descriptor
*****************************************************************************
...
...
@@ -130,7 +136,11 @@ static int Create( vlc_object_t *p_this )
p_vout
->
pf_display
=
NULL
;
p_vout
->
pf_control
=
Control
;
psz_clonelist
=
config_GetPsz
(
p_vout
,
"clone-vout-list"
);
config_ChainParse
(
p_vout
,
CFG_PREFIX
,
ppsz_filter_options
,
p_vout
->
p_cfg
);
psz_clonelist
=
var_CreateGetNonEmptyString
(
p_vout
,
CFG_PREFIX
"vout-list"
);
if
(
psz_clonelist
)
{
int
i_dummy
;
...
...
@@ -178,7 +188,8 @@ static int Create( vlc_object_t *p_this )
{
/* No list was specified. We will use the default vout, and get
* the number of clones from clone-count */
p_vout
->
p_sys
->
i_clones
=
config_GetInt
(
p_vout
,
"clone-count"
);
p_vout
->
p_sys
->
i_clones
=
var_CreateGetInteger
(
p_vout
,
CFG_PREFIX
"count"
);
p_vout
->
p_sys
->
ppsz_vout_list
=
NULL
;
}
...
...
modules/video_filter/logo.c
View file @
f5bcfe6d
...
...
@@ -304,7 +304,6 @@ static int Create( vlc_object_t *p_this )
{
vout_thread_t
*
p_vout
=
(
vout_thread_t
*
)
p_this
;
vout_sys_t
*
p_sys
;
vlc_value_t
val
;
logo_list_t
*
p_logo_list
;
/* Allocate structure */
...
...
@@ -329,22 +328,25 @@ static int Create( vlc_object_t *p_this )
p_vout
->
pf_display
=
NULL
;
p_vout
->
pf_control
=
Control
;
p_logo_list
->
psz_filename
=
var_CreateGetStringCommand
(
p_this
,
config_ChainParse
(
p_vout
,
CFG_PREFIX
,
ppsz_filter_options
,
p_vout
->
p_cfg
);
p_logo_list
->
psz_filename
=
var_CreateGetStringCommand
(
p_vout
,
"logo-file"
);
if
(
!
p_logo_list
->
psz_filename
||
!*
p_logo_list
->
psz_filename
)
{
msg_Err
(
p_
this
,
"logo file not specified"
);
msg_Err
(
p_
vout
,
"logo file not specified"
);
return
0
;
}
p_sys
->
pos
=
var_CreateGetIntegerCommand
(
p_
this
,
"logo-position"
);
p_sys
->
posx
=
var_CreateGetIntegerCommand
(
p_
this
,
"logo-x"
);
p_sys
->
posy
=
var_CreateGetIntegerCommand
(
p_
this
,
"logo-y"
);
p_sys
->
pos
=
var_CreateGetIntegerCommand
(
p_
vout
,
"logo-position"
);
p_sys
->
posx
=
var_CreateGetIntegerCommand
(
p_
vout
,
"logo-x"
);
p_sys
->
posy
=
var_CreateGetIntegerCommand
(
p_
vout
,
"logo-y"
);
p_logo_list
->
i_delay
=
__MAX
(
__MIN
(
var_CreateGetIntegerCommand
(
p_
this
,
"logo-delay"
)
,
60000
),
0
);
p_logo_list
->
i_repeat
=
var_CreateGetIntegerCommand
(
p_
this
,
"logo-repeat"
);
var_CreateGetIntegerCommand
(
p_
vout
,
"logo-delay"
)
,
60000
),
0
);
p_logo_list
->
i_repeat
=
var_CreateGetIntegerCommand
(
p_
vout
,
"logo-repeat"
);
p_logo_list
->
i_alpha
=
__MAX
(
__MIN
(
var_CreateGetIntegerCommand
(
p_
this
,
"logo-transparency"
),
255
),
0
);
var_CreateGetIntegerCommand
(
p_
vout
,
"logo-transparency"
),
255
),
0
);
LoadLogoList
(
p_vout
,
p_logo_list
);
...
...
@@ -715,7 +717,6 @@ static int CreateFilter( vlc_object_t *p_this )
config_ChainParse
(
p_filter
,
CFG_PREFIX
,
ppsz_filter_options
,
p_filter
->
p_cfg
);
/* Hook used for callback variables */
p_logo_list
->
psz_filename
=
var_CreateGetStringCommand
(
p_filter
,
"logo-file"
);
...
...
modules/video_filter/panoramix.c
View file @
f5bcfe6d
This diff is collapsed.
Click to expand it.
modules/video_filter/puzzle.c
View file @
f5bcfe6d
...
...
@@ -63,6 +63,8 @@ static int MouseEvent ( vlc_object_t *, char const *,
#define BLACKSLOT_TEXT N_("Make one tile a black slot")
#define BLACKSLOT_LONGTEXT N_("Make one slot black. Other tiles can only be swapped with the black slot.")
#define CFG_PREFIX "puzzle-"
vlc_module_begin
();
set_description
(
_
(
"Puzzle interactive game video filter"
)
);
set_shortname
(
_
(
"Puzzle"
));
...
...
@@ -70,16 +72,20 @@ vlc_module_begin();
set_category
(
CAT_VIDEO
);
set_subcategory
(
SUBCAT_VIDEO_VFILTER
);
add_integer_with_range
(
"puzzle-
rows"
,
4
,
1
,
128
,
NULL
,
add_integer_with_range
(
CFG_PREFIX
"
rows"
,
4
,
1
,
128
,
NULL
,
ROWS_TEXT
,
ROWS_LONGTEXT
,
VLC_FALSE
);
add_integer_with_range
(
"puzzle-
cols"
,
4
,
1
,
128
,
NULL
,
add_integer_with_range
(
CFG_PREFIX
"
cols"
,
4
,
1
,
128
,
NULL
,
COLS_TEXT
,
COLS_LONGTEXT
,
VLC_FALSE
);
add_bool
(
"puzzle-
black-slot"
,
0
,
NULL
,
add_bool
(
CFG_PREFIX
"
black-slot"
,
0
,
NULL
,
BLACKSLOT_TEXT
,
BLACKSLOT_LONGTEXT
,
VLC_FALSE
);
set_callbacks
(
Create
,
Destroy
);
vlc_module_end
();
static
const
char
*
ppsz_filter_options
[]
=
{
"rows"
,
"cols"
,
"black-slot"
,
NULL
};
/*****************************************************************************
* vout_sys_t: Magnify video output method descriptor
*****************************************************************************/
...
...
@@ -199,9 +205,13 @@ static int Create( vlc_object_t *p_this )
p_vout
->
p_sys
->
p_image
=
image_HandlerCreate
(
p_vout
);
p_vout
->
p_sys
->
i_rows
=
config_GetInt
(
p_vout
,
"puzzle-rows"
);
p_vout
->
p_sys
->
i_cols
=
config_GetInt
(
p_vout
,
"puzzle-cols"
);
p_vout
->
p_sys
->
b_blackslot
=
config_GetInt
(
p_vout
,
"puzzle-black-slot"
);
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
->
b_blackslot
=
var_CreateGetInteger
(
p_vout
,
CFG_PREFIX
"black-slot"
);
p_vout
->
p_sys
->
pi_order
=
NULL
;
shuffle
(
p_vout
->
p_sys
);
...
...
modules/video_filter/transform.c
View file @
f5bcfe6d
...
...
@@ -62,6 +62,8 @@ static const char *type_list_text[] = { N_("Rotate by 90 degrees"),
N_
(
"Rotate by 180 degrees"
),
N_
(
"Rotate by 270 degrees"
),
N_
(
"Flip horizontally"
),
N_
(
"Flip vertically"
)
};
#define CFG_PREFIX "transform-"
vlc_module_begin
();
set_description
(
_
(
"Video transformation filter"
)
);
set_shortname
(
_
(
"Transformation"
));
...
...
@@ -69,7 +71,7 @@ vlc_module_begin();
set_category
(
CAT_VIDEO
);
set_subcategory
(
SUBCAT_VIDEO_VFILTER
);
add_string
(
"transform-
type"
,
"90"
,
NULL
,
add_string
(
CFG_PREFIX
"
type"
,
"90"
,
NULL
,
TYPE_TEXT
,
TYPE_LONGTEXT
,
VLC_FALSE
);
change_string_list
(
type_list
,
type_list_text
,
0
);
...
...
@@ -77,6 +79,10 @@ vlc_module_begin();
set_callbacks
(
Create
,
Destroy
);
vlc_module_end
();
static
const
char
*
ppsz_filter_options
[]
=
{
"type"
,
NULL
};
/*****************************************************************************
* vout_sys_t: Transform video output method descriptor
*****************************************************************************
...
...
@@ -123,8 +129,11 @@ static int Create( vlc_object_t *p_this )
p_vout
->
pf_display
=
NULL
;
p_vout
->
pf_control
=
Control
;
config_ChainParse
(
p_vout
,
CFG_PREFIX
,
ppsz_filter_options
,
p_vout
->
p_cfg
);
/* Look what method was requested */
psz_method
=
config_GetPsz
(
p_vout
,
"transform-type"
);
psz_method
=
var_CreateGetNonEmptyString
(
p_vout
,
"transform-type"
);
if
(
psz_method
==
NULL
)
{
...
...
modules/video_filter/wall.c
View file @
f5bcfe6d
...
...
@@ -66,6 +66,8 @@ static int SendEvents( vlc_object_t *, char const *,
#define ASPECT_LONGTEXT N_("Aspect ratio of the individual displays " \
"building the wall.")
#define CFG_PREFIX "wall-"
vlc_module_begin
();
set_description
(
_
(
"Wall video filter"
)
);
set_shortname
(
_
(
"Image wall"
));
...
...
@@ -73,16 +75,20 @@ vlc_module_begin();
set_category
(
CAT_VIDEO
);
set_subcategory
(
SUBCAT_VIDEO_VFILTER
);
add_integer
(
"wall-
cols"
,
3
,
NULL
,
COLS_TEXT
,
COLS_LONGTEXT
,
VLC_FALSE
);
add_integer
(
"wall-
rows"
,
3
,
NULL
,
ROWS_TEXT
,
ROWS_LONGTEXT
,
VLC_FALSE
);
add_string
(
"wall-
active"
,
NULL
,
NULL
,
ACTIVE_TEXT
,
ACTIVE_LONGTEXT
,
add_integer
(
CFG_PREFIX
"
cols"
,
3
,
NULL
,
COLS_TEXT
,
COLS_LONGTEXT
,
VLC_FALSE
);
add_integer
(
CFG_PREFIX
"
rows"
,
3
,
NULL
,
ROWS_TEXT
,
ROWS_LONGTEXT
,
VLC_FALSE
);
add_string
(
CFG_PREFIX
"
active"
,
NULL
,
NULL
,
ACTIVE_TEXT
,
ACTIVE_LONGTEXT
,
VLC_TRUE
);
add_string
(
"wall-
element-aspect"
,
"4:3"
,
NULL
,
ASPECT_TEXT
,
ASPECT_LONGTEXT
,
VLC_FALSE
);
add_string
(
CFG_PREFIX
"
element-aspect"
,
"4:3"
,
NULL
,
ASPECT_TEXT
,
ASPECT_LONGTEXT
,
VLC_FALSE
);
add_shortcut
(
"wall"
);
set_callbacks
(
Create
,
Destroy
);
vlc_module_end
();
static
const
char
*
ppsz_filter_options
[]
=
{
"cols"
,
"rows"
,
"active"
,
"element-aspect"
,
NULL
};
/*****************************************************************************
* vout_sys_t: Wall video output method descriptor
*****************************************************************************
...
...
@@ -150,9 +156,12 @@ static int Create( vlc_object_t *p_this )
p_vout
->
pf_display
=
NULL
;
p_vout
->
pf_control
=
Control
;
config_ChainParse
(
p_vout
,
CFG_PREFIX
,
ppsz_filter_options
,
p_vout
->
p_cfg
);
/* Look what method was requested */
p_vout
->
p_sys
->
i_col
=
config_GetInt
(
p_vout
,
"wall-
cols"
);
p_vout
->
p_sys
->
i_row
=
config_GetInt
(
p_vout
,
"wall-
rows"
);
p_vout
->
p_sys
->
i_col
=
var_CreateGetInteger
(
p_vout
,
CFG_PREFIX
"
cols"
);
p_vout
->
p_sys
->
i_row
=
var_CreateGetInteger
(
p_vout
,
CFG_PREFIX
"
rows"
);
p_vout
->
p_sys
->
i_col
=
__MAX
(
1
,
__MIN
(
15
,
p_vout
->
p_sys
->
i_col
)
);
p_vout
->
p_sys
->
i_row
=
__MAX
(
1
,
__MIN
(
15
,
p_vout
->
p_sys
->
i_row
)
);
...
...
@@ -170,7 +179,8 @@ static int Create( vlc_object_t *p_this )
return
VLC_ENOMEM
;
}
psz_method_tmp
=
psz_method
=
config_GetPsz
(
p_vout
,
"wall-active"
);
psz_method_tmp
=
psz_method
=
var_CreateGetNonEmptyString
(
p_vout
,
CFG_PREFIX
"active"
);
/* If no trailing vout are specified, take them all */
if
(
psz_method
==
NULL
)
...
...
@@ -240,7 +250,8 @@ static int Init( vout_thread_t *p_vout )
int
i_vstart_rounded
=
0
,
i_hstart_rounded
=
0
;
char
*
psz_aspect
;
psz_aspect
=
config_GetPsz
(
p_vout
,
"wall-element-aspect"
);
psz_aspect
=
var_CreateGetNonEmptyString
(
p_vout
,
CFG_PREFIX
"element-aspect"
);
if
(
psz_aspect
&&
*
psz_aspect
)
{
char
*
psz_parser
=
strchr
(
psz_aspect
,
':'
);
...
...
@@ -256,7 +267,6 @@ static int Init( vout_thread_t *p_vout )
}
free
(
psz_aspect
);
}
i_xpos
=
var_CreateGetInteger
(
p_vout
,
"video-x"
);
i_ypos
=
var_CreateGetInteger
(
p_vout
,
"video-y"
);
...
...
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