public class

PreviewData

extends Object
java.lang.Object
   ↳ co.megacool.megacool.PreviewData

Class Overview

The data needed to build a preview. This should only be used by non-native Android apps that cannot use renderPreviewOfGif(), and this interface should be considered unstable until there is first-class support for custom engines.

Summary

Public Methods
int getLastFrameDelayMs()
Get the last frame delay from the recording used to create the preview
synchronized PreviewFrame getNextFrame()
Get the next frame in the sequence
synchronized int getNumberOfFrames()
Get the number of frames to be shown in the preview.
int getPlaybackFrameRate()
Get the playback frame rate from the recording used to create the preview
void setRepeat(boolean repeat)
Enable/disable looping of the preview
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public int getLastFrameDelayMs ()

Get the last frame delay from the recording used to create the preview

Returns
  • the last frame delay (in milliseconds)

public synchronized PreviewFrame getNextFrame ()

Get the next frame in the sequence

Returns
  • The next frame in the sequence or null if all frames have been shown and repeat has been set to false

public synchronized int getNumberOfFrames ()

Get the number of frames to be shown in the preview. Note that this might change during the preview being shown if the recording hasn't completed storing all of its frames to disk

Returns
  • the number of frames to be shown in the preview

public int getPlaybackFrameRate ()

Get the playback frame rate from the recording used to create the preview

Returns
  • the playback frame rate (in frames per second)

public void setRepeat (boolean repeat)

Enable/disable looping of the preview

Parameters
repeat true to loop or false to play once and stop