# class ICameraStreamManager

    interface ICameraStreamManager

Package: | dji.v5.manager.interfaces

##### Description:

Camera stream management class. Supports functions such as camera lens video stream display, video frame data and video stream data acquisition. The following is the interface usage process:

- Add a listener to obtain the available camera index through `addAvailableCameraUpdatedListener`.
- Call `putCameraStreamSurface` to display the camera video stream to a specific surface.
- Add the video stream data listener `addReceiveStreamListener` to receive the video stream data. The video stream data can be used for functions such as self-decoding display and third-party livestreaem.
- Add the frame data listener `addFrameListener` to receive frame data. Frame data can be used for algorithm processing of functions such as AI recognition.
`Supported since MSDK 5.8.0`

##### Class Members:

method
addAvailableCameraUpdatedListener

###### method addAvailableCameraUpdatedListener

    void addAvailableCameraUpdatedListener(@NonNull AvailableCameraUpdatedListener listener)

Package: | dji.v5.manager.interfaces

##### Description:

Set available camera listener. This listener allows you to listen for available camera indexes. After obtaining the available camera indexes, you can call `putCameraStreamSurface` to display the video stream of a specific camera.
`Supported since MSDK 5.8.0`

##### Input Parameters:

@NonNull AvailableCameraUpdatedListener listener | Available camera listener

method
removeAvailableCameraUpdatedListener

###### method removeAvailableCameraUpdatedListener

    void removeAvailableCameraUpdatedListener(@NonNull AvailableCameraUpdatedListener listener)

Package: | dji.v5.manager.interfaces

##### Description:

Remove the listener of avilable camera.
`Supported since MSDK 5.8.0`

##### Input Parameters:

@NonNull AvailableCameraUpdatedListener listener | Available camera listener

method
putCameraStreamSurface

###### method putCameraStreamSurface

    void putCameraStreamSurface(@NonNull ComponentIndexType cameraIndex,
                                @NonNull Surface surface,
                                int surfaceWidth,
                                int surfaceHeight,
                                @NonNull ScaleType scaleType)

Package: | dji.v5.manager.interfaces

##### Description:

Display the camera video stream to a specific surface. A single surface can display at most one cameraIndex camera video stream at the same time. If this interface is called multiple times for the same surface, the parameters of the surface will be updated, such as updating the camera index, surface's size or scale type.
Note:
If you want to display images from different camera lenses, you can call `KeyCameraVideoStreamSource` to switch camera lenses.
`Supported since MSDK 5.8.0`

##### Input Parameters:

@NonNull ComponentIndexType cameraIndex | Set the camera index for stream display.
@NonNull Surface surface | Set the surface that needs to display the video stream. Supports SurfaceView, TextureView and MediaCodeC Surface, does not support GLSurfaceView surface and any surface bound to OpenGL.
int surfaceWidth | Set the surface width required for video stream display.
int surfaceHeight | Set the surface height required for video stream display.
@NonNull ScaleType scaleType | Set the scale type required for video stream display.

method
removeCameraStreamSurface

###### method removeCameraStreamSurface

    void removeCameraStreamSurface(@NonNull Surface surface)

Package: | dji.v5.manager.interfaces

##### Description:

Remove the added surface. When you no longer need to use the surface, please call this interface to remove the added surface, otherwise it will cause memory leaks. After removal, the surface will no longer display the video stream.
`Supported since MSDK 5.8.0`

##### Input Parameters:

@NonNull Surface surface | Set the Surface to be removed.

method
addFrameListener

###### method addFrameListener

    void addFrameListener(@NonNull ComponentIndexType cameraIndex,
                          @NonNull FrameFormat format,
                          @NonNull CameraFrameListener listener)

Package: | dji.v5.manager.interfaces

##### Description:

Add video frame data listener. This listener can listen the video frame data of the specified camera. You can use video frame data to implement functions such as AI recognition.
`Supported since MSDK 5.8.0`

##### Input Parameters:

@NonNull ComponentIndexType cameraIndex | Set the camera index to be listen.
@NonNull FrameFormat format | Set the frame format to be listen.
@NonNull CameraFrameListener listener | video frame data listener

method
removeFrameListener

###### method removeFrameListener

    void removeFrameListener(@NonNull CameraFrameListener listener)

Package: | dji.v5.manager.interfaces

##### Description:

Remove video frame data listener.
`Supported since MSDK 5.8.0`

##### Input Parameters:

@NonNull CameraFrameListener listener | video frame data listener

method
addReceiveStreamListener

###### method addReceiveStreamListener

    void addReceiveStreamListener(@NonNull ComponentIndexType cameraIndex, @NonNull ReceiveStreamListener listener)

Package: | dji.v5.manager.interfaces

##### Description:

Add a video stream data listener. Through this listener, you can receive the raw video stream data of the specified camera. You can use this stream data to decode and display it yourself or implement functions such as third-party live streaming.
`Supported since MSDK 5.8.0`

##### Input Parameters:

@NonNull ComponentIndexType cameraIndex | Set the camera index to be listen.
@NonNull ReceiveStreamListener listener | video stream data listener

method
removeReceiveStreamListener

###### method removeReceiveStreamListener

    void removeReceiveStreamListener(@NonNull ReceiveStreamListener listener)

Package: | dji.v5.manager.interfaces

##### Description:

Remove video stream data listener.
`Supported since MSDK 5.8.0`

##### Input Parameters:

@NonNull ReceiveStreamListener listener | video stream data listener

method
setKeepAliveDecoding

###### method setKeepAliveDecoding

    void setKeepAliveDecoding(boolean isKeepALive)

Package: | dji.v5.manager.interfaces

##### Description:

Whether to let the decoder continue decoding in the background, the default value is `false`. If it is `false`, when the manager does not reference any Surface, ReceiveStreamListener, or CameraFrameListener, the decoder will pause decoding to reduce background performance/power consumption, but this will increase the delay in pushing camera video stream data for the first time. If `true`, the decoder will continue to decode in the background, which will increase performance/power consumption, but can reduce the delay in pushing camera video stream data for the first time.
`Supported since MSDK 5.8.0`

##### Input Parameters:

boolean isKeepALive | `true` means the decoder continues decoding in the background.

method
getLiveViewLocationWithGPS

###### method getLiveViewLocationWithGPS

    @NonNull
        PinPointInfo getLiveViewLocationWithGPS(@NonNull LocationCoordinate3D pointPos, @NonNull ComponentIndexType type)

Package: | dji.v5.manager.interfaces

##### Description:

Gets the pin point information with GPS which is used to show pin point in the liveview.
`Supported since MSDK 5.9.0`

##### Input Parameters:

@NonNull LocationCoordinate3D pointPos | The GPS location, you could get the location from `KeyLaserMeasureInformation`: `getLocation3D` or get the location with map.
@NonNull ComponentIndexType type | Set the camera index displayed by the current stream.

##### Return:

PinPointInfo | Return the pin point information.

##### Related:

class
AvailableCameraUpdatedListener
class
CameraFrameListener
class
ReceiveStreamListener
class
StreamInfo
enum
MimeType

###### enum MimeType

    enum MimeType

Package: | dji.v5.manager.interfaces

##### Description:

Mime type, supports H264 and H265.
`Supported since MSDK 5.8.0`

##### Enum Members:

H264 | H264
H265 | H265

##### Class Members:

unknown

###### unknown

    enum ScaleType

Package: | dji.v5.manager.interfaces

##### Description:

Scale type.
`Supported since MSDK 5.8.0`

enum
FrameFormat

###### enum FrameFormat

    enum FrameFormat

Package: | dji.v5.manager.interfaces

##### Description:

The format of the video stream data.
`Supported since MSDK 5.8.0`

##### Enum Members:

YUV420_888 | YUV420_888
YUV444_888 | YUV444_888
YUY2 | YUV2
NV21 | NV21
RGBA_8888 | RGBA_8888

##### Class Members:

class
PinPointInfo
class
PinPoint

#### Members

enum
Result

###### enum Result

    enum Result

Package: | dji.v5.manager.datacenter.camera.view

##### Description:

The result of pin point callback.

##### Enum Members:

SUCCESS | Success to get the pin point location, the point is insde the liveview.
SUCCESS_BUT_OUT_OF_SCREEN | Success to get the pin point location, but point is out of liveview, should show as side indicator, please reference to DJI pilot.
FAILED | Failed to get the pin point location.
INVALID_DRONE_POSITION | Failed to get the pin point location, because the drone position is invalid.
INVALID_POINT_POSITION | Failed to get the pin point location, because the input GPS location is invalid.
GIMBAL_ATTI_ERROR | Failed to get the pin point location, because of gimbal attitude error.
CAMEAR_ERROR | Failed to get the pin point location, because of camera error.

##### Class Members:

×

## Search Mobile SDK Document

{{searchCount}} Results

- ### {{{(item.highlights && item.highlights.title) || item.title}}}

  {{{(item.highlights && item.highlights.content[0]) || item.title}}}

Load More
Loading...
Not Found