Exemple #1
0
 public static UIImage GetVideoThumbnail(this AVAsset asset)
 {
     return(CoreUtility.ExecuteFunction("GetVideoThumbnail", delegate()
     {
         AVAssetImageGenerator generator = new AVAssetImageGenerator(asset);
         generator.AppliesPreferredTrackTransform = true;
         CMTime ignoreTime = new CMTime();
         NSError error = null;
         CGImage image = generator.CopyCGImageAtTime(new CMTime(1, 1), out ignoreTime, out error);
         if (error != null)
         {
             Container.Track.LogError(error.ConvertToException(), "GetVideoThumbnail");
         }
         return new UIImage(image);
     }));
 }
 protected virtual void LogError(NSError error, string tag = "")
 {
     Container.Track.LogError(error.ConvertToException(), this.TrackPrefix + ":" + tag);
 }