apple sample官方源码

2017-01-22  本文已影响58人  KeepFighting

音效处理

混响的wet和dry、声相、速率、声音混合、录制

自定义拍照界面展示

拍照、打开相册、展示图片

加速度计,陀螺仪和设备的运动运动数据的获取

PhotoMap

获取照片的更多信息如地理标记

图片.png
 [queue addOperationWithBlock:^{
            NSData *imageData = [NSData dataWithContentsOfFile:photoPath];
            CGDataProviderRef dataProvider = CGDataProviderCreateWithCFData((CFDataRef)imageData);
            CGImageSourceRef imageSource = CGImageSourceCreateWithDataProvider(dataProvider, NULL);
            NSDictionary *imageProperties = (NSDictionary *)CFBridgingRelease(CGImageSourceCopyPropertiesAtIndex(imageSource,0, NULL));
            
            // check if the image is geotagged
            NSDictionary *gpsInfo = imageProperties[(NSString *)kCGImagePropertyGPSDictionary];
            if (gpsInfo) {
                CLLocationCoordinate2D coord;
                coord.latitude = [gpsInfo[(NSString *)kCGImagePropertyGPSLatitude] doubleValue];
                coord.longitude = [gpsInfo[(NSString *)kCGImagePropertyGPSLongitude] doubleValue];
                if ([gpsInfo[(NSString *)kCGImagePropertyGPSLatitudeRef] isEqualToString:@"S"])
                    coord.latitude = coord.latitude * -1;
                if ([gpsInfo[(NSString *)kCGImagePropertyGPSLongitudeRef] isEqualToString:@"W"])
                    coord.longitude = coord.longitude * -1;
                
                NSString *fileName = [[photoPath lastPathComponent] stringByDeletingPathExtension];
                PhotoAnnotation *photo = [[PhotoAnnotation alloc] initWithImagePath:photoPath title:fileName coordinate:coord];
                
                @synchronized(photos) {
                    [photos addObject:photo];
                }
            }
            
            if (imageSource)
                CFRelease(imageSource);

            if (imageProperties)
                CFRelease(CFBridgingRetain(imageProperties));
            
            if (dataProvider)
                CFRelease(dataProvider);
        }];
    }
    
    [queue waitUntilAllOperationsAreFinished];

HLS直播demo

上一篇下一篇

猜你喜欢

热点阅读