Swiftgram/submodules/LegacyComponents/LegacyComponents/CBCoubLoopCompositionMaker.h
Peter d153fe0f21 Add 'submodules/LegacyComponents/' from commit 'd5594346161c1b7f203d1e87068bbe77bcaac019'
git-subtree-dir: submodules/LegacyComponents
git-subtree-mainline: 608630530451e02e5aec48389d144dbf7a3625b9
git-subtree-split: d5594346161c1b7f203d1e87068bbe77bcaac019
2019-06-11 18:51:15 +01:00

41 lines
996 B
Objective-C
Executable File

//
// Created by Tikhonenko Pavel on 26/11/2013.
// Copyright (c) 2013 Coub. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "CBCoubAsset.h"
#import <AVFoundation/AVFoundation.h>
@class CBCoubLoopCompositionMaker;
@protocol CBCoubAsset;
@protocol CBCoubLoopDelegate<NSObject>
@required
- (void)coubLoopDidFinishPreparing:(CBCoubLoopCompositionMaker *)loop;
- (void)coubLoop:(CBCoubLoopCompositionMaker *)loop didFailToLoadWithError:(NSError *)error;
@end
@interface CBCoubLoopCompositionMaker : NSObject
@property (nonatomic, weak) id<CBCoubLoopDelegate> delegate;
@property (nonatomic, strong) id<CBCoubAsset> asset;
@property (nonatomic, strong) AVAsset *videoAsset;
@property (nonatomic, strong) NSError *error;
@property (nonatomic, readonly) BOOL hasAudio;
@property (nonatomic, assign, getter=isLoopReady) BOOL loopReady;
- (void)prepareLoop;
- (void)cancelPrepareLoop;
- (void)notifyObservers;
+ (instancetype)coubLoopWithAsset:(id<CBCoubAsset>)asset;
@end