Class BaseCaptureReader

java.lang.Object
com.digimarc.dms.readers.BaseReader
com.digimarc.dms.readers.BaseCaptureReader
Direct Known Subclasses:
AudioCaptureReader, VideoCaptureReader

public class BaseCaptureReader extends BaseReader

All asynchronous reader objects derive from this class. Asynchronous readers are available for image reading (VideoCaptureReader) and audio reading (AudioCaptureReader). Asynchronous readers provide managed performance scaling by default.

The general signaling mechanism provides asynchronous callbacks when processing has been completed on a packet of data (image frame or audio buffer) via the ResultListener.onReaderResult(ReaderResult, ResultType) and ResultListener.onError(com.digimarc.dms.readers.BaseReader.ReaderError, com.digimarc.dms.readers.BaseReader.ResultType) methods. These callbacks are delivered by a separate thread within the capture reader class. The callbacks will always be delivered to your application on the UI thread. Delays in returning from these callbacks will not obstruct the reader itself, but it may cause a backup in the delivery of further notification callbacks.

  • Field Details

  • Constructor Details

    • BaseCaptureReader

      protected BaseCaptureReader(int symbologyMask, @NonNull ResultListener listener, @Nullable ReaderOptions options) throws ReaderException
      Constructor.
      Parameters:
      symbologyMask - A bitmask value containing the symbologies that the reader should use.
      options - An optional dictionary of flags and settings for the reader. The available entries are documented separately.
      Throws:
      ReaderException - An exception will be thrown if an invalid symbology or options entry is specified for this reader.
  • Method Details

    • notifyOfReadResults

      protected void notifyOfReadResults(@NonNull ReaderResult result, @NonNull BaseReader.ResultType type)
    • notifyOfError

      protected void notifyOfError(@NonNull BaseReader.ReaderError errorCode, @NonNull BaseReader.ResultType type)
    • release

      public void release()
      Description copied from class: BaseReader
      This method should be called when the reader is no longer needed. Failure to call this method may result in objects remaining in memory beyond their useful lifespan.
      Overrides:
      release in class BaseReader