com.teamdev.jxcapture.video.win.directshow.wrappers.server
Class SampleGrabberCallback

java.lang.Object
  extended by com.teamdev.jxdesktop.win32.com.server.IUnknownServer
      extended by com.teamdev.jxcapture.video.win.directshow.wrappers.server.SampleGrabberCallback
All Implemented Interfaces:
com.jniwrapper.AutoDeleteParameter, ISampleGrabberCB, com.teamdev.jxdesktop.win32.com.IUnknown

public class SampleGrabberCallback
extends com.teamdev.jxdesktop.win32.com.server.IUnknownServer
implements ISampleGrabberCB

Provides functionality for grabbing data from a filter graph.


Field Summary
 
Fields inherited from interface com.teamdev.jxcapture.video.win.directshow.wrappers.ISampleGrabberCB
INTERFACE_IDENTIFIER
 
Constructor Summary
SampleGrabberCallback(com.teamdev.jxdesktop.win32.com.CoClassMetaInfo coClassMetaInfo)
           
 
Method Summary
 void addSampleGrabberListener(SampleGrabberListener listener)
           
 void bufferCB(com.jniwrapper.DoubleFloat sampleTime, com.jniwrapper.Pointer.Void buffer, com.jniwrapper.LongInt bufferLen)
           
static SampleGrabberCallback create()
          Factory method that creates sample grabber callback.
 ISampleGrabberCB getCallback()
           
 byte[] grab()
          This method returns the data in raw format, depending on a format of a source file.
 void removeSampleGrabberListener(SampleGrabberListener listener)
           
 void sampleCB(com.jniwrapper.DoubleFloat sampleTime, com.teamdev.jxdesktop.win32.com.IUnknown sample)
           
 
Methods inherited from class com.teamdev.jxdesktop.win32.com.server.IUnknownServer
addRef, addRefAggregated, create, destroy, doDestroy, doQueryInterface, getClassImpl, getRefCount, isAutoDelete, isNull, queryInterface, queryInterfaceAggregated, release, releaseAggregated, setAutoDelete, setNull
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.teamdev.jxdesktop.win32.com.IUnknown
addRef, isNull, queryInterface, release, setNull
 
Methods inherited from interface com.jniwrapper.AutoDeleteParameter
isAutoDelete, setAutoDelete
 

Constructor Detail

SampleGrabberCallback

public SampleGrabberCallback(com.teamdev.jxdesktop.win32.com.CoClassMetaInfo coClassMetaInfo)
Method Detail

sampleCB

public void sampleCB(com.jniwrapper.DoubleFloat sampleTime,
                     com.teamdev.jxdesktop.win32.com.IUnknown sample)
              throws com.teamdev.jxdesktop.win32.com.ComException
Specified by:
sampleCB in interface ISampleGrabberCB
Throws:
com.teamdev.jxdesktop.win32.com.ComException

bufferCB

public void bufferCB(com.jniwrapper.DoubleFloat sampleTime,
                     com.jniwrapper.Pointer.Void buffer,
                     com.jniwrapper.LongInt bufferLen)
              throws com.teamdev.jxdesktop.win32.com.ComException
Specified by:
bufferCB in interface ISampleGrabberCB
Throws:
com.teamdev.jxdesktop.win32.com.ComException

addSampleGrabberListener

public void addSampleGrabberListener(SampleGrabberListener listener)

removeSampleGrabberListener

public void removeSampleGrabberListener(SampleGrabberListener listener)

grab

public byte[] grab()
            throws java.util.concurrent.TimeoutException,
                   java.lang.InterruptedException
This method returns the data in raw format, depending on a format of a source file.

Returns:
byte array which represents a snapshot in raw format
Throws:
java.util.concurrent.TimeoutException - if timeout occurs during pefroming grab operation
java.lang.InterruptedException - if it got interrupted in wait phase

getCallback

public ISampleGrabberCB getCallback()

create

public static SampleGrabberCallback create()
Factory method that creates sample grabber callback.

Returns:
callback instance