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
86cdb48c
Commit
86cdb48c
authored
Oct 14, 2012
by
Pierre Ynard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
motion: log which sensor is used
parent
a05aca78
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
modules/control/motionlib.c
modules/control/motionlib.c
+4
-1
No files found.
modules/control/motionlib.c
View file @
86cdb48c
...
@@ -77,11 +77,13 @@ motion_sensors_t *motion_create( vlc_object_t *obj )
...
@@ -77,11 +77,13 @@ motion_sensors_t *motion_create( vlc_object_t *obj )
motion
->
i_calibrate
=
fscanf
(
f
,
"(%d,%d)"
,
&
i_x
,
&
i_y
)
==
2
?
i_x
:
0
;
motion
->
i_calibrate
=
fscanf
(
f
,
"(%d,%d)"
,
&
i_x
,
&
i_y
)
==
2
?
i_x
:
0
;
fclose
(
f
);
fclose
(
f
);
motion
->
sensor
=
HDAPS_SENSOR
;
motion
->
sensor
=
HDAPS_SENSOR
;
msg_Dbg
(
obj
,
"HDAPS motion detection correctly loaded"
);
}
}
else
if
(
access
(
"/sys/devices/ams/x"
,
R_OK
)
==
0
)
else
if
(
access
(
"/sys/devices/ams/x"
,
R_OK
)
==
0
)
{
{
/* Apple Motion Sensor support */
/* Apple Motion Sensor support */
motion
->
sensor
=
AMS_SENSOR
;
motion
->
sensor
=
AMS_SENSOR
;
msg_Dbg
(
obj
,
"AMS motion detection correctly loaded"
);
}
}
else
if
(
access
(
"/sys/devices/platform/applesmc.768/position"
,
R_OK
)
==
0
else
if
(
access
(
"/sys/devices/platform/applesmc.768/position"
,
R_OK
)
==
0
&&
(
f
=
fopen
(
"/sys/devices/platform/applesmc.768/calibrate"
,
"r"
)
)
)
&&
(
f
=
fopen
(
"/sys/devices/platform/applesmc.768/calibrate"
,
"r"
)
)
)
...
@@ -91,10 +93,12 @@ motion_sensors_t *motion_create( vlc_object_t *obj )
...
@@ -91,10 +93,12 @@ motion_sensors_t *motion_create( vlc_object_t *obj )
motion
->
i_calibrate
=
fscanf
(
f
,
"(%d,%d)"
,
&
i_x
,
&
i_y
)
==
2
?
i_x
:
0
;
motion
->
i_calibrate
=
fscanf
(
f
,
"(%d,%d)"
,
&
i_x
,
&
i_y
)
==
2
?
i_x
:
0
;
fclose
(
f
);
fclose
(
f
);
motion
->
sensor
=
APPLESMC_SENSOR
;
motion
->
sensor
=
APPLESMC_SENSOR
;
msg_Dbg
(
obj
,
"Apple SMC motion detection correctly loaded"
);
}
}
#ifdef HAVE_MACOS_UNIMOTION
#ifdef HAVE_MACOS_UNIMOTION
else
if
(
(
motion
->
unimotion_hw
=
detect_sms
())
)
else
if
(
(
motion
->
unimotion_hw
=
detect_sms
())
)
motion
->
sensor
=
UNIMOTION_SENSOR
;
motion
->
sensor
=
UNIMOTION_SENSOR
;
msg_Dbg
(
obj
,
"UniMotion motion detection correctly loaded"
);
#endif
#endif
else
else
{
{
...
@@ -107,7 +111,6 @@ motion_sensors_t *motion_create( vlc_object_t *obj )
...
@@ -107,7 +111,6 @@ motion_sensors_t *motion_create( vlc_object_t *obj )
memset
(
motion
->
p_oldx
,
0
,
sizeof
(
motion
->
p_oldx
)
);
memset
(
motion
->
p_oldx
,
0
,
sizeof
(
motion
->
p_oldx
)
);
motion
->
i
=
0
;
motion
->
i
=
0
;
motion
->
i_sum
=
0
;
motion
->
i_sum
=
0
;
msg_Dbg
(
obj
,
"Motion detection correctly loaded"
);
return
motion
;
return
motion
;
}
}
...
...
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