Advanced User Interface Software 2000 Benchmark

SMIL User Agent:

Benchmark 1 - Visual Basic 2/21/2001

Jack Zaientz
412-241-7342
810 Rebecca Ave, Apt. 5
Pittsburgh, PA 15221
jackrabbit@puddledock.com

This Document: http://www.puddledock.com/cmu/auis/report1.html
Proposal Slides: http://www.puddledock.com/cmu/auis/proposal1.html
Presentation Slides: http://www.puddledock.com/cmu/auis/presentation1.html

Introduction

This benchmark is a simple multimedia player, or user agent, that loads and plays SMIL files and allows users to have simple control of playback. SMIL is an XML based language created by the W3C organization to allow TV-like multimedia presentations to be delivered via the WWW. SMIL’s TV-like capacities include the ability to present captions or audio over-dubs when requested by users. SMIL supports multiple concurrent video and audio files.

While there are few SMIL user agents on the market at the present time, this player resembles other multimedia players such as the RealMedia RealPlayer and Windows Multimedia Player. It will be implemented as a direct manipulation interface. As a benchmark, the SMIL User Agent will test a toolkit’s ability to parse XML documents; to display and control various media types, including images (.GIF, .JPG), text, audio (.AU, .WAV, .MP3), and video (.MPEG,.AVI); create, control and interact with objects at runtime..

Description of Benchmark Task

The SMIL User Agent may be implemented as either an applet or a stand-alone application. It should, at minimum, present a mechanism for selecting captioning and overdub preferences, a mechanism for selecting and loading a file, a multimedia content display screen, a button to play the multimedia file and a button to stop the multimedia file.

The SMIL file defines a set of screen regions and content to place in those regions and specified times to place and remove that content.  This benchmark will create and co-ordiante each screen regions seperately.  It will not use a media player (Windows Media Player, Real Player) widget to host the SMIL display, only to display relevant media types. The SMIL player will support multiple concurrent instances of each media type. 

Description of Visual Basic Implementation

Platform:

I used Microsoft Visual Basic 6.0 on Microsoft Windows NT, with Windows Media Player 7.0, DirectShow 8.0, and Microsoft SAX XML Parser 3.0, and the Windows Common Dialog Control 6.0.  My development/test machine was a standard IBM PC.

Specification:

The original benchmark description was adequately specificied to be buildable.  The only change made was to simplify the benchmark by decressing the amount of SMIL functionality implemented. Specifically, TEXT, and ANIMATION types were not implmenented. SWITCHing was not implemented either, so the options screen has no impact on application behavior.

The only addition to the specification was the use of the Microsoft Common Dialog control to add the standard Windows "File Open" dialog box.  This is a standard VB practice and required only a few lines of code.

The only feature that could not be implemented due to difficult was the ability to have multiple concurrent audio outputs.  This would have required a much higher interaction with the DirectSound API, if it was possible at all without writing a special COM component in C++.

Experience:

Expert, but rusty.  For a period of about 3 years, ending about 1.5 years ago I was professionaly employed as a software developer and Visual Basic was one of my standard development tools.  I have used versions 4.0, 5.0 and 6.0, and am (or was) Microsoft Certified on versions 4.0 and 5.0.  

I have only minimal experience in multimedia programming, Windows Media Control, or the Directx (DirectSound, DirectShow) API's.  I have only a base theoretical knowledge of XML and had never implemented an application that utilized and had never used SAX.

Documentation:

I have two shelves of books on VB at home, but didn't use them much.  I did make one reference to Daniel Appleman's "Visual Basic 5 Programmer's Guide to the WIN32 API."  My primary references were the Microsoft Developer's Net (MSDN). In particular the following areas:

SAX XML Parser

http://msdn.microsoft.com/xml/general/xmlparser.asp

http://msdn.microsoft.com/xml/c-frame.htm?/xml/articles/vbsax2jumpstart.asp

http://msdn.microsoft.com/library/default.asp?URL=/library/psdk/xmlsdk/sax24y3p.htm

MS DirectX - VB http://msdn.microsoft.com/library/default.asp?URL=/library/psdk/multimed/vfwstart_8ld1.htm
DirectShow - VB

http://msdn.microsoft.com/library/default.asp?URL=/library/psdk/directx/dx8_c/ds/oview/vb.htm

http://msdn.microsoft.com/library/default.asp?URL=/library/psdk/directx/dx8_c/ds/AppDev/howto_attachvidwin.htm

http://msdn.microsoft.com/library/default.asp?URL=/library/psdk/directx/dx8_c/ds/default.htm

DirectX SDK http://msdn.microsoft.com/Downloads/sdks/platform/dxmedia.asp
ActiveMovie Control http://www.microsoft.com/devonly/tech/amov1doc/amsdk030.htm
Windows Media Control http://msdn.microsoft.com/library/psdk/wm_media/wmplay/mmp_sdk
DirectSound http://support.microsoft.com/support/kb/articles/Q221/5/78.ASP

I also made good use of Deja News. Deja, which is in the process of being bought by Google, is a searchable web-driven database of Usenet posts dating back to 1995.  Generally, if I have a question, someone else did too, and I can go find the answer.

Statistics:

Quality of Tool:

I am very fond of VB. It is not an elegant tool. It has grown in fits and spurts and it's developement has been driven more by market concerns than by a sense of programming language design.  That said, you can get alot done quickly and it's much more powerful and flexible than it is often given credit for.  Microsoft also supports it very well.

With my experience, I can't judge it's learnablity well.  It was very appropriate tool to build this benchmark with, particularly with the Windows Media Control helping out.  VB made the interface aspects of the benchmark were quite managable, with a couple small exceptions.  VB doesn't allow controls (widgets) to be created at runtime unless certain preparations are taken at design time. This is a limiting factor.  VB's support of object oriented techniques supports the complex internal structure required for this benchmark.

The run time performance of VB is generally very good, and this benchmark was no exception.

Good Aspects of Tool: The easiest aspect of the benchmark to program was the XML input and the video stream output.  What could be done, could be done very quickly. 

Not so Good Aspects: VB's lack of internal general data structures made the internal stucture more complicated than it needed to be.  Since all VB Classes are sub-classes of the generic Object class, general datastructers like sorted arrays could be created. VB "collection" class does not serve this very well.

Debugging: The hardest thing to debug was the interal object pointers.

Benchmark:

As noted above the benchmark is adequately specified to implement, but the specification calls for a level of interal complexity and refinement that is a bit large for the goal of a benchmark task. To improve this as a benchmark, this complexity has to be reduced a bit and some internal functionality (SMIL compliance) has to be sacraficed.  That being said, it is a good test of XML parsing and media processing as it tests a wide number of formats and conditions.

Screen Shots

Main Screen

Common Dialog Control

Playing overlapping video streams (both MPEG)

Playing image files (both gif)