DataSourcePlaybackContext
Objective-C
@interface DataSourcePlaybackContext : NSObject
Swift
class DataSourcePlaybackContext : NSObject
This class encapsulates playback context. It represents the operations that can be performed on a DataSourceContext which has playback capabilities ( e.g. log ).
-
Init with the data source context.
Declaration
Objective-C
- (nonnull instancetype)initWithContext:(nonnull DataSourceContext *)context;
Swift
init(context: DataSourceContext)
-
Pause the playback.
Declaration
Objective-C
- (BOOL)pause;
Swift
func pause() -> Bool
-
Resume the playback.
Declaration
Objective-C
- (BOOL)resume;
Swift
func resume() -> Bool
-
Step through the log data by data.
Declaration
Objective-C
- (void)step;
Swift
func step()
-
Returns the playback state of this data source.
-
Gets the speed multiplier.
Declaration
Objective-C
- (float)getSpeedMultiplier;
Swift
func getSpeedMultiplier() -> Float
-
Sets the speed multiplier.
Declaration
Objective-C
- (void)setSpeedMultiplier:(float)value;
Swift
func setSpeedMultiplier(_ value: Float)
Parameters
value
The speed multiplier. Can have values between 0.f and getMaxSpeedMultiplier.
-
Gets the max multiplier.
Declaration
Objective-C
- (float)getMaxSpeedMultiplier;
Swift
func getMaxSpeedMultiplier() -> Float
-
Gets the min multiplier.
Declaration
Objective-C
- (float)getMinSpeedMultiplier;
Swift
func getMinSpeedMultiplier() -> Float
-
Returns the current position ( milliseconds from begin ).
Declaration
Objective-C
- (NSInteger)getCurrentPosition;
Swift
func getCurrentPosition() -> Int
-
Sets the current position.
Declaration
Objective-C
- (NSInteger)setCurrentPosition:(NSInteger)value;
Swift
func setCurrentPosition(_ value: Int) -> Int
Parameters
value
- the new current position ( milliseconds from begin ).
Return Value
Returns the old position ( milliseconds from begin ).
-
Returns playback duration ( milliseconds ).
Declaration
Objective-C
- (NSInteger)getDuration;
Swift
func getDuration() -> Int