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
111a8051
Commit
111a8051
authored
Oct 01, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create variables in libvlc instead of libvlc_global_data
parent
91e70973
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
34 deletions
+25
-34
modules/video_filter/marq.c
modules/video_filter/marq.c
+25
-34
No files found.
modules/video_filter/marq.c
View file @
111a8051
...
...
@@ -179,23 +179,20 @@ static int CreateFilter( vlc_object_t *p_this )
p_sys
->
p_style
=
malloc
(
sizeof
(
text_style_t
)
);
memcpy
(
p_sys
->
p_style
,
&
default_text_style
,
sizeof
(
text_style_t
)
);
p_sys
->
i_xoff
=
var_CreateGetInteger
(
p_filter
->
p_libvlc_global
,
"marq-x"
);
p_sys
->
i_yoff
=
var_CreateGetInteger
(
p_filter
->
p_libvlc_global
,
"marq-y"
);
p_sys
->
i_timeout
=
var_CreateGetInteger
(
p_filter
->
p_libvlc_global
,
"marq-timeout"
);
p_sys
->
i_pos
=
var_CreateGetInteger
(
p_filter
->
p_libvlc_global
,
"marq-position"
);
p_sys
->
psz_marquee
=
var_CreateGetString
(
p_filter
->
p_libvlc_global
,
"marq-marquee"
);
p_sys
->
p_style
->
i_font_alpha
=
255
-
var_CreateGetInteger
(
p_filter
->
p_libvlc_global
,
"marq-opacity"
);
p_sys
->
p_style
->
i_font_color
=
var_CreateGetInteger
(
p_filter
->
p_libvlc_global
,
"marq-color"
);
p_sys
->
p_style
->
i_font_size
=
var_CreateGetInteger
(
p_filter
->
p_libvlc_global
,
"marq-size"
);
var_AddCallback
(
p_filter
->
p_libvlc_global
,
"marq-x"
,
MarqueeCallback
,
p_sys
);
var_AddCallback
(
p_filter
->
p_libvlc_global
,
"marq-y"
,
MarqueeCallback
,
p_sys
);
var_AddCallback
(
p_filter
->
p_libvlc_global
,
"marq-marquee"
,
MarqueeCallback
,
p_sys
);
var_AddCallback
(
p_filter
->
p_libvlc_global
,
"marq-timeout"
,
MarqueeCallback
,
p_sys
);
var_AddCallback
(
p_filter
->
p_libvlc_global
,
"marq-position"
,
MarqueeCallback
,
p_sys
);
var_AddCallback
(
p_filter
->
p_libvlc_global
,
"marq-color"
,
MarqueeCallback
,
p_sys
);
var_AddCallback
(
p_filter
->
p_libvlc_global
,
"marq-opacity"
,
MarqueeCallback
,
p_sys
);
var_AddCallback
(
p_filter
->
p_libvlc_global
,
"marq-size"
,
MarqueeCallback
,
p_sys
);
#define CREATE_VAR( stor, type, var ) \
p_sys->stor = var_CreateGet##type( p_filter->p_libvlc, var ); \
var_AddCallback( p_filter->p_libvlc, var, MarqueeCallback, p_sys );
CREATE_VAR
(
i_xoff
,
Integer
,
"marq-x"
);
CREATE_VAR
(
i_yoff
,
Integer
,
"marq-y"
);
CREATE_VAR
(
i_timeout
,
Integer
,
"marq-timeout"
);
CREATE_VAR
(
i_pos
,
Integer
,
"marq-position"
);
CREATE_VAR
(
psz_marquee
,
String
,
"marq-marquee"
);
CREATE_VAR
(
p_style
->
i_font_alpha
,
Integer
,
"marq-opacity"
);
CREATE_VAR
(
p_style
->
i_font_color
,
Integer
,
"marq-color"
);
CREATE_VAR
(
p_style
->
i_font_size
,
Integer
,
"marq-size"
);
p_sys
->
p_style
->
i_font_alpha
=
255
-
p_sys
->
p_style
->
i_font_alpha
;
/* Misc init */
p_filter
->
pf_sub_filter
=
Filter
;
...
...
@@ -217,23 +214,17 @@ static void DestroyFilter( vlc_object_t *p_this )
free
(
p_sys
);
/* Delete the marquee variables */
var_DelCallback
(
p_filter
->
p_libvlc_global
,
"marq-x"
,
MarqueeCallback
,
p_sys
);
var_DelCallback
(
p_filter
->
p_libvlc_global
,
"marq-y"
,
MarqueeCallback
,
p_sys
);
var_DelCallback
(
p_filter
->
p_libvlc_global
,
"marq-marquee"
,
MarqueeCallback
,
p_sys
);
var_DelCallback
(
p_filter
->
p_libvlc_global
,
"marq-timeout"
,
MarqueeCallback
,
p_sys
);
var_DelCallback
(
p_filter
->
p_libvlc_global
,
"marq-position"
,
MarqueeCallback
,
p_sys
);
var_DelCallback
(
p_filter
->
p_libvlc_global
,
"marq-color"
,
MarqueeCallback
,
p_sys
);
var_DelCallback
(
p_filter
->
p_libvlc_global
,
"marq-opacity"
,
MarqueeCallback
,
p_sys
);
var_DelCallback
(
p_filter
->
p_libvlc_global
,
"marq-size"
,
MarqueeCallback
,
p_sys
);
var_Destroy
(
p_filter
->
p_libvlc_global
,
"marq-marquee"
);
var_Destroy
(
p_filter
->
p_libvlc_global
,
"marq-x"
);
var_Destroy
(
p_filter
->
p_libvlc_global
,
"marq-y"
);
var_Destroy
(
p_filter
->
p_libvlc_global
,
"marq-timeout"
);
var_Destroy
(
p_filter
->
p_libvlc_global
,
"marq-position"
);
var_Destroy
(
p_filter
->
p_libvlc_global
,
"marq-color"
);
var_Destroy
(
p_filter
->
p_libvlc_global
,
"marq-opacity"
);
var_Destroy
(
p_filter
->
p_libvlc_global
,
"marq-size"
);
#define DEL_VAR(var) \
var_DelCallback( p_filter->p_libvlc, var, MarqueeCallback, p_sys ) \
var_Destroy( p_filter->p_libvlc, var );
DEL_VAR
(
"marq-x"
);
DEL_VAR
(
"marq-y"
);
DEL_VAR
(
"marq-marquee"
);
DEL_VAR
(
"marq-timeout"
);
DEL_VAR
(
"marq-position"
);
DEL_VAR
(
"marq-color"
);
DEL_VAR
(
"marq-opacity"
);
DEL_VAR
(
"marq-size"
);
}
/****************************************************************************
* String formating functions
...
...
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