public final class Recording implements AutoCloseable


A recording started with RecorderCommands.start. This interface allows awaits for completion, if a time limit was specified or force stop the recording.

Summary

Public constructors

Recording(
    @NonNull ProcessCommands process,
    @NonNull Shell.CommandOutput commandOutput,
    long timeLimitSeconds,
    int pid
)

Public methods

final void
await(long timeoutSeconds)

Blocks until the recording is complete.

void

Stops the current recording.

final int

The process id of the recording.

final boolean

Returns whether the recording is still running.

Public constructors

Recording

Added in 1.0.0-alpha01
public Recording(
    @NonNull ProcessCommands process,
    @NonNull Shell.CommandOutput commandOutput,
    long timeLimitSeconds,
    int pid
)

Public methods

await

Added in 1.0.0-alpha01
public final void await(long timeoutSeconds)

Blocks until the recording is complete. Note that if a time limit was not given this method throws an IllegalStateException. Also if the screen recorder process doesn't end by the given timeoutSeconds, a TimeoutException is thrown.

Parameters
long timeoutSeconds

the timeout in number of seconds.

close

Added in 1.0.0-alpha01
public void close()

Stops the current recording.

getPid

Added in 1.0.0-alpha01
public final int getPid()

The process id of the recording.

isRunning

Added in 1.0.0-alpha01
public final boolean isRunning()

Returns whether the recording is still running.