CLUObserveModule
@interface CLUObserveModule : NSObject <CLURecordableModule>
CLUObserveModule
is a base class for all modules which needs to observe their data (except CLUVideoModule
module) and record them only if new data has arrived (like CLUNetworkModule
or CLUUserInteractionModule
modules) or something changed with next frame iteration (like CLUViewStructureModule
module). This class is responsible for thread safety of new data writing via Writers and Data buffer management.
-
BOOL property which indicates whether video recording has started or not
Declaration
Objective-C
@property (readonly, nonatomic) BOOL isRecording;
Swift
var isRecording: Bool { get }
-
Current available timestamp. This property updating constantly with
addNewFrameWithTimestamp:
fromCLURecordableModule
protocolDeclaration
Objective-C
@property (readonly, nonatomic) CFTimeInterval currentTimeStamp;
Swift
var currentTimeStamp: CFTimeInterval { get }
-
Indicate whether data buffer empty or not
Declaration
Objective-C
- (BOOL)isBufferEmpty;
Swift
func isBufferEmpty() -> Bool
Return Value
BOOL value which indicates whether data buffer empty or not
-
Add new
NSData
object to buffer, so it could be saved to file via Writer on next iteration ofaddNewFrameWithTimestamp:
fromCLURecordableModule
protocolDeclaration
Objective-C
- (void)addData:(NSData *)bufferItem;
Swift
func add(_ bufferItem: Data!)
Parameters
bufferItem
NSData
object which you need to save to buffer -
Remove all
NSData
entities from data bufferDeclaration
Objective-C
- (void)clearBuffer;
Swift
func clearBuffer()