Commit 08116048 authored by Felix Paul Kühne's avatar Felix Paul Kühne

Fix crop-to-fill-screen

(cherry picked from commit 9817928a)
parent bf7bb7e9
Pipeline #183 failed with stage
in 0 seconds
......@@ -7,6 +7,7 @@ iOS 2.8.2:
· Dropbox support is no longer an option on iOS 7 and iOS 8
· File listings in Dropbox are now alphabetically sorted (again)
· More options for default playback speed matching the tvOS version
· Fixed aspect ratio switch and crop
· General stability improvements and bug fixes
iOS 2.8.1:
......
......@@ -751,23 +751,30 @@ VLCMediaDelegate>
float f_ar = screen.bounds.size.width / screen.bounds.size.height;
if (f_ar == (float)(640./1136.)) {// iPhone 5 aka 16:9.01
_mediaPlayer.videoAspectRatio = "16:9";
} else if (f_ar == (float)(2./3.)) {// all other iPhones
_mediaPlayer.videoAspectRatio = "16:10"; // libvlc doesn't support 2:3 crop
} else if (f_ar == (float)(4.0/3.0)) {// all iPads
_mediaPlayer.videoAspectRatio = "4:3";
} else if (f_ar == .5625) {// AirPlay
_mediaPlayer.videoAspectRatio = "16:9";
} else if (f_ar == 1.5) { //iPhone 4
_mediaPlayer.videoAspectRatio = "3:2";
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);
} else {
_mediaPlayer.videoAspectRatio = (char *)[[self stringForAspectRatio:_currentAspectRatio] UTF8String];
_mediaPlayer.scaleFactor = 0;
_mediaPlayer.videoCropGeometry = NULL;
}
}
if ([self.delegate respondsToSelector:@selector(showStatusMessage:forPlaybackController:)]) {
[self.delegate showStatusMessage:[NSString stringWithFormat:NSLocalizedString(@"AR_CHANGED", nil), [self stringForAspectRatio:_currentAspectRatio]] forPlaybackController:self];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment