mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-09-15 08:27:52 +00:00
Summary: Use NSData as key Add chunking of files Add support for Animated Images This adds support for GIF playback in ASDK. It's not currently ready for merging to public ASDK – for one the GIF decompression may make more sense in PINRemoteImage. Removed duration as it wasn't used Make cover image lazily loaded Differential Revision: https://phabricator.pinadmin.com/D82033
37 lines
694 B
Objective-C
37 lines
694 B
Objective-C
//
|
|
// ASImageNode+AnimatedImage.h
|
|
// Pods
|
|
//
|
|
// Created by Garrett Moon on 3/22/16.
|
|
//
|
|
//
|
|
|
|
#import "ASImageNode.h"
|
|
|
|
#import "ASThread.h"
|
|
|
|
@interface ASImageNode ()
|
|
{
|
|
ASDN::RecursiveMutex _animatedImageLock;
|
|
ASDN::Mutex _displayLinkLock;
|
|
ASAnimatedImage *_animatedImage;
|
|
CADisplayLink *_displayLink;
|
|
|
|
//accessed on main thread only
|
|
CFTimeInterval _playHead;
|
|
NSUInteger _playedLoops;
|
|
}
|
|
|
|
@property (atomic, assign) BOOL animatedImagePaused;
|
|
@property (atomic, assign) CFTimeInterval lastDisplayLinkFire;
|
|
|
|
@end
|
|
|
|
@interface ASImageNode (AnimatedImage)
|
|
|
|
@property (nullable, atomic, strong) ASAnimatedImage *animatedImage;
|
|
|
|
- (void)coverImageCompleted:(UIImage *)coverImage;
|
|
|
|
@end
|