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-iOS
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
0
Merge Requests
0
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
Sergey
VLC-iOS
Commits
071183c3
Commit
071183c3
authored
Dec 04, 2017
by
Carola Nitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
VLCPlaybackController: fix aspectratio for fill to screen for iPhone X and all future devices
(cherry picked from commit
b03efc36
)
parent
b1846151
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
20 deletions
+2
-20
Sources/VLCPlaybackController.m
Sources/VLCPlaybackController.m
+2
-20
No files found.
Sources/VLCPlaybackController.m
View file @
071183c3
...
...
@@ -860,26 +860,8 @@ VLCMediaDelegate, VLCRemoteControlServiceDelegate>
else
screen
=
[
UIScreen
screens
][
1
];
float
f_ar
=
screen
.
bounds
.
size
.
width
/
screen
.
bounds
.
size
.
height
;
if
(
f_ar
==
(
float
)(
4
.
0
/
3
.
0
)
||
f_ar
==
(
float
)(
1366
.
/
1024
.))
{
// all iPads
_mediaPlayer
.
videoCropGeometry
=
"4:3"
;
}
else
if
(
f_ar
==
(
float
)(
2
.
/
3
.)
||
f_ar
==
(
float
)(
480
.
/
320
.))
{
// all other iPhones
_mediaPlayer
.
videoCropGeometry
=
"16:10"
;
// libvlc doesn't support 2:3 crop
}
else
if
(
f_ar
==
.
5625
)
{
// AirPlay
_mediaPlayer
.
videoCropGeometry
=
"16:9"
;
}
else
if
(
f_ar
==
(
float
)(
640
.
/
1136
.)
||
f_ar
==
(
float
)(
568
.
/
320
.)
||
f_ar
==
(
float
)(
667
.
/
375
.)
||
f_ar
==
(
float
)(
736
.
/
414
.))
{
// iPhone 5 and 6 and 6+
_mediaPlayer
.
videoCropGeometry
=
"16:9"
;
}
else
APLog
(
@"unknown screen format %f, can't crop"
,
f_ar
);
NSString
*
aspectRatio
=
[
NSString
stringWithFormat
:
@"%d:%d"
,
(
int
)
screen
.
bounds
.
size
.
width
,
(
int
)
screen
.
bounds
.
size
.
height
];
_mediaPlayer
.
videoCropGeometry
=
(
char
*
)[
aspectRatio
UTF8String
];
}
else
{
_mediaPlayer
.
videoAspectRatio
=
(
char
*
)[[
self
stringForAspectRatio
:
_currentAspectRatio
]
UTF8String
];
_mediaPlayer
.
videoCropGeometry
=
NULL
;
...
...
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