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
3688c5dc
Commit
3688c5dc
authored
May 19, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rotate: no need to remember the angle
parent
1e5e931c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
modules/video_filter/rotate.c
modules/video_filter/rotate.c
+7
-8
No files found.
modules/video_filter/rotate.c
View file @
3688c5dc
...
...
@@ -86,7 +86,6 @@ static const char *const ppsz_filter_options[] = {
*****************************************************************************/
struct
filter_sys_t
{
int
i_angle
;
int
i_cos
;
int
i_sin
;
};
...
...
@@ -137,15 +136,15 @@ static int Create( vlc_object_t *p_this )
config_ChainParse
(
p_filter
,
FILTER_PREFIX
,
ppsz_filter_options
,
p_filter
->
p_cfg
);
p_sys
->
i_angle
=
var_CreateGetIntegerCommand
(
p_filter
,
FILTER_PREFIX
"angle"
)
*
10
;
int
i_angle
=
var_CreateGetIntegerCommand
(
p_filter
,
FILTER_PREFIX
"angle"
)
*
10
;
cache_trigo
(
i_angle
,
&
p_sys
->
i_sin
,
&
p_sys
->
i_cos
);
var_Create
(
p_filter
,
FILTER_PREFIX
"deciangle"
,
VLC_VAR_INTEGER
|
VLC_VAR_ISCOMMAND
);
var_AddCallback
(
p_filter
,
FILTER_PREFIX
"angle"
,
RotateCallback
,
p_sys
);
var_AddCallback
(
p_filter
,
FILTER_PREFIX
"deciangle"
,
PreciseRotateCallback
,
p_sys
);
cache_trigo
(
p_sys
->
i_angle
,
&
p_sys
->
i_sin
,
&
p_sys
->
i_cos
);
return
VLC_SUCCESS
;
}
...
...
@@ -393,8 +392,8 @@ static int RotateCallback( vlc_object_t *p_this, char const *psz_var,
{
VLC_UNUSED
(
p_this
);
VLC_UNUSED
(
psz_var
);
VLC_UNUSED
(
oldval
);
filter_sys_t
*
p_sys
=
(
filter_sys_t
*
)
p_data
;
p_sys
->
i_angle
=
newval
.
i_int
*
10
;
cache_trigo
(
p_sys
->
i_angle
,
&
p_sys
->
i_sin
,
&
p_sys
->
i_cos
);
cache_trigo
(
newval
.
i_int
*
10
,
&
p_sys
->
i_sin
,
&
p_sys
->
i_cos
);
return
VLC_SUCCESS
;
}
...
...
@@ -404,7 +403,7 @@ static int PreciseRotateCallback( vlc_object_t *p_this, char const *psz_var,
{
VLC_UNUSED
(
p_this
);
VLC_UNUSED
(
psz_var
);
VLC_UNUSED
(
oldval
);
filter_sys_t
*
p_sys
=
(
filter_sys_t
*
)
p_data
;
p_sys
->
i_angle
=
newval
.
i_int
;
cache_trigo
(
p_sys
->
i_angle
,
&
p_sys
->
i_sin
,
&
p_sys
->
i_cos
);
cache_trigo
(
newval
.
i_int
,
&
p_sys
->
i_sin
,
&
p_sys
->
i_cos
);
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