Ystok-Media

Ystok-Media is a Common Lisp GUI library based on the LispWorks® CAPI and COM/Automation API (capi:ole-control-pane). It allows to embed a media player window with playback functions into your Windows application.

The current version supports the following ActiveX implementations.

Windows Media Player
Preinstalled on Windows. See Microsoft Media Player SDK.
VLC Player
See VideoLAN Wiki.
Macromedia/Adobe Flash Player
Based on LispWorks examples/com/ole/flash-player.lisp and has a very limited functionality.

Dependencies

No dependencies.
Ystok-Media relies on CAPI, COM, SYSTEM, and LISPWORKS packages.

Platforms

Ystok-Media works only on LispWorks for Windows.
The source code was tested on LWW version 7.1. Actually only video and photo files have been played but not audio files.

Documentation

None. Only comments inside source code are available.
Here is change.log.

Download and installation

The source code of Ystok-Media is available from
http://lisp.ystok.ru/ymedia/ymedia-1-0-005.zip.
The distribution package contains

Just unpack and load defsys.lisp into the LispWorks Editor.

There is yplayer.exe, an off-the-shelf Windows application demonstrating media player functions. It is packed into the http://lisp.ystok.ru/ymedia/yplayer.zip.
Usage:

yplayer.exe [-log]

Implementation Notes

Windows Media Player ActiveX Poor Design

When looping through the playlist, WMP ActiveX component automatically tries to resize the container according to the native size of each media. Visual Basic and MS Access forums suggest a solution. But capi:ole-control-pane seems not to have a possibility to fix the component internal size.

As as result, the "stretchToFit" property does not work properly.

The only (ugly) workaround I have found:
force resizing the pane a bit on start playing each item (see %wmp-resize).