iphone Programming Glossary: mediatype
Uploading Video with iPhone http://stackoverflow.com/questions/1065628/uploading-video-with-iphone picker didFinishPickingMediaWithInfo NSDictionary info assign the mediatype to a string NSString mediaType info objectForKey UIImagePickerControllerMediaType check the media type string so we can determine if its a video if mediaType.. info objectForKey UIImagePickerControllerMediaType check the media type string so we can determine if its a video if mediaType isEqualToString @ public.movie NSLog @ got a movie NSURL videoURL info objectForKey UIImagePickerControllerMediaURL NSData..
Using AVCaptureSession and AVAudioPlayer together http://stackoverflow.com/questions/10903542/using-avcapturesession-and-avaudioplayer-together connection in m_captureFileOutput connections for AVCaptureInputPort port in connection inputPorts if port mediaType isEqual AVMediaTypeVideo videoConnection connection videoConnection setVideoOrientation AVCaptureVideoOrientationLandscapeRight..
Save Photos to Custom Album in iPhones Photo Library http://stackoverflow.com/questions/10954380/save-photos-to-custom-album-in-iphones-photo-library void imagePickerController UIImagePickerController picker didFinishPickingMediaWithInfo NSDictionary info NSString mediaType info objectForKey UIImagePickerControllerMediaType if mediaType isEqualToString __bridge NSString kUTTypeImage pull GPS.. NSDictionary info NSString mediaType info objectForKey UIImagePickerControllerMediaType if mediaType isEqualToString __bridge NSString kUTTypeImage pull GPS information from photos metadata using ALAssetsLibrary void ^ALAssetsLibraryAssetForURLResultBlock..
Picking video from PhotoLibrary with UIImagePickerController in OS 3.1 http://stackoverflow.com/questions/1533180/picking-video-from-photolibrary-with-uiimagepickercontroller-in-os-3-1 in OS 3.1 I am trying to pick a video from the photo library. In principle I know how to do it you set the mediaType of the image picker to an NSArray with kUTTypeMovie as its only object. But this doesn't seem to work on an iPhone 3G. Since.. work using the UIImagePickerController. The controller reports that it only supports images. When you try to set the mediaType of the controller with kUTTypeMovie it actually crashes. If you don't specify the media type only images are shown in the.. 3.1 iphone 3gs share improve this question I got the imagepicker working on a 3g and a 3gs to pick videos. NSArray mediaTypesAllowed UIImagePickerController availableMediaTypesForSourceType UIImagePickerControllerSourceTypePhotoLibrary imgPicker..
didFinishPickingMediaWithInfo return nil photo http://stackoverflow.com/questions/3088874/didfinishpickingmediawithinfo-return-nil-photo If it's a movie then you can get the URL to the actual file itself. This example only looks for images. NSString mediaType info objectForKey UIImagePickerControllerMediaType NSString videoUrl info objectForKey UIImagePickerControllerMediaURL Try.. getting the edited image first. If it doesn't exist then you get the original image. if CFStringCompare CFStringRef mediaType kUTTypeImage 0 kCFCompareEqualTo UIImage picture info objectForKey UIImagePickerControllerEditedImage if picture picture..
Video Recording using AVFoundation Framework iPhone? http://stackoverflow.com/questions/3932614/video-recording-using-avfoundation-framework-iphone @ file saved outputPath release return outputURL autorelease AVCaptureConnection connectionWithMediaType NSString mediaType fromConnections NSArray connections for AVCaptureConnection connection in connections for AVCaptureInputPort port in connection.. for AVCaptureConnection connection in connections for AVCaptureInputPort port in connection inputPorts if port mediaType isEqual mediaType return connection retain autorelease return nil void captureOutput AVCaptureFileOutput captureOutput.. connection in connections for AVCaptureInputPort port in connection inputPorts if port mediaType isEqual mediaType return connection retain autorelease return nil void captureOutput AVCaptureFileOutput captureOutput didStartRecordingToOutputFileAtURL..
iPhone:Programmatically compressing recorded video to share? http://stackoverflow.com/questions/5687341/iphoneprogrammatically-compressing-recorded-video-to-share void imagePickerController UIImagePickerController picker didFinishPickingMediaWithInfo NSDictionary info NSString mediaType info objectForKey UIImagePickerControllerMediaType if mediaType isEqualToString NSString kUTTypeMovie NSURL videoURL info.. NSDictionary info NSString mediaType info objectForKey UIImagePickerControllerMediaType if mediaType isEqualToString NSString kUTTypeMovie NSURL videoURL info objectForKey UIImagePickerControllerMediaURL NSString urlPath..
How to take picture from Camera & saved in Photo Gallery by programmatically? http://stackoverflow.com/questions/6812634/how-to-take-picture-from-camera-saved-in-photo-gallery-by-programmatically UIImagePickerController picker didFinishPickingMediaWithInfo NSDictionary info NSLog @ Media Info @ info NSString mediaType info valueForKey UIImagePickerControllerMediaType if mediaType isEqualToString NSString kUTTypeImage UIImage photoTaken.. NSDictionary info NSLog @ Media Info @ info NSString mediaType info valueForKey UIImagePickerControllerMediaType if mediaType isEqualToString NSString kUTTypeImage UIImage photoTaken info objectForKey @ UIImagePickerControllerOriginalImage Save Photo..
How to save recorded video into photo album? http://stackoverflow.com/questions/9991332/how-to-save-recorded-video-into-photo-album to save recorded video into photo album Following code is to save image took from camera into photo album. if mediaType isEqualToString NSString kUTTypeImage image info objectForKey UIImagePickerControllerEditedImage UIImageWriteToSavedPhotosAlbum.. void imagePickerController UIImagePickerController picker didFinishPickingMediaWithInfo NSDictionary info NSString mediaType info objectForKey UIImagePickerControllerMediaType if mediaType isEqualToString @ public.movie Saving the video Get the.. NSDictionary info NSString mediaType info objectForKey UIImagePickerControllerMediaType if mediaType isEqualToString @ public.movie Saving the video Get the new unique filename NSString sourcePath info objectForKey @ UIImagePickerControllerMediaURL..
|