Не похоже, что можно избежать сжатия с помощью UIImagePickerController. См. Этот ответ:
https://stackoverflow.com/a/5893066/406152
Я попытался использовать imagePicker.videoQuality = UIImagePickerControllerQualityTypeHigh;
, но он все еще делает сжатия. Ugh.
РЕДАКТИРОВАТЬ:
Однако вы можете катиться самостоятельно. Это позволит получить доступ к необработанным видеофайлам:
iOS 8
PHFetchResult *assetsFetchResult = [PHAsset fetchAssetsWithMediaType:PHAssetMediaTypeVideo options:nil];
for (PHAsset *asset in assetsFetchResult) {
PHVideoRequestOptions *videoRequestOptions = [[PHVideoRequestOptions alloc] init];
videoRequestOptions.version = PHVideoRequestOptionsVersionOriginal;
[[PHImageManager defaultManager] requestAVAssetForVideo:asset options:videoRequestOptions resultHandler:^(AVAsset *asset, AVAudioMix *audioMix, NSDictionary *info) {
// the AVAsset object represents the original video file
}];
}
Посмотрите документацию PhotoKit для доступа к коллекциям (моменту) и другим параметрам.
Вот пример приложения от Apple, использующего PhotoKit, который можно изменить, чтобы быть сборщиком фотографий: https://developer.apple.com/library/ios/samplecode/UsingPhotosFramework/Introduction/Intro.html
Вот библиотека выбора фотографий на GitHub, которая использует PhotoKit, которая выглядит многообещающей, поскольку она дает вам объекты PHAsset
для всех выбранных изображений / видео: https://github.com/guillermomuntaner / GMImagePicker
iOS 7 и ниже
ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init];
[library enumerateGroupsWithTypes:ALAssetsGroupAll usingBlock:^(ALAssetsGroup *group, BOOL *stop) {
if (group) {
// If you want, you can filter just pictures or videos
// I just need videos so I do this:
[group setAssetsFilter:[ALAssetsFilter allVideos]];
[group enumerateAssetsUsingBlock:^(ALAsset *asset, NSUInteger index, BOOL *stop){
if (asset){
// You can now add this ALAsset in your own video picker.
// Note that you can only access the ALAsset as long as
// you maintain a reference to the ALAssetsLibrary
// Or if you want to process the video, you can create an AVAsset:
NSURL *url = asset.defaultRepresentation.url;
AVAsset *videoAsset = [AVAsset assetWithURL:url];
}
}];
}
} failureBlock:^(NSError *error) {
NSLog(@"error enumerating AssetLibrary groups %@\n", error);
}];
Я разговаривал с кем-то из команды AWS. Существует ошибка, влияющая на совместимость между Gremlin ^3.3.5
и Lambda. В частности, проблема связана с базовым движком GraphSON v3 и тем, как Lambda анализирует JSON.
Временное решение - использовать GraphSON v2 при создании экземпляра DriverRemoteConnection
:
const dc = new DriverRemoteConnection(
`ws://my-neptune-cluster.us-east-1.neptune.amazonaws.com:8182/gremlin`,
{ mimeType: "application/vnd.gremlin-v2.0+json" } // Fall back to GraphSON v2
);