Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
VLC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
13
Merge Requests
13
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
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
Steve Lhomme
VLC
Commits
26f09915
Commit
26f09915
authored
Jul 24, 2017
by
Thomas Guillem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
viewpoint: add vlc_viewpoint_clip
parent
e61dee00
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
include/vlc_viewpoint.h
include/vlc_viewpoint.h
+11
-0
src/input/input.c
src/input/input.c
+1
-7
No files found.
include/vlc_viewpoint.h
View file @
26f09915
...
...
@@ -23,6 +23,8 @@
#include <vlc_common.h>
#include <math.h>
/**
* \defgroup output Output
* \ingroup output
...
...
@@ -52,6 +54,15 @@ static inline void vlc_viewpoint_init( vlc_viewpoint_t *p_vp )
p_vp
->
fov
=
FIELD_OF_VIEW_DEGREES_DEFAULT
;
}
static
inline
void
vlc_viewpoint_clip
(
vlc_viewpoint_t
*
p_vp
)
{
p_vp
->
yaw
=
fmodf
(
p_vp
->
yaw
,
360
.
f
);
p_vp
->
pitch
=
fmodf
(
p_vp
->
pitch
,
360
.
f
);
p_vp
->
roll
=
fmodf
(
p_vp
->
roll
,
360
.
f
);
p_vp
->
fov
=
VLC_CLIP
(
p_vp
->
fov
,
FIELD_OF_VIEW_DEGREES_MIN
,
FIELD_OF_VIEW_DEGREES_MAX
);
}
/**@}*/
#endif
/* VLC_VIEWPOINT_H_ */
src/input/input.c
View file @
26f09915
...
...
@@ -33,7 +33,6 @@
#include <limits.h>
#include <assert.h>
#include <math.h>
#include <sys/stat.h>
#include "input_internal.h"
...
...
@@ -1960,12 +1959,7 @@ static bool Control( input_thread_t *p_input,
priv
->
viewpoint
.
fov
+=
p_vp
->
fov
;
}
priv
->
viewpoint
.
yaw
=
fmodf
(
priv
->
viewpoint
.
yaw
,
360
.
f
);
priv
->
viewpoint
.
pitch
=
fmodf
(
priv
->
viewpoint
.
pitch
,
360
.
f
);
priv
->
viewpoint
.
roll
=
fmodf
(
priv
->
viewpoint
.
roll
,
360
.
f
);
priv
->
viewpoint
.
fov
=
VLC_CLIP
(
priv
->
viewpoint
.
fov
,
FIELD_OF_VIEW_DEGREES_MIN
,
FIELD_OF_VIEW_DEGREES_MAX
);
vlc_viewpoint_clip
(
&
priv
->
viewpoint
);
vout_thread_t
**
pp_vout
;
size_t
i_vout
;
...
...
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