Giter Club home page Giter Club logo

ios-mediamanagerdemo's People

Contributors

oliverou avatar weizhoufeng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ios-mediamanagerdemo's Issues

How to download photos concurrently

for (NSNumber *number in self.selectedIndexPathRows) {
        NSInteger row = [number integerValue];
        DJIMediaFile *mediaFile = self.mediaList[row];
        __block NSUInteger previousOffset = 0;
        __block NSMutableData *fileData = nil;
        [mediaFile fetchFileDataWithOffset:previousOffset updateQueue:dispatch_get_main_queue() updateBlock:^(NSData * _Nullable data, BOOL isComplete, NSError * _Nullable error) {
            if (error) {
                DMLog(@"error---%@", error);
            }
            if (fileData == nil) {
                fileData = [data mutableCopy];
            }
            else {
                [fileData appendData:data];
            }
            previousOffset += data.length;
            float progress = previousOffset * 100.0 / mediaFile.fileSizeInBytes;
            DMLog(@"%@-------Downloading: %0.1f%%", mediaFile.fileName, progress);
            if (previousOffset == mediaFile.fileSizeInBytes && isComplete) {
                [target showPhotoWithData:fileData];
                [target savePhotoWithData:fileData];
            }
        }];
    }

I want to use this code to download photos concurrently, But I always get error, How can I do to download photos concurrently.

Swift Version

Hi DJI,
I am happy to see this GitHub repo.
I am wondering why are these repo not in Swift?

I mean it is 2017 and almost 2018 after all. I believe most people have moved on to Swift for quite some time now and more people are moving over to Swift as well.

If DJI could, I believe having the tutorials and projects in Swift will be great!

Thank you for your support DJI and I look forward to more of your work.

Cloned repo, does not build successfully

I cloned this repo, pod installed, then tried to build it in XCode (8.3.3). However, the build failed. i am not sure what the problem is.

Thanks for your help!

Saving videos

Is this issue about bugs or crash issues of the Sample Code?

Yep, then please delete this template and provide the following infos for us to help investigate the issue:

  • Description of the issues.
  • Steps to reproduce the bug or crash issues(It would be great if you can provide this)
  • Crash logs (If you can find it, it would be very helpful)
  • DJI iOS SDK version you are using (Like iOS SDK 3.4, etc)
  • DJI Product you are using (Like Phantom 4, Mavic Pro, etc)
  • iOS system version you are using (Like iOS 8.3, iOS 9, etc)
  • iOS device type you are using (Like iPhone5s, iPhone 6, iPad Air Wifi, iPad mini 3 LTE, etc)
  • Xcode version you are using (Like Xcode 7.0)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.