ICatchIPancamVideoPlayback interface

  1. package com.icatchtek.pancam.customer;
  2. public interface ICatchIPancamVideoPlayback extends ICatchIPancamRender {
  3. ...
  4. }

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

  1. boolean play(com.icatchtek.reliant.customer.type.ICatchFile file,
  2. boolean disableAudio,
  3. boolean remote)
  4. throws com.icatchtek.reliant.customer.exception.IchStreamNotSupportException,
  5. com.icatchtek.reliant.customer.exception.IchInvalidSessionException,
  6. com.icatchtek.reliant.customer.exception.IchTransportException,
  7. com.icatchtek.reliant.customer.exception.IchFileNotFoundException,
  8. com.icatchtek.reliant.customer.exception.IchInvalidArgumentException,
  9. 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

  1. boolean play(com.icatchtek.reliant.customer.type.ICatchFile file,
  2. boolean disableAudio,
  3. boolean remote,
  4. double cachingTime)
  5. throws com.icatchtek.reliant.customer.exception.IchStreamNotSupportException,
  6. com.icatchtek.reliant.customer.exception.IchInvalidSessionException,
  7. com.icatchtek.reliant.customer.exception.IchTransportException,
  8. com.icatchtek.reliant.customer.exception.IchFileNotFoundException,
  9. com.icatchtek.reliant.customer.exception.IchInvalidArgumentException,
  10. 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

  1. boolean stop()
  2. throws com.icatchtek.reliant.customer.exception.IchStreamNotRunningException,
  3. com.icatchtek.reliant.customer.exception.IchInvalidSessionException,
  4. 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

  1. boolean getThumbnail(com.icatchtek.reliant.customer.type.ICatchFrameBuffer frameBuffer,
  2. int timeoutInMS)
  3. throws com.icatchtek.reliant.customer.exception.IchVideoStreamClosedException,
  4. com.icatchtek.reliant.customer.exception.IchStreamNotRunningException,
  5. com.icatchtek.reliant.customer.exception.IchTryAgainException,
  6. com.icatchtek.reliant.customer.exception.IchInvalidSessionException,
  7. 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

  1. boolean getThumbnail(int streamNo,
  2. com.icatchtek.reliant.customer.type.ICatchFrameBuffer frameBuffer,
  3. int timeoutInMS)
  4. throws com.icatchtek.reliant.customer.exception.IchVideoStreamClosedException,
  5. com.icatchtek.reliant.customer.exception.IchStreamNotRunningException,
  6. com.icatchtek.reliant.customer.exception.IchTryAgainException,
  7. com.icatchtek.reliant.customer.exception.IchInvalidSessionException,
  8. 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

  1. boolean isStreamingOn()
  2. throws com.icatchtek.reliant.customer.exception.IchInvalidSessionException,
  3. 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

  1. double getLength()
  2. throws com.icatchtek.reliant.customer.exception.IchStreamNotRunningException,
  3. com.icatchtek.reliant.customer.exception.IchTransportException,
  4. 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

  1. boolean pause()
  2. throws com.icatchtek.reliant.customer.exception.IchTransportException,
  3. com.icatchtek.reliant.customer.exception.IchInvalidSessionException,
  4. com.icatchtek.reliant.customer.exception.IchStreamNotRunningException,
  5. 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

  1. boolean resume()
  2. throws com.icatchtek.reliant.customer.exception.IchStreamNotRunningException,
  3. com.icatchtek.reliant.customer.exception.IchTransportException,
  4. com.icatchtek.reliant.customer.exception.IchInvalidSessionException,
  5. 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

  1. boolean seek(double pts)
  2. throws com.icatchtek.reliant.customer.exception.IchInvalidSessionException,
  3. com.icatchtek.reliant.customer.exception.IchTransportException,
  4. com.icatchtek.reliant.customer.exception.IchStreamNotRunningException,
  5. 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

  1. ICatchIStreamControl getStreamControl()
  2. throws com.icatchtek.reliant.customer.exception.IchStreamNotRunningException,
  3. 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

  1. ICatchIStreamStablization getStreamStablization()
  2. throws com.icatchtek.reliant.customer.exception.IchStreamNotRunningException,
  3. 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.