2

ライブラリを使用ALAssertしてiPhoneライブラリからビデオを選択しており、そのビデオファイルのプロパティを次のように設定しています。

 (void)selectedAssets:(NSArray*)_assets {

NSMutableArray *returnArray = [[[NSMutableArray alloc] init] autorelease];

for(ALAsset *asset in _assets) {


    NSMutableDictionary *workingDictionary = [[NSMutableDictionary alloc] init];

    [workingDictionary setObject:[asset valueForProperty:ALAssetPropertyType] forKey:@"UIImagePickerControllerMediaType"];

    [workingDictionary setObject:[UIImage imageWithCGImage:[[asset defaultRepresentation] fullScreenImage]] forKey:@"UIImagePickerControllerOriginalImage"];

    [workingDictionary setObject:[[asset valueForProperty:ALAssetPropertyURLs] valueForKey:[[[asset valueForProperty:ALAssetPropertyURLs] allKeys] objectAtIndex:0]] forKey:@"UIImagePickerControllerReferenceURL"];

    [workingDictionary setObject:[[asset defaultRepresentation]url] forKey:@"UIImagePickerControllerMediaURL"];

    [returnArray addObject:workingDictionary];        
    [workingDictionary release];    
}

[self popToRootViewControllerAnimated:NO];
[[self parentViewController] dismissModalViewControllerAnimated:YES];

if([delegate respondsToSelector:@selector(elcImagePickerController:didFinishPickingMediaWithInfo:)]) {
    [delegate performSelector:@selector(elcImagePickerController:didFinishPickingMediaWithInfo:) withObject:self withObject:[NSArray arrayWithArray:returnArray]];
}

}

ここで設定していますが、すべてを行っUIImagePickerControllerMediaURLたので、設定する権利はないと思いますUIImagePickerControllerMediaURL

UIImagePickerControllerMediaURL選択したビデオにプロパティを与える方法を教えてください。そのビデオMediaURLをデータ型に変換します。

4

0 に答える 0