Menu

IosImagePicker Demo doesn't work with MediaType video

Jmltoro
2014-12-04
2014-12-23
  • Jmltoro

    Jmltoro - 2014-12-04

    After recording a video, with "SaveToAlbum" property to true, I try to get it from the gallery, but it is not there.
    I put breakpoints to see if the application passes the function that records in the galleries
    (UISaveVideoAtPathToSavedPhotosAlbum( PNSStr( FileSavedPath ), nil, nil, nil ); in DPF.iOS.UIImagePickerController.pas ) and indeed passes by.
    I do not know what I can do.
    Are there someone who can help me?
    thanks in advance.

     
  • Sebastian Zierer

    The PNSStr looks suspicious.

    Please try changing PNSStr to NSStr in DPF.iOS.UIImagePickerController:

        if FDPFUIImagePickerController.FSaveToAlbum then
          if UIVideoAtPathIsCompatibleWithSavedPhotosAlbum( NSStr( FileSavedPath ) ) then
            UISaveVideoAtPathToSavedPhotosAlbum( NSStr( FileSavedPath ), nil, nil, nil );
    

    and in DPF.iOS.Classes:

    procedure UISaveVideoAtPathToSavedPhotosAlbum( videoPath: NSString; completionTarget: Pointer; completionSelector: SEL; contextInfo: Pointer ); cdecl; external libUIKit name _PU + 'UISaveVideoAtPathToSavedPhotosAlbum';
    function UIVideoAtPathIsCompatibleWithSavedPhotosAlbum( videoPath: NSString ): Boolean; cdecl; external libUIKit name _PU + 'UIVideoAtPathIsCompatibleWithSavedPhotosAlbum';
    

    Does that fix your problem?

     

    Last edit: Sebastian Zierer 2014-12-10
  • Babak Yaghoobi

    Babak Yaghoobi - 2014-12-22

    Hi Jmltoro

    Fixed.
    Thank you for your feedback. Please download last source code from Code section.

    Regards

     
  • Jmltoro

    Jmltoro - 2014-12-22

    Thanks a lot for the intention, but on iosImagePicker Demo (9.1.0) the event DPFUIImagePickerController1didFinishPickingMovie has not connected with onDidFinishPickingMovie event, and when I try connect it, "Property and method DPFUIImagePickerController1didFinishPickingMovie are not compatible" error appear.
    Am I doing something wrong?

     
  • Babak Yaghoobi

    Babak Yaghoobi - 2014-12-22

    Hi

    You must be download last source code from Code section :
    https://sourceforge.net/p/dpfdelphiios/code/

    Best Regards

     
  • Jmltoro

    Jmltoro - 2014-12-23

    Thanks a lot for your great job.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.