Interface CameraLive
-
- All Superinterfaces:
Stream
public interface CameraLive extends Stream
Camera live stream control interface.Provides control over the drone camera live stream, allowing to pause, resume or stop playback.
There is only one instance of this interface that is shared amongst all clients that have an
open reference
on this stream.This stream supports
suspension
. When it is started and gets interrupted because another stream starts, or because streaming getsdisabled
globally, then it will move to the SUSPENDEDstate
.
Once the interrupting stream stops, or streaming gets enabled, then it will try and be resumed in the state it was before suspension.
Also, this implies that this stream may be started even while streaming is globally disabled. In such a case, it will move to the SUSPENDED state until either it isStream.State.STOPPED
by client request, or streaming gets enabled.The stream is neither stopped nor released when the reference that provides it is closed.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
CameraLive.PlayState
Camera live stream playback state.-
Nested classes/interfaces inherited from interface com.parrot.drone.groundsdk.stream.Stream
Stream.Sink, Stream.State
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
pause()
Requests playback to pause.boolean
play()
Requests playback to start.CameraLive.PlayState
playState()
Informs about current playback state.void
stop()
Stops the stream.
-
-
-
Method Detail
-
playState
@NonNull CameraLive.PlayState playState()
Informs about current playback state.- Returns:
- current playback state
-
play
boolean play()
Requests playback to start.This method will try and start the stream if necessary.
- Returns:
true
if playback request was sent, otherwisefalse
-
pause
boolean pause()
Requests playback to pause.This method will try and start the stream if necessary.
- Returns:
true
if playback request was sent, otherwisefalse
-
stop
void stop()
Stops the stream.This method will bring the stream to the
Stream.State.STOPPED
state.*
-
-