ICatchIPancamVideoPlayback interface
package com.icatchtek.pancam.customer;public interface ICatchIPancamVideoPlayback extends ICatchIPancamRender {...}
This class is used to start/stop video stream, play video files located in camera storage or located in your phone/pc. Set render mode(through it’s parent interface), get thumbnail from the stream. All operations related to video file stream stream can be done through this class, and in order to understand the full functionality of this class, you should first look at the methods provided by its parent interface. Different from the real-time live streaming, the video stream from the file can be dragged, paused, and we can also get the length of the video stream. Therefore, we also provide corresponding interfaces for these additional operations.
Public methods
play
boolean play(com.icatchtek.reliant.customer.type.ICatchFile file,boolean disableAudio,boolean remote)throws com.icatchtek.reliant.customer.exception.IchStreamNotSupportException,com.icatchtek.reliant.customer.exception.IchInvalidSessionException,com.icatchtek.reliant.customer.exception.IchTransportException,com.icatchtek.reliant.customer.exception.IchFileNotFoundException,com.icatchtek.reliant.customer.exception.IchInvalidArgumentException,com.icatchtek.reliant.customer.exception.IchStreamAlreadyStartedException
Play icatch video file from camera or from phone/pc(local storage).
Parameters:
- file - The file with which you want to play.
- disableAudio - disable audio or not.
- remote - Tells the SDK whether the video file comes from the local storage or from the camera.
Returns:
Return true if no error happened, otherwise return false.
Throws:
- com.icatchtek.reliant.customer.exception.IchStreamNotSupportException - Indicates Streaming not supported, the size may not match.
- com.icatchtek.reliant.customer.exception.IchInvalidSessionException - Indicates invalid session exception.
- com.icatchtek.reliant.customer.exception.IchTransportException - Indicates transport exception, from network or usb transport.
- com.icatchtek.reliant.customer.exception.IchFileNotFoundException - invalid file name or path.
- com.icatchtek.reliant.customer.exception.IchInvalidArgumentException - Invalid argument.
- com.icatchtek.reliant.customer.exception.IchStreamAlreadyStartedException - The stream already started, should close it first.
play
boolean play(com.icatchtek.reliant.customer.type.ICatchFile file,boolean disableAudio,boolean remote,double cachingTime)throws com.icatchtek.reliant.customer.exception.IchStreamNotSupportException,com.icatchtek.reliant.customer.exception.IchInvalidSessionException,com.icatchtek.reliant.customer.exception.IchTransportException,com.icatchtek.reliant.customer.exception.IchFileNotFoundException,com.icatchtek.reliant.customer.exception.IchInvalidArgumentException,com.icatchtek.reliant.customer.exception.IchStreamAlreadyStartedException
Play icatch video file from camera or from phone/pc(local storage).
Parameters:
- file - The file with which you want to play.
- disableAudio - disable audio or not.
- remote - Tells the SDK whether the video file comes from your file or from the camera.
- cachingTime - Set the caching length(in time), the recommended setting is 3-5 seconds.
Returns:
Return true if no error happened, otherwise return false.
Throws:
- com.icatchtek.reliant.customer.exception.IchStreamNotSupportException - Indicates Streaming not supported, the size may not match.
- com.icatchtek.reliant.customer.exception.IchInvalidSessionException - Indicates invalid session exception.
- com.icatchtek.reliant.customer.exception.IchTransportException - Indicates transport exception, from network or usb transport.
- com.icatchtek.reliant.customer.exception.IchFileNotFoundException - invalid file name or path.
- com.icatchtek.reliant.customer.exception.IchInvalidArgumentException - Invalid argument.
- com.icatchtek.reliant.customer.exception.IchStreamAlreadyStartedException - The stream already started, should close it first.
stop
boolean stop()throws com.icatchtek.reliant.customer.exception.IchStreamNotRunningException,com.icatchtek.reliant.customer.exception.IchInvalidSessionException,com.icatchtek.reliant.customer.exception.IchTransportException
Stop playing icatch video file.
Returns:
Return true if no error happened, otherwise return false.
Throws:**
- com.icatchtek.reliant.customer.exception.IchStreamNotRunningException - Stream not running, forget to call play?
- com.icatchtek.reliant.customer.exception.IchInvalidSessionException - Indicates invalid session exception, this comes from wificamSDK.
- com.icatchtek.reliant.customer.exception.IchTransportException - Indicates transport exception, from network or usb transport.
getThumbnail
boolean getThumbnail(com.icatchtek.reliant.customer.type.ICatchFrameBuffer frameBuffer,int timeoutInMS)throws com.icatchtek.reliant.customer.exception.IchVideoStreamClosedException,com.icatchtek.reliant.customer.exception.IchStreamNotRunningException,com.icatchtek.reliant.customer.exception.IchTryAgainException,com.icatchtek.reliant.customer.exception.IchInvalidSessionException,com.icatchtek.reliant.customer.exception.IchBufferTooSmallException
Get an image from default stream to use as thumbnail.
Parameters:
- frameBuffer - Used to store image data taken from the SDK.
- timeoutInMS - operation timeout. Tf the thumbnail could not be prepared during this time, will return false.
Returns:
Return true if a available thumbnail had been prepared.
Throws:
- com.icatchtek.reliant.customer.exception.IchVideoStreamClosedException - The stream had been closed
- com.icatchtek.reliant.customer.exception.IchStreamNotRunningException - The stream does not running, do you forget to start stream.
- com.icatchtek.reliant.customer.exception.IchTryAgainException - The thumbnail could not be prepared during timeoutInMS, but the next call may succeed.
- com.icatchtek.reliant.customer.exception.IchInvalidSessionException - Indicates invalid session exception.
- com.icatchtek.reliant.customer.exception.IchBufferTooSmallException - Buffer too small, you must specify a bigger buffer.
getThumbnail
boolean getThumbnail(int streamNo,com.icatchtek.reliant.customer.type.ICatchFrameBuffer frameBuffer,int timeoutInMS)throws com.icatchtek.reliant.customer.exception.IchVideoStreamClosedException,com.icatchtek.reliant.customer.exception.IchStreamNotRunningException,com.icatchtek.reliant.customer.exception.IchTryAgainException,com.icatchtek.reliant.customer.exception.IchInvalidSessionException,com.icatchtek.reliant.customer.exception.IchBufferTooSmallException
Get an image from a specified stream to use as thumbnail, and the stream is specified by streamNo, the streamNo parameter can be obtained by ‘getVideo Formats/getVideo Format’.
Parameters:
- streamNo - The number of stream which you want to get thumbnail from.
- frameBuffer - Used to store image data taken from the SDK.
- timeoutInMS - operation timeout. Tf the thumbnail could not be prepared during this time, will return false.
Returns:
Return true if a available thumbnail had been prepared.
Throws:
- com.icatchtek.reliant.customer.exception.IchVideoStreamClosedException - The stream had been closed
- com.icatchtek.reliant.customer.exception.IchStreamNotRunningException - The stream does not running, do you forget to start stream.
- com.icatchtek.reliant.customer.exception.IchTryAgainException - The thumbnail could not be prepared during timeoutInMS, but the next call may succeed.
- com.icatchtek.reliant.customer.exception.IchInvalidSessionException - Indicates invalid session exception.
- com.icatchtek.reliant.customer.exception.IchBufferTooSmallException - Buffer too small, you must specify a bigger buffer.
isStreamingOn
boolean isStreamingOn()throws com.icatchtek.reliant.customer.exception.IchInvalidSessionException,com.icatchtek.reliant.customer.exception.IchTransportException
Get the status of the video playback stream, is turned on?
Returns:
Return true if the stream is already opened, otherwise return false.
Throws:**
- com.icatchtek.reliant.customer.exception.IchInvalidSessionException - Indicates invalid session exception.
- com.icatchtek.reliant.customer.exception.IchTransportException - Indicates transport exception, from network or usb transport.
getLength
double getLength()throws com.icatchtek.reliant.customer.exception.IchStreamNotRunningException,com.icatchtek.reliant.customer.exception.IchTransportException,com.icatchtek.reliant.customer.exception.IchInvalidSessionException
Get the length of the video file being played.
Returns:
Return true if no error happened, otherwise return false.
Throws:
- com.icatchtek.reliant.customer.exception.IchStreamNotRunningException - Stream not running, forget to call play?
- com.icatchtek.reliant.customer.exception.IchInvalidSessionException - Indicates invalid session exception, this comes from wificamSDK.
- com.icatchtek.reliant.customer.exception.IchTransportException - Indicates transport exception, from network or usb transport.
pause
boolean pause()throws com.icatchtek.reliant.customer.exception.IchTransportException,com.icatchtek.reliant.customer.exception.IchInvalidSessionException,com.icatchtek.reliant.customer.exception.IchStreamNotRunningException,com.icatchtek.reliant.customer.exception.IchPauseFailedException
Pause the stream.
Returns:
Return true if no error happened, otherwise return false.
Throws:
- com.icatchtek.reliant.customer.exception.IchInvalidSessionException - Indicates invalid session.
- com.icatchtek.reliant.customer.exception.IchTransportException - Indicates transport exception, from network or usb transport.
- com.icatchtek.reliant.customer.exception.IchStreamNotRunningException - Stream not running, forget to call play?
- com.icatchtek.reliant.customer.exception.IchPauseFailedException - Indicates pause failed.
resume
boolean resume()throws com.icatchtek.reliant.customer.exception.IchStreamNotRunningException,com.icatchtek.reliant.customer.exception.IchTransportException,com.icatchtek.reliant.customer.exception.IchInvalidSessionException,com.icatchtek.reliant.customer.exception.IchResumeFailedException
Resume the stream.
Returns:
Return true if no error happened, otherwise return false.
Throws:
- com.icatchtek.reliant.customer.exception.IchStreamNotRunningException - Stream not running, forget to call play?
- com.icatchtek.reliant.customer.exception.IchInvalidSessionException - Indicates invalid session.
- com.icatchtek.reliant.customer.exception.IchTransportException - Indicates transport exception, from network or usb transport.
- com.icatchtek.reliant.customer.exception.IchResumeFailedException - Indicates seek failed.
seek
boolean seek(double pts)throws com.icatchtek.reliant.customer.exception.IchInvalidSessionException,com.icatchtek.reliant.customer.exception.IchTransportException,com.icatchtek.reliant.customer.exception.IchStreamNotRunningException,com.icatchtek.reliant.customer.exception.IchSeekFailedException
Seek to the specified position of the stream.
Parameters:
- pts - The seek position in seconds.
Returns:
Return true if no error happened, otherwise return false.
Throws:
- com.icatchtek.reliant.customer.exception.IchInvalidSessionException - Indicates invalid session.
- com.icatchtek.reliant.customer.exception.IchTransportException - Indicates transport exception, from network or usb transport.
- com.icatchtek.reliant.customer.exception.IchStreamNotRunningException - Stream not running, forget to call play?
- com.icatchtek.reliant.customer.exception.IchSeekFailedException - Indicates seek failed.
getStreamControl
ICatchIStreamControl getStreamControl()throws com.icatchtek.reliant.customer.exception.IchStreamNotRunningException,com.icatchtek.reliant.customer.exception.IchNotSupportedException
Get stream control instance, You can use this instance to control this stream.
Returns:
The stream control instance.
Throws:
- com.icatchtek.reliant.customer.exception.IchStreamNotRunningException - stream not running, forget to start stream?
- com.icatchtek.reliant.customer.exception.IchNotSupportedException - stream does not support app to control the stream though the SDK.
getStreamStablization
ICatchIStreamStablization getStreamStablization()throws com.icatchtek.reliant.customer.exception.IchStreamNotRunningException,com.icatchtek.reliant.customer.exception.IchNotSupportedException
Get Stream Stablization instance. You can use this instance to control the stream stablization feature, And this instance is used when the stream contains EIS information.
Returns:
The stream stablization instance.
Throws:
- com.icatchtek.reliant.customer.exception.IchStreamNotRunningException - stream not running, forget to start stream?
- com.icatchtek.reliant.customer.exception.IchNotSupportedException - stream does not support app to control the stream stablization though the SDK.
