Aspect Ratio Problem

iOS, iPad, iPhone, tvOS specific usage questions
ilkerulusoy
New Cone
New Cone
Posts: 7
Joined: 18 Jul 2014 09:15

Aspect Ratio Problem

Postby ilkerulusoy » 24 Jul 2014 15:53

Hello,

I am changing video aspect ratio on Ipad 3. Video is 16:9. I want to watch as a 4:3. Height does not changing. Width is extending.

Code: Select all

self.moviePlayer.videoCropGeometry = NULL; self.moviePlayer.videoAspectRatio = (char *)[@"4:3" UTF8String];

fkuehne
Developer
Developer
Posts: 7264
Joined: 16 Mar 2004 19:37
VLC version: 0.4.6 - present
Operating System: Darwin
Location: Germany
Contact:

Re: Aspect Ratio Problem

Postby fkuehne » 29 Jul 2014 22:04

"(char *)[@"4:3" UTF8String];" is a very weird way to set @"4:3" to a NSString variable.

Additionally, consider checking the source code of VLC for iOS as well as the sample code included with MobileVLCKit how to setup the wrapper view correctly.
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net

ilkerulusoy
New Cone
New Cone
Posts: 7
Joined: 18 Jul 2014 09:15

Re: Aspect Ratio Problem

Postby ilkerulusoy » 07 Aug 2014 13:45

sometimes run, sometimes not run when i use this code:

Code: Select all

.... Change aspect ratio UIView *drawableView = (UIView *)self.moviePlayer.drawable; UIScreen *screen = [UIScreen mainScreen]; drawableView.frame = CGRectMake(0, 0,self.moviePlayer.videoSize.width,self.moviePlayer.videoSize.height); drawableView.frame = CGRectMake(0, 0,screen.bounds.size.height,screen.bounds.size.width);
I think, video layer updated before drawable layer is update.


Return to “VLC for iOS, iPadOS and Apple TV”

Who is online

Users browsing this forum: No registered users and 11 guests