美文网首页
apple sample官方源码

apple sample官方源码

作者: KeepFighting | 来源:发表于2017-01-22 11:02 被阅读58次

    音效处理

    混响的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

    相关文章

      网友评论

          本文标题:apple sample官方源码

          本文链接:https://www.haomeiwen.com/subject/artobttx.html