ICatchIPancamPreview interface
package com.icatchtek.pancam.customer;public interface ICatchIPancamPreview extends ICatchIPancamRender {...}
This class is used to start/stop real-time preview stream, Set render mode(through it’s parent interface), get thumbnail from the stream. All operations related to live stream can be done through this class, and in order to understand the full functionality provided by this class, you should first look at the methods provided by its parent interface.
Public methods
start
boolean start(com.icatchtek.reliant.customer.type.ICatchStreamParam streamParam)throws com.icatchtek.reliant.customer.exception.IchStreamNotSupportException,com.icatchtek.reliant.customer.exception.IchInvalidSessionException,com.icatchtek.reliant.customer.exception.IchInvalidArgumentException,com.icatchtek.reliant.customer.exception.IchTransportException,com.icatchtek.reliant.customer.exception.IchStreamAlreadyStartedException
Start preview stream with stream parameter.
Parameters:
- streamParam - parameter of streaming.
Returns:
Returns true on success, otherwise false.
Throws:
- com.icatchtek.reliant.customer.exception.IchStreamNotSupportException - stream parameter not supported by SDK.
- com.icatchtek.reliant.customer.exception.IchInvalidSessionException - invalid session
- com.icatchtek.reliant.customer.exception.IchInvalidArgumentException - invalid argument
- com.icatchtek.reliant.customer.exception.IchTransportException - Transport not supported or some other errors occurred.
- com.icatchtek.reliant.customer.exception.IchStreamAlreadyStartedException - streaming is already started, should not start again.
start
boolean start(com.icatchtek.reliant.customer.type.ICatchStreamParam streamParam,boolean enableAudio)throws com.icatchtek.reliant.customer.exception.IchStreamNotSupportException,com.icatchtek.reliant.customer.exception.IchInvalidSessionException,com.icatchtek.reliant.customer.exception.IchInvalidArgumentException,com.icatchtek.reliant.customer.exception.IchTransportException,com.icatchtek.reliant.customer.exception.IchStreamAlreadyStartedException
Start preview stream with stream parameter, enable audio or not.
Parameters:
- streamParam - The stream parameter.
- enableAudio - enable audio or not.
Returns:
Return true if no error occurred, 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.IchInvalidArgumentException - Invalid argument.
- com.icatchtek.reliant.customer.exception.IchStreamAlreadyStartedException - The stream already started, should close it first.
start
boolean start(com.icatchtek.reliant.customer.type.ICatchStreamParam streamParam,boolean enableAudio,int outputFPS)throws com.icatchtek.reliant.customer.exception.IchStreamNotSupportException,com.icatchtek.reliant.customer.exception.IchInvalidSessionException,com.icatchtek.reliant.customer.exception.IchInvalidArgumentException,com.icatchtek.reliant.customer.exception.IchTransportException,com.icatchtek.reliant.customer.exception.IchStreamAlreadyStartedException
Start preview stream with stream parameter, enable audio or not.
Parameters:
- streamParam - The stream parameter.
- enableAudio - enable audio or not.
- outputFPS - Set the output fps of the stream.
Returns:
Return true if no error occurred, 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.IchInvalidArgumentException - Invalid argument.
- com.icatchtek.reliant.customer.exception.IchStreamAlreadyStartedException - The stream already started, should close it first.
start
boolean start(com.icatchtek.reliant.customer.type.ICatchStreamParam streamParam,boolean enableAudio,int outputFPS,boolean convertVideo,boolean convertAudio)throws com.icatchtek.reliant.customer.exception.IchStreamNotSupportException,com.icatchtek.reliant.customer.exception.IchInvalidSessionException,com.icatchtek.reliant.customer.exception.IchInvalidArgumentException,com.icatchtek.reliant.customer.exception.IchTransportException,com.icatchtek.reliant.customer.exception.IchStreamAlreadyStartedException
Start preview stream with stream parameter, enable audio or not.
Parameters:
- streamParam - The stream parameter.
- enableAudio - enable audio or not.
- outputFPS - Set the output fps of the stream.
- convertVideo - decode video or not, only this time.
- convertAudio - decode audio or not, only this time.
Returns:
Return true if no error occurred, 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.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 preview streaming.
Returns:
Return true if no error occurred, otherwise return false.
Throws:
- com.icatchtek.reliant.customer.exception.IchStreamNotRunningException - The streaming not running, so stop will fail.
- com.icatchtek.reliant.customer.exception.IchInvalidSessionException - Indicates invalid session exception.
- com.icatchtek.reliant.customer.exception.IchTransportException - Indicates transport exception, from network or usb transport.
stop
boolean stop(int nextOps)throws com.icatchtek.reliant.customer.exception.IchStreamNotRunningException,com.icatchtek.reliant.customer.exception.IchInvalidSessionException,com.icatchtek.reliant.customer.exception.IchTransportException
Stop preview streaming.
Parameters:
- nextOps - The next operation the app will do after closing the stream.
Returns:
Return true if no error occurred, otherwise return false.
Throws:
- com.icatchtek.reliant.customer.exception.IchStreamNotRunningException - The streaming not running, so stop will fail.
- com.icatchtek.reliant.customer.exception.IchInvalidSessionException - Indicates invalid session exception.
- 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.
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.
getStreamPublish
ICatchIStreamPublish getStreamPublish()throws com.icatchtek.reliant.customer.exception.IchStreamNotRunningException,com.icatchtek.reliant.customer.exception.IchNotSupportedException
Get stream publish instance. You can use this instance to publish stream to the specified server, such as youtube.
Returns:
The stream publish 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 publish the stream through 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.
