Once the preview or video playback stream is opened. You have to close it to release both FW’s resources and SDK’s resources.
How to close stream:
A1. The app manages the state itself, If the App calls start to open the stream, it must call stop sometime in the future. Even if the app has received the video streaming stopped event.
A2. Calls the new API isStreamingOn() from the interface ICatchIPancamPreview and ICatchIPancamPlayback.
// The java sample(The ICatchIPancamPrevie)try {Boolean streamingOn1 = pancamSession.getPreview().isStreamingOn();Log.e("__stream_status__", "streamingOn1: " + streamingOn1);}catch(Exception ex) {ex.printStackTrace();}// The java sample(The ICatchIPancamPlayback)try {Boolean streamingOn2 = pancamSession.getVideoPlayback().isStreamingOn();Log.e("__stream_status__", "streamingOn2: " + streamingOn2);}catch(Exception ex) {ex.printStackTrace();}
// The c++ sample(The ICatchIPancamPrevie)bool streamingOn1 = pancamSession->getPreview()->isStreamingOn();printf("preview stream status(opened): %s", streamingOn1 ? "true" : "false");// The c++ sample(The ICatchIPancamPlayback)bool streamingOn2 = pancamSession->getVideoPlayback()->isStreamingOn();printf("playback stream status(opened): %s", streamingOn2 ? "true" : "false");
The previous interface has been deprecated and should not be used, this one list below:
// this class located in package com.icatchtek.control.customerpublic interface ICatchCameraState {@Deprecatedboolean isStreaming() throws IchInvalidSessionException, IchNotSupportedException;```// other interface}
// this class located in namespace com::icatchtek::controlclass ICatchCameraState{···public:virtual bool isStreaming() = 0;···};
