FrameHandlerSink [Deprecated]

The FrameHandlerSink is the SinkType used to grab (copy) frames from the image stream. It replaces the deprecated FrameGrabberSink and contains a MemBufferCollection and optionally allows you to specify one or more IFrameFilters that are responsible for copying the image data to the buffers of the MemBufferCollection. The IFrameFilter implementation can perform user-defined transformations while copying the data, and they can intentionally drop unwanted frames. If no frame filter is registered, the frames are copied to the MemBufferCollection without being changed.

Frames are copied one after another to the MemBufferCollection, starting with the first buffer of the collection. When a frame is copied into the last buffer, the next frame is copied to the first buffer and so on.

The FrameHandlerSink can operate in snap mode, or in grab mode. The mode can be toggled by calling the method setSnapMode. In grab mode, frames are copied continuously to the MemBufferCollection, as soon as Grabber::startLive is called. A call to Grabber::stopLive ends the copy process. On the other hand, in snap mode, every call to FrameHandlerSink::snapImages or FrameHandlerSink::snapImagesAsync copies the specified number of frames to the MemBufferCollection. Grabber::startLive has to be called before any call to FrameHandlerSink::snapImages.

Information

    Header File: tisudshl.h
    Namespace: DShowLib
    Introduced in version 3.0
    This class is deprecated since version 3.5.
    Use FrameNotificationSink, FrameSnapSink or FrameQueueSink

Inheritance

    GrabberSinkType
            FrameHandlerSink

Methods

Method Description
create

Creates a new FrameHandlerSink.

getCreateData

Returns a tCreateData structure, containing the information that was used to create this instance.

getFrameCount

Returns the number of frames that were copied into this MemBufferCollection since the last call to Grabber::startLive.

getFrameFilters

Returns the currently set list of IFrameFilters.

getLastAcqMemBuffer

Returns the MemBuffer, in which the last frame was fully copied. Each restart of the sink sets the start of the MemBufferCollection to the first buffer. After stopping the sink, this function returns the last acquired frame until the sink is restarted.

getMemBufferCollection

Returns the current MemBufferCollection.

getOutputFrameType

Returns the frame type of the sink. This is the frame type of the MemBufferCollection or the output frame type of the handler, when no MemBufferCollection is set.

getSinkType

This implementation of GrabberSinkType::getSinkType returns eFRAMEHANDLER_SINK.

getSnapMode

Returns whether this FrameHandlerSink is currently in snap mode.

setMemBufferCollection

Sets a MemBufferCollection for this FrameHandlerSink.

setSnapMode

Changes this sink's operating mode between Grab and Snap mode. In grab mode, all frames reaching the sink are presented to the frame filter or filter chain and then copied into the MemBufferCollection. After that, the frameReady event of the GrabberListener is called. In snap mode, snapImages or snapImagesAsync has to be called in order to trigger the image acquisition process.

snapImages

Queues up a snap job, thus allowing a number of frames to be copied into the MemBufferCollection. The method returns when either the specified number of frames are snapped, or the timeout has occurred.

snapImagesAsync

Queues up a snap job, thus copying a number of frames into the MemBufferCollection. The method returns immediately after queuing the job.

Structs

Struct Description
tCreateData

This structure describes the parameters that were used to create a FrameHandlerSink. You can access the tCreateData of a FrameHandlerSink by calling FrameHandlerSink::getCreateData, and passing it to FrameHandlerSink::create to create a similar FrameHandlerSink.

<< Classes