ICatchIStreamControl interface

  1. com.icatchtek.pancam.customer.stream;
  2. public interface ICatchIStreamControl {
  3. ...
  4. }

Interface to control the stream. such as enable enable/disable stream, start/stop movie record, snap image from stream, .etc.

Public methods

enableAudio

  1. boolean enableAudio()
  2. throws com.icatchtek.reliant.customer.exception.IchInvalidSessionException,
  3. com.icatchtek.reliant.customer.exception.IchAudioAlreadyEnabledException,
  4. com.icatchtek.reliant.customer.exception.IchTransportException,
  5. com.icatchtek.reliant.customer.exception.IchNotSupportedException,
  6. com.icatchtek.reliant.customer.exception.IchInvalidArgumentException

Enable audio stream while doing live preview.
Returns:
Return true if no error occurred, otherwise return false.
Throws:

  • com.icatchtek.reliant.customer.exception.IchAudioAlreadyEnabledException - The audio streaming is already enabled.
  • com.icatchtek.reliant.customer.exception.IchTransportException - Indicates transport error.
  • com.icatchtek.reliant.customer.exception.IchNotSupportedException - The operation not supported by The SDK.
  • com.icatchtek.reliant.customer.exception.IchInvalidSessionException - Indicates invalid session exception.

disableAudio

  1. boolean disableAudio()
  2. throws com.icatchtek.reliant.customer.exception.IchInvalidSessionException,
  3. com.icatchtek.reliant.customer.exception.IchAudioAlreadyDisabledException,
  4. com.icatchtek.reliant.customer.exception.IchTransportException,
  5. com.icatchtek.reliant.customer.exception.IchNotSupportedException,
  6. com.icatchtek.reliant.customer.exception.IchInvalidArgumentException

Disable audio stream while doing live preview.
Returns:
Return true if no error occurred, otherwise return false.
Throws:

  • com.icatchtek.reliant.customer.exception.IchAudioAlreadyDisabledException- The audio streaming is already disabled.
  • com.icatchtek.reliant.customer.exception.IchTransportException - Indicates transport error.
  • com.icatchtek.reliant.customer.exception.IchNotSupportedException - The operation not supported by The SDK.
  • com.icatchtek.reliant.customer.exception.IchInvalidSessionException - Indicates invalid session exception.

startMovieRecord

  1. boolean startMovieRecord(java.lang.String fileName,
  2. boolean remote)
  3. throws com.icatchtek.reliant.customer.exception.IchInvalidSessionException,
  4. com.icatchtek.reliant.customer.exception.IchTransportException,
  5. com.icatchtek.reliant.customer.exception.IchStreamNotRunningException,
  6. com.icatchtek.reliant.customer.exception.IchMuxerAlreadyStartedException,
  7. com.icatchtek.reliant.customer.exception.IchMuxerStartFailedException

Start movie record.
Parameters:

  • fileName - The record video file name, with full path.
  • remote - From remote or Not.

Returns:
Return true if no error occurred, otherwise return false.
Throws:

  • com.icatchtek.reliant.customer.exception.IchInvalidSessionException - Invalid session, the session may be destroyed.
  • com.icatchtek.reliant.customer.exception.IchTransportException - Transport error, comes from usb or net.
  • com.icatchtek.reliant.customer.exception.IchStreamNotRunningException - The streaming not running exception.
  • com.icatchtek.reliant.customer.exception.IchMuxerAlreadyStartedException - The muxer already started.
  • com.icatchtek.reliant.customer.exception.IchMuxerStartFailedException - Start muxer failed.

startMovieRecord

  1. boolean startMovieRecord(java.lang.String fileName,
  2. boolean remote,
  3. boolean tag360)
  4. throws com.icatchtek.reliant.customer.exception.IchInvalidSessionException,
  5. com.icatchtek.reliant.customer.exception.IchTransportException,
  6. com.icatchtek.reliant.customer.exception.IchStreamNotRunningException,
  7. com.icatchtek.reliant.customer.exception.IchMuxerAlreadyStartedException,
  8. com.icatchtek.reliant.customer.exception.IchMuxerStartFailedException

Start movie record. When you upload panorama videos with panorama tags to some websites, these websites may play videos in a panoramic way.
Parameters:

  • fileName - The record video file name, with full path.
  • remote - From remote or Not.
  • tag360 - Whether to add panorama tags, which will be useful when uploading videos to some video websites.

Returns:
Return true if no error occurred, otherwise return false.
Throws:

  • com.icatchtek.reliant.customer.exception.IchInvalidSessionException - Invalid session, the session may be destroyed.
  • com.icatchtek.reliant.customer.exception.IchTransportException - Transport error, comes from usb or net.
  • com.icatchtek.reliant.customer.exception.IchStreamNotRunningException - The streaming not running exception.
  • com.icatchtek.reliant.customer.exception.IchMuxerAlreadyStartedException - The muxer already started.
  • com.icatchtek.reliant.customer.exception.IchMuxerStartFailedException - Start muxer failed.

stopMovieRecord

  1. boolean stopMovieRecord()
  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.IchMuxerNotStartedException

Stop movie record.
Returns:
Return true if no error occurred, otherwise return false.
Throws:**

  • com.icatchtek.reliant.customer.exception.IchInvalidSessionException - Invalid session, the session may be destroyed.
  • com.icatchtek.reliant.customer.exception.IchTransportException - Transport error, comes from usb or net.
  • com.icatchtek.reliant.customer.exception.IchStreamNotRunningException - The streaming not running exception.
  • com.icatchtek.reliant.customer.exception.IchMuxerNotStartedException - The muxer not started.

addMovieRecordInfo

  1. boolean addMovieRecordInfo(java.lang.String info)
  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.IchMuxerNotStartedException

Used to add some custom information to the video file header.
Parameters:

  • info - The information to be added.

Returns:
Return true if no error occurred, otherwise return false.
Throws:

  • com.icatchtek.reliant.customer.exception.IchInvalidSessionException - Invalid session, the session may be destroyed.
  • com.icatchtek.reliant.customer.exception.IchTransportException - Transport error, comes from usb or net.
  • com.icatchtek.reliant.customer.exception.IchStreamNotRunningException - The streaming not running exception.
  • com.icatchtek.reliant.customer.exception.IchMuxerNotStartedException - The muxer not started.

getSupportedImageSize

  1. java.util.List<com.icatchtek.reliant.customer.type.ICatchImageSize> getSupportedImageSize()
  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.IchNotSupportedException

Get list supported image size(snap).
Returns:
The supported image sizes.
Throws:**

  • com.icatchtek.reliant.customer.exception.IchInvalidSessionException - Invalid session, the session may be destroyed.
  • com.icatchtek.reliant.customer.exception.IchTransportException - Transport error, comes from usb or net.
  • com.icatchtek.reliant.customer.exception.IchStreamNotRunningException - The streaming not running exception.
  • com.icatchtek.reliant.customer.exception.IchNotSupportedException - The operation not supported by SDK.

setImageSize

  1. boolean setImageSize(com.icatchtek.reliant.customer.type.ICatchImageSize imageSize)
  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.IchInvalidArgumentException,
  6. com.icatchtek.reliant.customer.exception.IchNotSupportedException

Set image size(snap).
Parameters:

  • imageSize - The image size to be set.

Returns:
Return true if no error occurred, otherwise return false.
Throws:

  • com.icatchtek.reliant.customer.exception.IchInvalidSessionException - Invalid session, the session may be destroyed.
  • com.icatchtek.reliant.customer.exception.IchTransportException - Transport error, comes from usb or net.
  • com.icatchtek.reliant.customer.exception.IchStreamNotRunningException - The streaming not running exception.
  • com.icatchtek.reliant.customer.exception.IchNotSupportedException - The operation not supported by SDK.
  • com.icatchtek.reliant.customer.exception.IchInvalidArgumentException - Invalid argument.

snapImage

  1. boolean snapImage(com.icatchtek.reliant.customer.type.ICatchFrameBuffer image,
  2. boolean stitched,
  3. int timeoutInMS)
  4. throws com.icatchtek.reliant.customer.exception.IchInvalidSessionException,
  5. com.icatchtek.reliant.customer.exception.IchTransportException,
  6. com.icatchtek.reliant.customer.exception.IchStreamNotRunningException,
  7. com.icatchtek.reliant.customer.exception.IchImageSizeNotSpecifiedException,
  8. com.icatchtek.reliant.customer.exception.IchNotSupportedException

Snap an image.
Parameters:

  • image - Used to store the snapped image.
  • stitched - reserved parameters.
  • timeoutInMS - timeout in million seconds.

Returns:
Return true if no error occurred, otherwise return false.
Throws:

  • com.icatchtek.reliant.customer.exception.IchInvalidSessionException - Invalid session, the session may be destroyed.
  • com.icatchtek.reliant.customer.exception.IchTransportException - Transport exception, network or usb error.
  • com.icatchtek.reliant.customer.exception.IchStreamNotRunningException - Streaming had not be started.
  • com.icatchtek.reliant.customer.exception.IchImageSizeNotSpecifiedException - Image size not specified.
  • com.icatchtek.reliant.customer.exception.IchNotSupportedException - Operation not supported.

snapImage

  1. boolean snapImage(com.icatchtek.reliant.customer.type.ICatchFrameBuffer image,
  2. int timeoutInMS)
  3. throws com.icatchtek.reliant.customer.exception.IchInvalidSessionException,
  4. com.icatchtek.reliant.customer.exception.IchTransportException,
  5. com.icatchtek.reliant.customer.exception.IchStreamNotRunningException,
  6. com.icatchtek.reliant.customer.exception.IchImageSizeNotSpecifiedException,
  7. com.icatchtek.reliant.customer.exception.IchNotSupportedException

Snap an image.
Parameters:

  • image - Used to store the snapped image.
  • timeoutInMS - timeout in million seconds.

Returns:
Return true if no error occurred, otherwise return false.
Throws:

  • com.icatchtek.reliant.customer.exception.IchInvalidSessionException - Invalid session, the session may be destroyed.
  • com.icatchtek.reliant.customer.exception.IchTransportException - Transport exception, network or usb error.
  • com.icatchtek.reliant.customer.exception.IchStreamNotRunningException - Streaming had not be started.
  • com.icatchtek.reliant.customer.exception.IchImageSizeNotSpecifiedException - Image size not specified.
  • com.icatchtek.reliant.customer.exception.IchNotSupportedException - Operation not supported.