MPMoviePlayerController - Duration always 0?

I don't see anything immediately wrong with your code. However, using AVFoundation is much faster for this type of operation. Here's a code snippet to get the duration using AVFoundation.

I don't see anything immediately wrong with your code. However, using AVFoundation is much faster for this type of operation. Here's a code snippet to get the duration using AVFoundation: AVURLAsset *asset = AVURLAsset alloc initWithURL:anURI options:NSDictionary dictionaryWithObjectsAndKeys: NSNumber numberWithBool:YES, AVURLAssetPreferPreciseDurationAndTimingKey, nil autorelease; NSTimeInterval durationInSeconds = 0.0; if (asset) durationInSeconds = CMTimeGetSeconds(asset.

Duration).

Thanks Harkonian, actually this code did not work staight away. – imobilizer May 16 at 13:32 Thanks @Harkonian, actually this code did not work staight away as there is an invalid pointer to integer conversion warning and whn I ran it a the line to retrieve duration received SIGABRT after throwing NSException. After the ASSET is created I need to retrieve duration as follows:CMTime assetTime = asset duration; Float64 duration = CMTimeGetSeconds(assetTime); – imobilizer May 16 at 13:41 Fix: NSTimeInterval duration = 0.0; if (asset) duration = CMTimeGetSeconds(asset.

Duration) ; – falkon Jun 27 at 9:04.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions