我正在尝试旋转avplayer但是当我旋转它时,它从头开始旋转,我想旋转,而我在任何时候都在播放它应该从那里旋转.我正在使用苹果文档,这段代码是从那里获取的这是我的代码
-(void)performWithAsset:(AVAsset*)asset
{
AVMutableVideoCompositionInstruction *instruction = nil;
AVMutableVideoCompositionLayerInstruction *layerInstruction = nil;
CGAffineTransform t1;
CGAffineTransform t2;
AVAssetTrack *assetVideoTrack = nil;
AVAssetTrack *assetAudioTrack = nil;
// Check if the asset contains video and audio tracks
if ([[asset tracksWithMediaType:AVMediaTypeVideo] count] != 0) {
assetVideoTrack = [asset tracksWithMediaType:AVMediaTypeVideo][0];
}
if ([[asset tracksWithMediaType:AVMediaTypeAudio] count] != 0) {
assetAudioTrack = [asset tracksWithMediaType:AVMediaTypeAudio][0];
}
CMTime insertionPoint = kCMTimeInvalid;
NSError *error = nil;
// Step 1
// Create a composition with the given asset and insert audio and …Run Code Online (Sandbox Code Playgroud)