Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Martin Finkel
LibVLCSharp
Commits
503856bb
Commit
503856bb
authored
Feb 04, 2019
by
Martin Finkel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Viewpoint: Keep struct readonly
parent
90809693
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
6 deletions
+14
-6
LibVLCSharp/Shared/MediaPlayer.cs
LibVLCSharp/Shared/MediaPlayer.cs
+1
-1
LibVLCSharp/Shared/Structures/VideoViewpoint.cs
LibVLCSharp/Shared/Structures/VideoViewpoint.cs
+13
-5
No files found.
LibVLCSharp/Shared/MediaPlayer.cs
View file @
503856bb
...
...
@@ -1585,7 +1585,7 @@ namespace LibVLCSharp.Shared
var
vpPtr
=
Native
.
LibVLCVideoNewViewpoint
();
if
(
vpPtr
==
IntPtr
.
Zero
)
return
false
;
Viewpoint
=
new
VideoViewpoint
{
Yaw
=
yaw
,
Pitch
=
pitch
,
Roll
=
roll
,
Fov
=
fov
}
;
Viewpoint
=
new
VideoViewpoint
(
yaw
,
pitch
,
roll
,
fov
)
;
Marshal
.
StructureToPtr
(
Viewpoint
,
vpPtr
,
false
);
var
result
=
Native
.
LibVLCVideoUpdateViewpoint
(
NativeReference
,
vpPtr
,
absolute
)
==
0
;
...
...
LibVLCSharp/Shared/Structures/VideoViewpoint.cs
View file @
503856bb
...
...
@@ -4,26 +4,34 @@ namespace LibVLCSharp.Shared
{
/// <summary>Viewpoint for video outputs</summary>
[
StructLayout
(
LayoutKind
.
Sequential
)]
public
struct
VideoViewpoint
public
readonly
struct
VideoViewpoint
{
internal
VideoViewpoint
(
float
yaw
,
float
pitch
,
float
roll
,
float
fov
)
{
Yaw
=
yaw
;
Pitch
=
pitch
;
Roll
=
roll
;
Fov
=
fov
;
}
/// <summary>
/// view point yaw in degrees ]-180;180]
/// </summary>
public
float
Yaw
{
get
;
internal
set
;
}
public
readonly
float
Yaw
;
/// <summary>
/// view point pitch in degrees ]-90;90]
/// </summary>
public
float
Pitch
{
get
;
internal
set
;
}
public
readonly
float
Pitch
;
/// <summary>
/// view point roll in degrees ]-180;180]
/// </summary>
public
float
Roll
{
get
;
internal
set
;
}
public
readonly
float
Roll
;
/// <summary>
/// field of view in degrees ]0;180[ (default 80.)
/// </summary>
public
float
Fov
{
get
;
internal
set
;
}
public
readonly
float
Fov
;
}
}
\ No newline at end of file
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