Interface StreamServer
-
- All Superinterfaces:
Peripheral
public interface StreamServer extends Peripheral
StreamServer peripheral interface.This peripheral allows streaming of live camera video and replay of video files stored in drone memory.
This peripheral can be obtained from a
drone
using:drone.getPeripheral(StreamServer.class)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.parrot.drone.groundsdk.device.peripheral.Peripheral
Peripheral.Provider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
enableStreaming(boolean enable)
Drone streaming control.Ref<CameraLive>
live(Ref.Observer<CameraLive> observer)
Provides access to the drone camera live stream.Ref<MediaReplay>
replay(MediaReplay.Source source, Ref.Observer<MediaReplay> observer)
Creates a new replay stream for some remote media.boolean
streamingEnabled()
Tells whether streaming is currently enabled.
-
-
-
Method Detail
-
enableStreaming
void enableStreaming(boolean enable)
Drone streaming control.Provides global control of the ability to start streams.
When streaming gets enabled, currently
suspended
stream will be resumed.
When streaming is enabled, streams can be started.When streaming gets disabled, currently started stream gets suspended, in case it supports being resumed, or
stopped
otherwise.
When streaming is disabled, no stream can be started.- Parameters:
enable
-true
to enable streaming,false
to disable it
-
streamingEnabled
boolean streamingEnabled()
Tells whether streaming is currently enabled.- Returns:
true
if streaming is enabled, otherwisefalse
-
live
@NonNull Ref<CameraLive> live(@NonNull Ref.Observer<CameraLive> observer)
Provides access to the drone camera live stream.There is only one live stream instance that is shared amongst all open references.
Closing the returned reference does NOT automatically stops the referenced camera live stream.
- Parameters:
observer
- observer notified when the stream state changes- Returns:
- a reference onto the camera live stream interface
-
replay
@NonNull Ref<MediaReplay> replay(@NonNull MediaReplay.Source source, @NonNull Ref.Observer<MediaReplay> observer)
Creates a new replay stream for some remote media.This method creates a new replay stream instance for the given media stream identifier that must be disposed by closing the returned reference once that stream is not needed.
Closing the returned reference automatically stops the referenced media replay stream.
- Parameters:
source
- identifies remote media streamobserver
- observer notified when the stream state changes- Returns:
- a reference onto a new replay stream for the given media stream identifier
-
-