There are two flavours of wfica, the standard wfica which is built with support to output to X11 displays, and wfica_for_plugins which has no input/output support built in, and is intended for non X11 environments.
The table below summarises the plugins which can be developed, a fuller description is given in the text that follows.
Plugin type | Applicable to wfica | Applicable to wfica_for_plugins | Notes |
---|---|---|---|
Accelerated H264 decoders | Yes | Yes | Separate implementations may be needed for each variant of wfica |
Accelerated JPEG decoders | Yes | Yes | The same decoder will work with both variants of wfica |
KVME.so plugins | Yes | Yes | Includes the memory allocator and this type of plugin may be needed for that alone, to support a JPEG or H.264 plugin. When used with wfica does not handle input events. |
UIDialogs plugins | Yes | No. |
The Receiver can also exploit additional plugins for accelerated audio and video codecs, by configuring it to use GStreamer for audio, camera and multimedia functions. Such plugins are standard GStreamer components, and are not covered in the document.
The details of the interface for these plugins are documented as comments in the relevant header file, H264_decode.h, with an unaccelerated sample implementation in the H264_sample directory. The sample code (H264_sample) is based on what was wfica's fallback implementation that is used when no accelerated plugin is available, and for that reason builds a plugin named ctxh264_fb.so. This plugin will need to be renamed to ctxh264.so and placed in $ICAROOT/lib to override other H264 plugins. The decoder provided contains stub functions which do no decoding. It is intended as a template to begin work with.
The sample code (H264_Pi_sample) is a Raspberry Pi implementation and is provided as a reference hardware implementation.
The interface JPEG decoding plugins is in the jpeg_decode.h header file. The sample code (jpeg_sample) is that of wfica's fallback implementation that is used when no accelerated plugin is available, and for that reason builds a plugin named ctxjpeg_fb.so
The header file for these plugins is mainloop.h and the two entry points that must be implemented are special_allocate() and special_free(). The example code is in the allocation_sample directory. Before using this code as a model, pay careful attention to the comments, as parts of the code are there purely for backward compatability with decoder plugins developed for now-obsolete versions of Receiver.
The allocation_sample example includes an implementation of draw() that is almost identical to the default drawing code for X11.
Two example KVMEPlugin.so implementations are included in this SDK. One can only use the framebuffer as it's output, the other can optionally use the framebuffer. When using the framebuffer graphics run the program from a text console: it is usually necessary to run as the superuser, or change the permissions on the /dev/fb0 and /dev/input/mice
The environments supported with SDL depend on how the library is built, but usually X11 and frame buffer graphics are supported. Obviously the preferred means of X11 support is the standard wfica, but taking advantage of any X11 support available in your SDL could speed development.
Timer support can be verified by specifying a command argument of 1. Larger values of the first command argument will build a chain of data-passing stages that use pipes with timers and I/O readiness detection (select_fd() function) to transfer data in response to events. A second optional argument sets the initial timer value, for stress testing.
The Sub-window Interface of the Virtual Channel API supports use of this mechanism in externally-developed Virtual Channels. The relevent header file, subwindow.h, is also included in this SDK.
The UI Dialog Library is used for the majority of dialogs within the Linux Receiver processes, including the X11 based wfica. The processes storebrowse, AuthManager, PrimaryAuthManager, and ServiceRecord use it for all of their UI. The purpose is to ensure that the UI of these essential processes can be replaced with a toolkit and event loop of your choosing by re-implementing the library. The current implementation of the UI Dialog Library distributed with the Linux Receiver is GTK+. The code for this implementation is provided under the UIDialogLib/GTK directory in this SDK as an example.
The selfservice, configmgr, and X11 wfica binaries require GTK+ for other aspects of their UI other than dialogs and therefore cannot be used with a different implementation of the UI Dialog Library than the provided GTK+ implementation. However, all of their functionality is available via the storebrowse command line interface and the configuration files.
A selection of examples are provided under the UIDialogLib/test directory to showcase some of the widgets and dialogs that may be seen.
For information on the interface itself please read the UIDialogLib.h header in the UIDailogLib/inc directory.
Version 13.4:
Remove references to FFMPEG.
Version 13.3:
Documentation updates.
Version 13.2:
Re-organise H264_sample code and Makefile changes.
Version 13.1 Release 2:
Bug fixes and addition of this change history.
Version 13.1:
Add source code for the H.264 decoder plugin for Raspberry Pi.
Add support for HDX Multimedia output with non-X11 graphics.
Add additional UI elements and a interface version number to UIDialogLib.
Rename structure members from private to priv
for C++ compatability.
Version 13.0:
The original release of this SDK.
Earlier versions of the KVME plugin, JPEG and H.264 interfaces had been
previously available to Citrix partners for use with the 12.2 and 12.5 Receivers.