It has been decided that the movies should be encoded as
h264\vorbis\ogg (i.e. h264 for the video, vorbis for the audio in a ogg
format file). A means is needed to replay these movies, which allowed
the user to pause and skip forward and back to allow performing
operations along with the movie.
We identified 2 possible ways of approaching the replay of the help
movies:
1) Use a mplayer executable. Currently we try running a native copy and
if that fails a shipped version is tried.
2) Use wxMediaCtrl (which uses gstreamer on Linux,
http://en.wikipedia.org/wiki/Gstreamer).
Neither solution is ideal and both have pros and cons:
mplayer
pros
- Does not need serious amounts of work on mplayer source code to
produce working executable. The only work that was needed was witting a
script to automate the build with the right options.
- Possible to produce a stripped version without the overhead of
the mplayer, just by removing the executable.
- Easy to produce a standalone installation just by the inclusion
of a pre-built mplayer.
cons
- Will not work on a non-x86\x86_64 platform if a native mplayer
not present
- Control of replay is not as easy. In order to pause or skip
forward or back commands must be sent on stdin, also current location
has to be read from the application stdout.
wxMediaCtrl\gstreamer
pros
- Cross platform. wxMediaCtrl uses DirectShow on windows and
Quciktime on mac, which means exactly same code will work on all
platforms.
- Plugin based. This means it's possible to produce a minimal
install that contains just the plugins that are needed (but see static
issues below)
- Easy to write the user interface to control replay, since this
can be achieved by just calling functions.
cons
- A statically linked gstreamer seems unable to load plugins.
Instead the plugins must be linked into the application, which means
changing the plugin source so they can be correctly registered. This
may cause problems with licenses.
- If linked dynamically the application will not load on a machine
that doesn't have the basic gstreamer code installed.
- Error reporting leaves much to be desired if a plugin that is
needed to replay the movie is not present. This may well be more lack
of decent handling within wxMediaCtrl than an inherent limitation of
gstreamer.
At the moment using mplayer is looking like the better method for movie
replay, since it makes producing a static release executable much
easier. An other possible solution is to use mplayer for the static
release build and use wxMediaCtrl for user built executables (and
version built by distributions). It's probable that other platforms
could also use wxMediaCtrl even for static builds since the media
replay components are a standard part of the OS. They problem with this
middle way is it means an other bit of code needs writing and
maintaining.
Part of the reason that this document was produced now was to get
feedback from the community about which direction looks like its best
(or even if you can think of a better way). So we'd very much like to
hear your comments.
Luke
|