I like to implement VideoAspectRatio and Crop,
but I dont understand what I need to do, I found the official Documentation,
@property (NS_NONATOMIC_IOSONLY) char *videoAspectRatio;
/**
* Set/Get current video aspect ratio.
*
* param: psz_aspect new video aspect-ratio or NULL to reset to default
* \note Invalid aspect ratios are ignored.
* \return the video aspect ratio or NULL if unspecified
* (the result must be released with free()).
*/
var videoAspectRatio: UnsafeMutablePointer<Int8>! { get set }
How I can implement UnsafeMutablePointer<Int8>! in Swift the Template shows this:
Code: Select all
if ([_aspectRatios[_currentAspectRatioMask] isEqualToString:@"FILL_TO_SCREEN"]) {
UIScreen *screen = [UIScreen mainScreen];
float f_ar = screen.bounds.size.width / screen.bounds.size.height;
if (f_ar == (float)(640./1136.)) // iPhone 5 aka 16:9.01
_mediaplayer.videoCropGeometry = "16:9";
else if (f_ar == (float)(2./3.)) // all other iPhones
_mediaplayer.videoCropGeometry = "16:10"; // libvlc doesn't support 2:3 crop
else if (f_ar == .75) // all iPads
_mediaplayer.videoCropGeometry = "4:3";
else if (f_ar == .5625) // AirPlay
_mediaplayer.videoCropGeometry = "16:9";
else
NSLog(@"unknown screen format %f, can't crop", f_ar);
NSLog(@"FILL_TO_SCREEN");
return;
Please I need you help
Thanks