Preview – Sensoray 2224 Windows User Manual

Page 13

Advertising
background image

techniques to work with the data. This could involve, for example, saving the data from the callback to a
queue or FIFO to work on in another thread.

An example of stream capture using callbacks is shown in the demo application. It captures the stream
and sends it out on a UDP socket. Because the 2226 captures encoded transport stream, no processing
or headers need to be added. The resulting stream can be viewed on the VideoLan media player by
opening a network stream with arguments such as udp://@:1234 (for UDP destination port 1234).

The functions associated with stream capture through callbacks are shown below. The 2226 does not
support switching inputs while streaming. Do not unplug the input after streaming has started.

In version 1.0.1, callbacks can be registered for any streaming function such as recording. For instance,
you can set a callback with S2226_RegisterCallback and then call S2226_StartRecord. This will record
the stream to file and give a callback to the data. After S2226_StopStream is callback, the callback is
unregistered.

Also in version 1.0.1 is a callback to the raw preview stream. This is available by using the function
S2226_RegisterCallbackRaw.

S2226_RegisterCallback

S2226_RegisterCallbackRaw

S2226_StartCallback (callback stream only)

S2226_StopStream

Preview

Preview is the display of the stream on a host computer or PC. The 2226 also has output channels to
display the connected input on an external monitor, but these are considered a different feature.

Version 1.0.1 has a raw preview feature on the host computer (at reduced resolution to meet USB
bandwidth requirements). Raw preview is at 320x240 or 640x240 resolution and can be set using
S2226_SetPreviewType. Raw preview is down-scaled from the selected input in the hardware.

Due to codec issues, decoded preview is only available on Windows 7. Additionally, the following
caveats apply to Preview with Recording (S2226_StartPreviewAndRecord). DirectShow has a known
issue where the video preview is restarted when the Window is moved from one monitor to another.
This is normally not a problem, but if the underlying stream graph is also recording the stream, data will
be lost from the recorded file.

There is a workaround to the above problem associated with S2226_StartPreviewAndRecord. The
solution is to prevent the user from moving the application Window from one monitor to another while
S2226_StartPreviewAndRecord is running. An example is shown in the VB.NET demo. Please note if the
stream is stopped, moving the application from one monitor to another is perfectly acceptable.

Additionally, Sensoray has decided that loss of recording data is much more serious than loss of preview
on the PC. Therefor, Sensoray has overridden the behavior of DirectShow to prevent this from happen.

13

Advertising
This manual is related to the following products: