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
5b1d18e7
Commit
5b1d18e7
authored
Oct 12, 2012
by
Pierre Ynard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
motion: simplify
parent
9de638bb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
modules/control/motion.c
modules/control/motion.c
+6
-9
No files found.
modules/control/motion.c
View file @
5b1d18e7
...
...
@@ -116,11 +116,11 @@ void Close ( vlc_object_t *p_this )
#define HIGH_THRESHOLD 1000
static
void
RunIntf
(
intf_thread_t
*
p_intf
)
{
int
i_
x
,
i_
oldx
=
0
;
int
i_oldx
=
0
;
for
(
;;
)
{
const
char
*
psz_
filter
,
*
psz_
type
;
const
char
*
psz_type
;
bool
b_change
=
false
;
/* Wait a bit, get orientation, change filter if necessary */
...
...
@@ -128,25 +128,22 @@ static void RunIntf( intf_thread_t *p_intf )
msleep
(
INTF_IDLE_SLEEP
);
int
canc
=
vlc_savecancel
();
i_x
=
motion_get_angle
(
p_intf
->
p_sys
->
p_motion
);
i
nt
i
_x
=
motion_get_angle
(
p_intf
->
p_sys
->
p_motion
);
if
(
i_x
<
-
HIGH_THRESHOLD
&&
i_oldx
>
-
LOW_THRESHOLD
)
{
b_change
=
true
;
psz_filter
=
"transform"
;
psz_type
=
"270"
;
}
else
if
(
(
i_x
>
-
LOW_THRESHOLD
&&
i_oldx
<
-
HIGH_THRESHOLD
)
||
(
i_x
<
LOW_THRESHOLD
&&
i_oldx
>
HIGH_THRESHOLD
)
)
{
b_change
=
true
;
psz_filter
=
""
;
psz_type
=
""
;
psz_type
=
NULL
;
}
else
if
(
i_x
>
HIGH_THRESHOLD
&&
i_oldx
<
LOW_THRESHOLD
)
{
b_change
=
true
;
psz_filter
=
"transform"
;
psz_type
=
"90"
;
}
...
...
@@ -163,10 +160,10 @@ static void RunIntf( intf_thread_t *p_intf )
p_vout
=
input_GetVout
(
p_input
);
if
(
p_vout
)
{
#warning FIXME: transform-type does not exist anymore
var_Create
(
p_vout
,
"transform-type"
,
VLC_VAR_STRING
);
var_SetString
(
p_vout
,
"transform-type"
,
psz_type
);
var_SetString
(
p_vout
,
"video-filter"
,
psz_filter
);
var_SetString
(
p_vout
,
"video-filter"
,
psz_type
!=
NULL
?
"transform"
:
""
);
vlc_object_release
(
p_vout
);
}
vlc_object_release
(
p_input
);
...
...
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